CN101634588B - Method and device for drawing audio waveforms - Google Patents

Method and device for drawing audio waveforms Download PDF

Info

Publication number
CN101634588B
CN101634588B CN2008101172334A CN200810117233A CN101634588B CN 101634588 B CN101634588 B CN 101634588B CN 2008101172334 A CN2008101172334 A CN 2008101172334A CN 200810117233 A CN200810117233 A CN 200810117233A CN 101634588 B CN101634588 B CN 101634588B
Authority
CN
China
Prior art keywords
audio
buffer unit
volume control
viewing area
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2008101172334A
Other languages
Chinese (zh)
Other versions
CN101634588A (en
Inventor
周期律
郭宗明
王祥
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University, Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University
Priority to CN2008101172334A priority Critical patent/CN101634588B/en
Publication of CN101634588A publication Critical patent/CN101634588A/en
Application granted granted Critical
Publication of CN101634588B publication Critical patent/CN101634588B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to the field of audio data processing, and in particular to a method and a device for drawing audio waveforms, which are used for solving the problem that the method for drawing the waveforms in the prior art processes audio files with large capacity at low speed so that the operation time is prolonged and the work efficiency is reduced. The method comprises the following steps: determining the number of particulate pixels displaying audio data; dividing the audio data corresponding to an audio waveform display area into a plurality of audio subdata segments according to the capacity of the audio data and the number of the particulate pixels displaying the audio data; respectively storing the divided different audio subdata segments into corresponding display cache units according to the playing time of the audio data; and drawing the audio subdata segments in the corresponding display cache units into the audio waveforms according to the playing time of the audio data. The method can speed up the audio data processing and improve the work efficiency.

Description

A kind of method and apparatus of drawing audio waveforms
Technical field
The present invention relates to the voice data process field, particularly a kind of method and apparatus of drawing audio waveforms.
Background technology
Audio editing plays an important role in radio station, TV station and other digital Construction, is the important component part of media management system.Such as radio station and TV station, editor will carry out editing operation fast before the raw data of gathering is put in storage, to reach purposes such as extracting the user's interest content.If when editor's original media material, system can show the waveform of corresponding audio data accurately, fast, then can locate fast in (as quiet district etc.), thereby the time of having accelerated editing operation has been improved work efficiency the characteristic area of voice data.
Two kinds of waveform method for drafting relatively more commonly used are arranged at present:
First kind, no way to play for time.
The data of viewing area correspondence in this method reading disk, the data that read are depicted as waveform to be shown, when the user operates (or adjusting the viewing area) to the data of viewing area, need the data in the continuation reading disk, the data after the operation are depicted as waveform show.
Because this method will all be put in the disk all operations of voice data and carry out, can cause the user like this when operating, data on the reading disk repeatedly just are because the speed of reading disk is relatively slow, so had a strong impact on the time of drawing waveforms.
Second kind, full buffer method.
This method stores all voice datas in the internal memory into earlier, read the data of viewing area correspondence in the internal memory, the data that read are depicted as waveform to be shown, when the user operates (or adjusting the viewing area) to the data of viewing area, need continue to read the data in the internal memory, the data after the operation are depicted as waveform show.
Because this method stores all voice datas in the internal memory into, accelerated the speed of drawing waveforms than first method, but because the relative disk size of memory size is little many, for jumbo voice data, second method whole voice data all can't be stored in the internal memory, so can't be suitable for jumbo voice data.
In sum, the present waveform method of drawing, handles slow for the speed of jumbo audio file, thereby increased the time of operating, reduced work efficiency.
Summary of the invention
The embodiment of the invention provides a kind of method and apparatus of drawing audio waveforms, in order to solve the method for the waveform drafting that exists in the prior art, processing is slow for the speed of jumbo audio file, thereby has increased the time of operation, has reduced the problem of work efficiency.
The method of a kind of drawing audio waveforms that the embodiment of the invention provides comprises:
Determine number of particulate pixels displaying audio data, described particulate pixels is used to show the audio volume control of voice data;
According to size of audio data and described number of particulate pixels displaying audio data, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections;
With the different audio frequency subdata section after dividing, store into respectively in the corresponding display buffer unit according to the voice data reproduction time;
According to described voice data reproduction time, the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
A kind of drawing audio waveforms device that the embodiment of the invention provides comprises:
Determination module is used for determining number of particulate pixels displaying audio data that described particulate pixels is used to show the audio volume control of voice data;
First divides module, is used for according to size of audio data and described number of particulate pixels displaying audio data, and audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections;
First processing module is used for the different audio frequency subdata section after dividing is stored into respectively in the corresponding display buffer unit according to the voice data reproduction time;
Drafting module is used for according to described voice data reproduction time, and the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
The embodiment of the invention is determined number of particulate pixels displaying audio data, and described particulate pixels is used to show the audio volume control of voice data; According to size of audio data and described number of particulate pixels displaying audio data, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections; With the different audio frequency subdata section after dividing, store into respectively in the corresponding display buffer unit according to the voice data reproduction time; According to described voice data reproduction time, with the audio frequency subdata section in the display buffer unit of correspondence, be depicted as audio volume control, no matter because file size, the voice data of audio volume control viewing area can be stored in the internal memory, thereby accelerated the speed of processing audio data, improved work efficiency.
Description of drawings
Fig. 1 is an embodiment of the invention drawing audio waveforms apparatus structure synoptic diagram;
Fig. 2 is the method synoptic diagram of embodiment of the invention drawing audio waveforms;
Fig. 3 A is an embodiment of the invention cache module synoptic diagram;
Fig. 3 B is that back cache module variation synoptic diagram is moved in first kind of audio volume control viewing area of the embodiment of the invention;
Fig. 3 C is that back cache module variation synoptic diagram is moved in second kind of audio volume control viewing area of the embodiment of the invention;
Fig. 4 is the method flow synoptic diagram after move embodiment of the invention audio volume control viewing area;
Fig. 5 shows the adjusted method flow synoptic diagram of granularity for the embodiment of the invention.
Embodiment
The embodiment of the invention is according to size of audio data and number of particulate pixels displaying audio data, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections, and audio frequency subdata section stored in the display buffer unit, no matter realized file size, the voice data of audio volume control viewing area can be stored in the internal memory, thereby accelerated the speed of processing audio data, improved work efficiency.
Wherein, number of particulate pixels displaying audio data is the number of particulate pixels that shows this voice data waveform in the audio volume control viewing area; Further,
The number of particulate pixels of audio volume control viewing area is the number of particulate pixels that can show the voice data waveform in the audio volume control viewing area.
The number of particulate pixels of number of particulate pixels displaying audio data and audio volume control viewing area can be identical, also can be different.
Concrete, all particulate pixels of explanation audio volume control viewing area all show the waveform of voice data when identical, such as: the time of audio volume control viewing area is equal to or less than the time of video file.
The waveform of the part particulate pixels demonstration voice data of audio volume control viewing area is not described simultaneously, such as: the time of audio volume control viewing area is greater than the time of video file.
In specific implementation process, the time of audio volume control viewing area can be adjusted (promptly adjust and show granularity), make the time span of each particulate pixels of audio volume control viewing area all can change, thereby can change number of particulate pixels displaying audio data.
Below in conjunction with Figure of description the embodiment of the invention is described in further detail.
As shown in Figure 1, embodiment of the invention drawing audio waveforms device comprises: determination module 100, first is divided module 101, first processing module 102 and drafting module 103.
Determination module 100 is used for determining number of particulate pixels displaying audio data.
Wherein, can determine number of particulate pixels displaying audio data according to following formula:
N pix = min ( N , N × T 1 T 2 )
N PixBe number of particulate pixels displaying audio data, N is the number of particulate pixels of audio volume control viewing area, T 1Be the time span of voice data, T 2Time span for particulate pixels.
First divides module 101, is used for the number of particulate pixels displaying audio data determined according to size of audio data and determination module 100, and audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections.
Wherein, when number of particulate pixels displaying audio data is not less than the number of particulate pixels of audio volume control viewing area, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections according to following formula:
During less than the number of particulate pixels of audio volume control viewing area, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections in number of particulate pixels displaying audio data according to following formula:
Figure S2008101172334D00052
Concrete, calculate the voice data position that begins according to following formula:
offset=T start×BytesPerSecond
Wherein, T StartBe the start time (second) that shows, BytesPerSecond is the bytes per second of file.
Because the starting position of audio volume control viewing area might not be the starting position of voice data, so will determine specifically to begin to show from which position of voice data.
Begin from the position of determining then to divide audio frequency subdata section, finish up to audio volume control viewing area corresponding audio data are all divided according to Step (audio frequency subdata section capacity).
The waveform of a audio frequency subdata after the audio volume control viewing area particulate pixels demonstration is divided like this.
First processing module 102 is used for the different audio frequency subdata after 101 divisions of the first division module is stored into respectively in the corresponding display buffer unit according to the voice data reproduction time.
Wherein, the quantity of display buffer unit equals the number of particulate pixels of audio volume control viewing area, can guarantee all corresponding display buffer unit of each audio frequency subdata like this.
Store into respectively in the corresponding display buffer unit according to the voice data reproduction time, can set as required, such as first audio frequency subdata section is stored in first display buffer unit, second audio frequency subdata section stores in second display buffer unit, and the like.
In specific implementation process, if the capacity of an audio frequency subdata section is greater than a display buffer unit, be all data that each display buffer unit can not storing audio subdata section, then first processing module 102 extracts the data that equal each display buffer cell capability from each audio frequency subdata section, and stores into respectively in the corresponding cache unit according to the voice data reproduction time.
If do not preestablish the capacity of display buffer unit, then need to determine the capacity of display buffer unit according to following formula:
Buffer unit total volume=(display buffer element number+buffer unit quantity to be shown) * buffer unit capacity
First processing module 102 can be extracted in order, also can random extraction.
Such as: each display buffer cell capability is 10k, each audio frequency subdata section is 1M, then can extract the data of 10k from audio frequency subdata section starting position backward, also can extract the data of 10k from a certain position in the middle of the audio frequency subdata section backward, can also from audio frequency subdata section, extract the data of 10k immediately.
Drafting module 103 is used for according to the voice data reproduction time, and the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
Drafting module 103 can adopt the strategy that is averaged to draw the voice data waveform, promptly calculates the mean value of the audio frequency subdata section in each display buffer unit, according to the mean value drawing waveforms.
Need to prove, the strategy that present embodiment is not limited to be averaged, the strategy of any drafting voice data waveform all is suitable for present embodiment.
Wherein, embodiment of the invention drawing audio waveforms device can further include: second divides the module 104 and second processing module 105.
Second divides module 104, when being used for the corresponding audio data being arranged in audio volume control zone to be shown, number of particulate pixels displaying audio data according to size of audio data and determination module 100 determined is divided into a plurality of audio frequency subdata sections with audio volume control regional corresponding audio data to be shown.
Wherein, audio volume control zone to be shown can be after the audio volume control viewing area and/or before, the size in audio volume control zone to be shown can be set as required, bigger such as internal memory, then can be provided with audio volume control zone to be shown bigger, the quantity of corresponding buffer unit to be shown can increase.
The mode that second mode and first of dividing module 104 divisions is divided module 101 divisions is similar, repeats no more.
Second processing module 105 is used for the different audio frequency subdata section after 104 divisions of the second division module is stored into respectively in the corresponding buffer unit to be shown according to the voice data reproduction time.
The processing mode of the processing mode of second processing module 105 and first processing module 102 is similar, repeats no more.
Because the user is when processing audio, need drag the audio volume control viewing area back and forth, and floating of dragging is not very big, might the audio volume control viewing area corresponding audio data after the user moves to be stored in the buffer unit like this, such as the audio volume control viewing area corresponding audio data after moving all in buffer unit, promptly a part is in the display buffer unit, and a part also might be all in buffer unit to be shown in buffer unit to be shown; Audio volume control viewing area corresponding audio data part after perhaps moving is in buffer unit.
Can guarantee after display window moves like this, can not need from disk, to read or only from disk, read a part of data, further reduced mutual with disk, accelerated the speed of drawing waveforms, and because the voice data of the audio volume control buffer unit to be shown after the conversion has part is before the voice data of display buffer unit, like this when the mobile forward audio volume control of user viewing area, can reduce mutual with disk, realize showing in real time audio volume control.
Wherein, for the situation in buffer unit all of the audio volume control viewing area corresponding audio data after moving, embodiment of the invention drawing audio waveforms device can further include: first modular converter 106.
First modular converter 106, the audio volume control viewing area corresponding audio data that are used for after moving all are stored in buffer unit, with the buffer unit of the audio volume control viewing area after moving as the display buffer unit, as buffer unit to be shown, notice drafting module 103 is drawn audio volume controls with other buffer unit.
Drafting module 103 will be drawn the waveform of the audio volume control viewing area corresponding audio data after moving like this.
Wherein, for the situation of an audio volume control viewing area corresponding audio data part in buffer unit after moving, embodiment of the invention drawing audio waveforms device can further include: the 3rd divides module 107, removing module 108, the 3rd processing module 109 and second modular converter 110.
The 3rd divides module 107, the audio volume control viewing area corresponding audio data portion that is used for after moving is stored in buffer unit, the number of particulate pixels displaying audio data of determining according to size of audio data and determination module 100, the voice data in the buffer unit of not being stored in to the audio volume control viewing area correspondence after moving is divided into a plurality of audio frequency subdata sections.
Because the part voice data of the audio volume control viewing area correspondence after moving is not cached in the buffer unit, so the 3rd division module 107 need be divided this part data.
The mode that the 3rd mode and first of dividing module 107 divisions is divided module 101 divisions is similar, repeats no more.
Removing module 108 is used for deleting from buffer unit, the audio volume control that show in need the audio volume control viewing area after moving, corresponding audio subdata section.
Wherein, after moved the audio volume control viewing area, the buffer unit of audio volume control viewing area will change certainly, and having a part is to move preceding display buffer unit, and another part is the buffer unit to be shown before moving; Perhaps be buffer unit to be shown all.No matter which kind of situation, some buffer unit of capital does not have the audio volume control viewing area corresponding audio data after storage is moved, this just need could store the voice data of dividing the deletion of the voice data in this part buffer unit into these buffer units in.
The 3rd processing module 109 is used for the different audio frequency subdata section after 107 divisions of the 3rd division module is stored into respectively according to the voice data reproduction time in the buffer unit of corresponding deletion audio frequency subdata section.
The processing mode of the processing mode of the 3rd processing module 109 and first processing module 102 is similar, repeats no more.
Second modular converter 110 is used for buffer unit with the audio volume control viewing area after moving as the display buffer unit, and as buffer unit to be shown, notice drafting module 103 is drawn audio volume controls with other buffer unit.
Drafting module 103 will be drawn the waveform of the audio volume control viewing area corresponding audio data after moving like this.
Wherein, embodiment of the invention drawing audio waveforms device can further include: notification module 111.
Notification module 111 is used for after the demonstration granularity of audio volume control viewing area changes, and notice determination module 100 is determined number of particulate pixels displaying audio data according to the demonstration granularity after changing.
Change owing to show granularity, make that number of particulate pixels displaying audio data is also corresponding to change, thereby need redefine number of particulate pixels displaying audio data.
As shown in Figure 2, the method for embodiment of the invention drawing audio waveforms comprises the following steps:
Step 200, determine number of particulate pixels displaying audio data.
Wherein, can determine number of particulate pixels displaying audio data according to following formula:
N pix = min ( N , N × T 1 T 2 )
N PixBe number of particulate pixels displaying audio data, N is the number of particulate pixels of audio volume control viewing area, T 1Be the time span of voice data, T 2Time span for particulate pixels.
Step 201, according to the number of particulate pixels displaying audio data that size of audio data and step 200 are determined, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections.
Wherein, when number of particulate pixels displaying audio data is not less than the number of particulate pixels of audio volume control viewing area, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections according to following formula:
Figure S2008101172334D00092
During less than the number of particulate pixels of audio volume control viewing area, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections in number of particulate pixels displaying audio data according to following formula:
Concrete, calculate the voice data position that begins according to following formula:
offset=T start×BytesPerSecond
Wherein, T StartBe the start time (second) that shows, BytesPerSecond is the bytes per second of file.
Because the starting position of audio volume control viewing area might not be the starting position of voice data, so will determine specifically to begin to show from which position of voice data.
Begin from the position of determining then to divide audio frequency subdata section, finish up to audio volume control viewing area corresponding audio data are all divided according to Step (audio frequency subdata section capacity).
The waveform of a audio frequency subdata after the audio volume control viewing area particulate pixels demonstration is divided like this.
Step 202, the different audio frequency subdata section after will dividing store into respectively in the corresponding display buffer unit according to the voice data reproduction time.
Wherein, the quantity of display buffer unit equals the number of particulate pixels of audio volume control viewing area, can guarantee all corresponding display buffer unit of each audio frequency subdata like this.
Store into respectively in the corresponding display buffer unit according to the voice data reproduction time, can set as required, store in first display buffer unit such as first audio frequency subdata section, second audio frequency subdata section stores in second display buffer unit, and the like.
In specific implementation process, if the capacity of an audio frequency subdata section is greater than a display buffer unit, be all data that each display buffer unit can not storing audio subdata section, then from each audio frequency subdata section, extract the data that equal each display buffer cell capability, and store into respectively in the corresponding display buffer unit according to the voice data reproduction time.
If do not preestablish the capacity of display buffer unit, then need to determine the capacity of display buffer unit according to following formula:
Buffer unit total volume=(display buffer element number+buffer unit quantity to be shown) * buffer unit capacity
Can extract in order in the step 202, also can random extraction.
Such as: each display buffer cell capability is 10k, each audio frequency subdata section is 1M, then can extract the data of 10k from audio frequency subdata section starting position backward, also can extract the data of 10k from a certain position in the middle of the audio frequency subdata section backward, can also from audio frequency subdata section, extract the data of 10k immediately.
Step 203, according to the voice data reproduction time, the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
In the step 203, can adopt the strategy that is averaged to draw the voice data waveform, promptly calculate the mean value of the audio frequency subdata section in each display buffer unit, according to the mean value drawing waveforms.
Need to prove, the strategy that present embodiment is not limited to be averaged, the strategy of any drafting voice data waveform all is suitable for present embodiment.
Wherein, when the corresponding audio data being arranged, can further include after the step 200 in audio volume control zone to be shown:
Step S1, according to the number of particulate pixels displaying audio data that size of audio data and step 200 are determined, audio volume control regional corresponding audio data to be shown are divided into a plurality of audio frequency subdata sections.
Wherein, audio volume control zone to be shown can be after the audio volume control viewing area and/or before, the size in audio volume control zone to be shown can be set as required, bigger such as internal memory, then can be provided with audio volume control zone to be shown bigger, the quantity of corresponding buffer unit to be shown can increase.
The mode that mode that step S1 divides and step 201 are divided is similar, repeats no more.
Step S2, the different audio frequency subdata section after will dividing store into respectively in the corresponding buffer unit to be shown according to the voice data reproduction time.
The processing mode of step S1 and the processing mode of step 201 are similar, repeat no more.
Because the user is when processing audio, need drag the audio volume control viewing area back and forth, and floating of dragging is not very big, might the audio volume control viewing area corresponding audio data after the user moves to be stored in the buffer unit like this, such as the audio volume control viewing area corresponding audio data after moving all in buffer unit, promptly a part is in the display buffer unit, and a part also might be all in buffer unit to be shown in buffer unit to be shown; Audio volume control viewing area corresponding audio data part after perhaps moving is in buffer unit.
Can guarantee after display window moves like this, can not need from disk, to read or only from disk, read a part of data, further reduced mutual with disk, accelerated the speed of drawing waveforms, and because the voice data of the audio volume control buffer unit to be shown after the conversion has part is before the voice data of display buffer unit, like this when the mobile forward audio volume control of user viewing area, can reduce mutual with disk, realize showing in real time audio volume control.
Wherein, for the situation in buffer unit all of the audio volume control viewing area corresponding audio data after moving, the method for embodiment of the invention drawing audio waveforms can further include:
The buffer unit of step a204, the audio volume control viewing area after will moving is as the display buffer unit, with other buffer unit as buffer unit to be shown.
Step a205, according to the voice data reproduction time, the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
So just realized drawing the waveform of the audio volume control viewing area corresponding audio data after moving.
Wherein, for the situation of an audio volume control viewing area corresponding audio data part in buffer unit after moving, the method for embodiment of the invention drawing audio waveforms can further include:
Step b204, the number of particulate pixels displaying audio data of determining according to size of audio data and step 200, the voice data in the buffer unit of not being stored in to audio volume control viewing area correspondence is divided into a plurality of audio frequency subdata sections.
Because the part voice data of the audio volume control viewing area correspondence after moving is not cached in the buffer unit, so need divide this part data.
The mode of the mode that step b204 divides and the division of step 201 is similar, repeats no more.
Step b205, from buffer unit, delete the audio volume control that need in the audio volume control viewing area after moving, show not, corresponding audio subdata section.
Wherein, after moved the audio volume control viewing area, the buffer unit of audio volume control viewing area will change certainly, and having a part is to move preceding display buffer unit, and another part is the buffer unit to be shown before moving; Perhaps be buffer unit to be shown all.No matter which kind of situation, some buffer unit of capital does not have the audio volume control viewing area corresponding audio data after storage is moved, this just need could store the voice data of dividing the deletion of the voice data in this part buffer unit into these buffer units in.
Step b206, the different audio frequency subdata section after will dividing store into respectively according to the voice data reproduction time in the buffer unit of corresponding deletion audio frequency subdata section.
Buffer unit in step b207, the audio volume control viewing area after will moving is as the display buffer unit, with other buffer unit as buffer unit to be shown.
Step b208, according to the voice data reproduction time, the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
So just realized drawing the waveform of the audio volume control viewing area corresponding audio data after moving.
Wherein, if the demonstration granularity of audio volume control viewing area changes, then re-execute step 200.
Change owing to show granularity, make that number of particulate pixels displaying audio data is also corresponding to change, thereby need redefine number of particulate pixels displaying audio data.
As shown in Figure 3A, in the embodiment of the invention cache module synoptic diagram, suppose that the audio volume control viewing area needs three display buffer unit (being numbered 1,2,3), the pre-display buffer of the audio volume control of setting unit has two (being numbered 4,5).The quantity that need to prove buffer unit in the practical operation is very many, just illustrates here.
Wherein, the capacity of each buffer unit is all identical with structure, and the voice data of whole buffer unit storage is continuous in time.
Wherein, the reference position of drawing waveforms of having stood guard indicator marker, like this from the pointer position of standing guard, with after the voice data of three buffer units (i.e. the 1st, 2 and 3 buffer units) be depicted as waveform.
Suppose that the user has dragged the audio volume control viewing area 1 pixel backward on the basis of Fig. 3 A, shown in Fig. 3 B, variation has taken place and (has promptly become the 2nd in the buffer unit of whole audio volume control viewing area, 3 and 4 buffer units), at this moment the pointer of standing guard the 1st buffer unit that moves right, because the audio volume control viewing area corresponding audio data after moving all are stored in buffer unit the (promptly the 2nd, 3 and 4 buffer units) in, so from the pointer position of standing guard, with after three buffer units the (promptly the 2nd, 3 and 4 buffer units) voice data is depicted as waveform, and at this moment the 1st and 5 buffer units are buffer unit to be shown.
Suppose that the user has dragged the audio volume control viewing area 3 pixels backward on the basis of Fig. 3 A, shown in Fig. 3 C, variation has taken place and (has promptly become the 4th, 5 and 1 buffer unit in the buffer unit of whole audio volume control viewing area, because the restriction of buffer unit quantity, so recycle buffer unit), the pointer of at this moment standing guard the 4th buffer unit that moves right.
Because the audio volume control viewing area corresponding audio data division after moving is stored in the buffer unit (i.e. the 4th and 5 buffer units), so from disk, read an audio frequency subdata section audio frequency subdata section afterwards of the 5th buffer unit buffer memory, and this audio frequency subdata section stored in the 1st buffer unit, disconnect the bidirectional pointer of the 1st and the 2nd buffer unit, the bidirectional pointer that connects the 1st and the 5th buffer unit simultaneously, at this moment the 1st buffer unit has arrived afterbody.
At this moment from the pointer position of standing guard, with after the voice data of three buffer units (i.e. the 4th, 5 and 1 buffer unit) be depicted as waveform, at this moment the 2nd and 3 buffer units are buffer unit to be shown.
Need to prove that method that the audio volume control viewing area is moved to the left and the method for introducing above that moves right are similar, repeat no more.
As shown in Figure 4, the method after move embodiment of the invention audio volume control viewing area comprises the following steps:
Step 400, user move the audio volume control viewing area, promptly mobile to the left or to the right audio volume control viewing area or 3dpa waveform viewing area immediately.
Step 401, check whether audio volume control viewing area corresponding audio data all are stored in the buffer unit, if then execution in step 407; Otherwise, execution in step 402.
Step 402, check audio volume control viewing area corresponding audio data whether part be stored in the buffer unit, if then execution in step 403; Otherwise, execution in step 405.
Step 403, the audio frequency subdata section that the audio volume control viewing area is not had store in the corresponding cache unit.
Buffer unit in step 404, the audio volume control viewing area after will moving is as the display buffer unit, with other buffer unit as buffer unit to be shown, execution in step 407.
Step 405, according to size of audio data and number of particulate pixels displaying audio data, audio volume control viewing area and audio volume control regional corresponding audio data to be shown are divided into a plurality of audio frequency subdata sections.
The different audio frequency subdata section of step 406, the audio volume control viewing area correspondence after will dividing stores into respectively in the corresponding display buffer unit according to the voice data reproduction time; With the corresponding different audio frequency subdata section in the zone to be shown of the audio volume control after dividing, store into respectively in the corresponding buffer unit to be shown according to the voice data reproduction time.
Step 407, the pen travel of will standing guard are to first display buffer unit, audio volume control viewing area.
Step 408, according to the audio frequency subdata section in the display buffer unit of audio volume control viewing area, be depicted as audio volume control.
As shown in Figure 5, the embodiment of the invention shows that the adjusted method of granularity comprises the following steps:
Step 500, user adjust the demonstration granularity.
Step 501, according to adjusted demonstration granularity, determine number of particulate pixels displaying audio data.Wherein, according to N pix = min ( N , N × T 1 T 2 ) Determine number of particulate pixels displaying audio data.
Step 502, according to the number of particulate pixels displaying audio data of determining, determine the capacity of display buffer unit.
Wherein, determine the capacity of display buffer unit according to following formula:
Buffer unit total volume=(display buffer element number+buffer unit quantity to be shown) * buffer unit capacity.
Step 503, according to size of audio data and adjusted number of particulate pixels displaying audio data, audio volume control viewing area and audio volume control regional corresponding audio data to be shown are divided into a plurality of audio frequency subdata sections.
The different audio frequency subdata section of step 504, the audio volume control viewing area correspondence after will dividing stores into respectively in the corresponding display buffer unit according to the voice data reproduction time; With the corresponding different audio frequency subdata section in the zone to be shown of the audio volume control after dividing, store into respectively in the corresponding buffer unit to be shown according to the voice data reproduction time.
Step 505, with the audio frequency subdata section in each display buffer unit, be depicted as audio volume control.
The sequence of steps that provides among the said method embodiment is provided, and the scheme that provides by the embodiment of the invention is provided those skilled in the art, expects other sequence of steps, thereby can realize the purpose identical with the present invention.
From the foregoing description as can be seen: the embodiment of the invention is determined number of particulate pixels displaying audio data, and described particulate pixels is used to show the audio volume control of voice data; According to size of audio data and described number of particulate pixels displaying audio data, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections; With the different audio frequency subdata section after dividing, store into respectively in the corresponding display buffer unit according to the voice data reproduction time; According to described voice data reproduction time, with the audio frequency subdata section in the display buffer unit of correspondence, be depicted as audio volume control, no matter because file size, the voice data of audio volume control viewing area can be stored in the internal memory, thereby accelerated the speed of processing audio data, improved work efficiency, if and the data of the user audio volume control viewing area of moving all or part of in display buffer unit and buffer unit to be shown, thereby do not need from disk, to read or only from disk, read a part of data, operate the required time thereby reduced, and realized the audio volume control after real-time explicit user is handled with disk interactive data quantity and user.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (15)

1. the method for a drawing audio waveforms is characterized in that, this method comprises:
Determine number of particulate pixels displaying audio data, described particulate pixels is used to show the audio volume control of voice data;
According to size of audio data and described number of particulate pixels displaying audio data, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections;
With the different audio frequency subdata section after dividing, store into respectively in the corresponding display buffer unit according to the voice data reproduction time;
According to described voice data reproduction time, the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
2. the method for claim 1 is characterized in that, this method also comprises:
When there are the corresponding audio data in audio volume control zone to be shown,, audio volume control regional corresponding audio data to be shown are divided into a plurality of audio frequency subdata sections according to size of audio data and described number of particulate pixels displaying audio data;
The different audio frequency subdata section that to divide when there are the corresponding audio data in audio volume control zone to be shown stores into respectively in the corresponding buffer unit to be shown according to the voice data reproduction time.
3. method as claimed in claim 1 or 2, it is characterized in that, if the capacity of each buffer unit is less than the capacity of each audio frequency subdata section, then from each audio frequency subdata section, extract the data that equal each buffer unit capacity, and store into respectively in the corresponding cache unit according to the voice data reproduction time.
4. method as claimed in claim 2 is characterized in that, this method also comprises:
Audio volume control viewing area corresponding audio data after moving all are stored in the buffer unit, with the buffer unit of the audio volume control viewing area after moving as the display buffer unit, with other buffer unit as buffer unit to be shown;
According to described voice data reproduction time, the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
5. as claim 2 or 4 described methods, it is characterized in that this method also comprises:
Audio volume control viewing area corresponding audio data portion after moving is stored in the buffer unit, according to size of audio data and described number of particulate pixels displaying audio data, the voice data in the buffer unit of not being stored in audio volume control viewing area correspondence is divided into a plurality of audio frequency subdata sections;
From buffer unit, delete the audio volume control that show in need the audio volume control viewing area after moving, corresponding audio subdata section;
The different audio frequency subdata section that obtains after voice data in the buffer unit is divided that is not stored in audio volume control viewing area correspondence stores into respectively according to the voice data reproduction time in the buffer unit of corresponding deletion audio frequency subdata section;
With the buffer unit in the audio volume control viewing area after moving as the display buffer unit, with other buffer unit as buffer unit to be shown;
According to described voice data reproduction time, the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
6. the method for claim 1 is characterized in that, this method also comprises:
After the demonstration granularity of audio volume control viewing area changes,, determine number of particulate pixels displaying audio data according to the demonstration granularity after changing;
According to size of audio data and described number of particulate pixels displaying audio data, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections;
The different audio frequency subdata section of dividing after will changing in the demonstration granularity of audio volume control viewing area stores into respectively in the corresponding display buffer unit according to the voice data reproduction time;
According to described voice data reproduction time, the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
7. as claim 1 or 6 described methods, it is characterized in that, when number of particulate pixels displaying audio data is not less than the number of particulate pixels of audio volume control viewing area, according to following formula audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections according to following formula:
Figure FSB00000320979900021
During less than the number of particulate pixels of audio volume control viewing area, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections in number of particulate pixels displaying audio data according to following formula:
8. a drawing audio waveforms device is characterized in that, this device comprises:
Determination module is used for determining number of particulate pixels displaying audio data that described particulate pixels is used to show the audio volume control of voice data;
First divides module, is used for according to size of audio data and described number of particulate pixels displaying audio data, and audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections;
First processing module is used for the different audio frequency subdata section after dividing is stored into respectively in the corresponding display buffer unit according to the voice data reproduction time;
Drafting module is used for according to described voice data reproduction time, and the audio frequency subdata section with in the display buffer unit of correspondence is depicted as audio volume control.
9. device as claimed in claim 8 is characterized in that, this device also comprises:
Second divides module, when being used for the corresponding audio data being arranged in audio volume control zone to be shown, according to size of audio data and described number of particulate pixels displaying audio data, audio volume control regional corresponding audio data to be shown are divided into a plurality of audio frequency subdata sections;
Second processing module is used for the different audio frequency subdata section after the described second division Module Division is stored into respectively in the corresponding buffer unit to be shown according to the voice data reproduction time.
10. device as claimed in claim 8 is characterized in that, described first processing module also is used for:
At the capacity of each display buffer unit capacity less than each audio frequency subdata section, from each audio frequency subdata section, extract the data that equal each display buffer cell capability, and store into respectively in the corresponding display buffer unit according to the voice data reproduction time.
11. device as claimed in claim 9 is characterized in that, described second processing module also is used for:
At the capacity of each buffer unit to be shown capacity less than each audio frequency subdata section, from each audio frequency subdata section, extract the data that equal each buffer unit capacity to be shown, and store into respectively in the corresponding buffer unit to be shown according to the voice data reproduction time.
12. device as claimed in claim 9 is characterized in that, this device also comprises:
First modular converter, the audio volume control viewing area corresponding audio data that are used for after moving all are stored in buffer unit, with the buffer unit of the audio volume control viewing area after moving as the display buffer unit, as buffer unit to be shown, notify described drafting module to draw audio volume control other buffer unit.
13., it is characterized in that this device also comprises as claim 9 or 12 described devices:
The 3rd divides module, the audio volume control viewing area corresponding audio data portion that is used for after moving is stored in buffer unit, according to size of audio data and described number of particulate pixels displaying audio data, the voice data in the buffer unit of not being stored in the audio volume control viewing area correspondence after moving is divided into a plurality of audio frequency subdata sections;
Removing module is used for deleting from buffer unit, the audio volume control that show in need the audio volume control viewing area after moving, corresponding audio subdata section;
The 3rd processing module, the different audio frequency subdata section that obtains after being used for the voice data that is not stored in buffer unit of audio volume control viewing area correspondence divided stores into respectively according to the voice data reproduction time in the buffer unit of corresponding deletion audio frequency subdata section;
Second modular converter is used for buffer unit with the audio volume control viewing area after moving as the display buffer unit, as buffer unit to be shown, notifies described drafting module to draw audio volume control other buffer unit.
14. device as claimed in claim 8 is characterized in that, this device also comprises:
Notification module is used for after the demonstration granularity of audio volume control viewing area changes, and notifies described determination module according to the demonstration granularity after changing, and determines number of particulate pixels displaying audio data.
15. device as claimed in claim 8, it is characterized in that, when number of particulate pixels displaying audio data is not less than the number of particulate pixels of audio volume control viewing area, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections according to following formula:
Figure FSB00000320979900041
During less than the number of particulate pixels of audio volume control viewing area, audio volume control viewing area corresponding audio data are divided into a plurality of audio frequency subdata sections in number of particulate pixels displaying audio data according to following formula:
Figure FSB00000320979900051
CN2008101172334A 2008-07-25 2008-07-25 Method and device for drawing audio waveforms Expired - Fee Related CN101634588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101172334A CN101634588B (en) 2008-07-25 2008-07-25 Method and device for drawing audio waveforms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101172334A CN101634588B (en) 2008-07-25 2008-07-25 Method and device for drawing audio waveforms

Publications (2)

Publication Number Publication Date
CN101634588A CN101634588A (en) 2010-01-27
CN101634588B true CN101634588B (en) 2011-02-09

Family

ID=41593847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101172334A Expired - Fee Related CN101634588B (en) 2008-07-25 2008-07-25 Method and device for drawing audio waveforms

Country Status (1)

Country Link
CN (1) CN101634588B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375811B (en) * 2013-08-13 2019-04-26 腾讯科技(深圳)有限公司 A kind of sound effect treatment method and device
CN105100806A (en) * 2015-07-23 2015-11-25 柳州龙辉科技有限公司 Compression and issuing method of super-large scale audio and video data
CN107172483A (en) * 2017-05-05 2017-09-15 广州华多网络科技有限公司 A kind of tonequality under live scene knows method for distinguishing, device and terminal device
CN109712220A (en) * 2018-11-15 2019-05-03 贵阳语玩科技有限公司 A kind of end iOS drawing audio waveforms method and apparatus and computer readable storage medium
CN114003456A (en) * 2021-09-26 2022-02-01 芯华章科技股份有限公司 Waveform data display method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5675778A (en) * 1993-10-04 1997-10-07 Fostex Corporation Of America Method and apparatus for audio editing incorporating visual comparison
CN1321964A (en) * 2000-05-02 2001-11-14 莫绍祥 Sound and beat image display method and equipment
CN1779777A (en) * 2005-08-16 2006-05-31 深圳市彩秀科技有限公司 Audio-frequency editing and converting method by cutting audio-frequency wave form
KR20070120359A (en) * 2006-06-19 2007-12-24 엘지전자 주식회사 Apparatus displaying sound wave and method using the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5675778A (en) * 1993-10-04 1997-10-07 Fostex Corporation Of America Method and apparatus for audio editing incorporating visual comparison
CN1321964A (en) * 2000-05-02 2001-11-14 莫绍祥 Sound and beat image display method and equipment
CN1779777A (en) * 2005-08-16 2006-05-31 深圳市彩秀科技有限公司 Audio-frequency editing and converting method by cutting audio-frequency wave form
KR20070120359A (en) * 2006-06-19 2007-12-24 엘지전자 주식회사 Apparatus displaying sound wave and method using the same

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
鲍永刚,等.Wave文件波形编辑方法.《小型微型计算机系统》.1997,第18卷(第1期),
鲍永刚等.Wave文件波形编辑方法.《小型微型计算机系统》.1997,第18卷(第1期), *

Also Published As

Publication number Publication date
CN101634588A (en) 2010-01-27

Similar Documents

Publication Publication Date Title
CN101634588B (en) Method and device for drawing audio waveforms
US9153286B2 (en) Information processing apparatus, data division method, and data division program
KR101725887B1 (en) Method and apparatus for searching contents in touch screen device
US7720349B2 (en) Image processing apparatus, method, and program, and program storage medium
CN107181976A (en) A kind of barrage display methods and electronic equipment
WO2002015162A3 (en) System and method for displaying large images with reduced capacity buffer, file format conversion, user interface with zooming and panning, and broadcast of different images
CN103297739B (en) A kind of audio frequency and video method for recording and device
RU2009148314A (en) INDEX BASED ON GRAPHIC MOSAIC ELEMENTS WITH EXTENSION OF CELLS
CN104219584A (en) Reality augmenting based panoramic video interaction method and system
CN103809891A (en) Page switching method and device
CN101867719A (en) Operating control device, method of controlling operation thereof
CN103544977B (en) Video positioning apparatus and method based on touch control
CN104811812A (en) Audio and video play progress control method, apparatus and system
CN105898523A (en) Video playing method and video playing device
CN102855132A (en) Method and system for selection of graphic objects
CN105933736A (en) Log processing method and device
CN105659587A (en) A data storage method for a monitor system and a system thereof
CN104601535B (en) Method for processing video frequency and system
CN105578258A (en) Method and device of video preprocessing and video playback
CN102741793B (en) Object image display device, object image display method, object image display program
CN103019575B (en) A kind of mobile terminal and information processing method thereof
CN102088635A (en) Method for recording historic search keywords in network television
CN104301699A (en) Image processing method and device
CN103098003A (en) Method, software and apparatus for displaying data objects
CN104219578A (en) Video processing method and video processing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110209

Termination date: 20190725