CN102208208A - Lossless audio playing method and audio player - Google Patents

Lossless audio playing method and audio player Download PDF

Info

Publication number
CN102208208A
CN102208208A CN2010101489286A CN201010148928A CN102208208A CN 102208208 A CN102208208 A CN 102208208A CN 2010101489286 A CN2010101489286 A CN 2010101489286A CN 201010148928 A CN201010148928 A CN 201010148928A CN 102208208 A CN102208208 A CN 102208208A
Authority
CN
China
Prior art keywords
frequency
audio
data
clock
bit
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.)
Granted
Application number
CN2010101489286A
Other languages
Chinese (zh)
Other versions
CN102208208B (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.)
Zebondtechnology Co Ltd Fuoshan
Original Assignee
Zebondtechnology Co Ltd Fuoshan
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 Zebondtechnology Co Ltd Fuoshan filed Critical Zebondtechnology Co Ltd Fuoshan
Priority to CN201010148928.6A priority Critical patent/CN102208208B/en
Publication of CN102208208A publication Critical patent/CN102208208A/en
Application granted granted Critical
Publication of CN102208208B publication Critical patent/CN102208208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention, relating to the field of audio playing, discloses a lossless audio playing method and an audio player. The playing method comprises the following steps: acquiring a lossless compression audio file; decoding the lossless compression audio file to obtain decoded data; for each decoded datum with a width of W, storing each W/2 datum in a buffer queue of a decoder from high to low of the decoded data; reading the decoded data from the buffer queue of the decoder, shifting out data according to bit clock from high position to low position successively by a shift register and outputting an audio data sequence to an analog-to-digital converter 405 until finishing reading to form the audio data sequence; modifying the frequency of a reference clock resource in an audio data interface from default to W*2*n*f Hertz, frequency dividing outputting a target sound channel and bit clock with frequency of F, W*2F Hertz to the reference clock resource, and playing the audio data sequence according to the target sound channel clock. The audio frequency of data bits with high sampling rate is played based on low hardware cost.

Description

Lossless audio player method and audio player
Technical field
The present invention relates to field of audio play, relate in particular to a kind of audio frequency playing method and audio player.
Background technology
Important hearing enjoying in music people's life.Player mainly constitutes along the demoder that connects in succession, DAB output interface, stereo DAC by following at present, and on the identical basis of audio file, voice playing is decided by the hardware performance of demoder, DAB output interface.Present demoder, DAB output interface only support that generally playing sample frequency is 48 KHz, the sampling bit wide is 16 a audio file, can support to play sample frequency than demoder, the DAB output interface of higher-end is 96 KHz, and the sampling bit wide is 16 a audio file.The audio sample rate of existing player plays is low, the data bit figure place is lower, causes that the audio loss play is big, total harmonic distortion is higher, can not satisfy the demand to the crowd who pursues high music quality.
In the prior art, the restriction that the voice playing quality of audio player is subjected to hardware cost is bigger, improves the audio frequency of playing higher sampling, higher data bit by hardware performance merely, can cause the production cost of enterprise excessive, is not suitable for actual promotion and implementation.
Summary of the invention
The present invention's first purpose is to provide: a kind of method of voice playing, and utilize this method on the basis of low hardware cost, to play the more audio frequency of high sampling rate, higher data bit.
The present invention's second purpose is to provide: a kind of audio player, utilize this player to play the more audio frequency of high sampling rate, higher data bit on the basis of low hardware cost.
The method of a kind of voice playing that the embodiment of the invention provides comprises:
Obtain the lossless compress audio file, the sample frequency of wherein said audio file is designated as the F hertz, and the width of each sampling number certificate is designated as the W position;
The described lossless compress audio file of decoding obtains decoded data;
Wide to each is the decoded data of W position, from the high position of decoded data to low level each W/2 bit data is deposited in the buffer queue of described demoder successively, and the space of every address of described buffer queue is the W/2 position;
The frequency in reference clock source in the described voice data interface is revised as the W*2*n*F hertz by default value, and described n is a natural number;
To described reference clock source frequency division, purpose sound channel clock and the frequency of obtaining frequency respectively and be F are the bit clock of W*2F hertz;
To the described purpose sound channel of the described output of described audio frequency analog to digital converter clock, bit clock;
Read described decoded data from the buffer queue of described demoder, deposit the decoded data that reads in shift register, described shift register is the W/2 position, described shift register is according to the trigger pulse of described bit clock, from a high position to the low level, be shifted successively, export each bit data to the audio frequency analog to digital converter, finish up to reading;
Described audio frequency analog to digital converter is according to described sound channel clock, playing audio data sequence.
Alternatively, the frequency in reference clock source in the described voice data interface is revised as the W*2F hertz by default value,
To described reference clock source frequency division, purpose sound channel clock and the frequency of obtaining frequency respectively and be F are the bit clock of W*2F hertz, specifically comprise:
Described voice data interface is to described reference clock source frequency division, and the first sound channel clock and the frequency of obtaining frequency respectively and be 2F are the bit clock of W*2F hertz, and described voice data interface is exported the described first sound channel clock to external frequency divider;
Described frequency divider is to the described first sound channel clock division, and obtaining frequency is the purpose sound channel clock of F;
To the described purpose sound channel of the described output of described audio frequency analog to digital converter clock, bit clock, specifically:
Described frequency divider is exported described purpose sound channel clock to described audio frequency analog to digital converter,
Described voice data interface is exported described bit clock to described audio frequency analog to digital converter.
Alternatively, the sample frequency of described audio file is 192 KHz, and the width of every sampling number certificate is 32;
Wide to each is the decoded data of W position, each W/2 bit data is deposited successively in the buffer queue of described demoder from the high position of decoded data to low level, specifically:
To described bit wide is 32 decoded data, deposits high 16 bit data in the described decoded data buffer queue of described demoder in, and low 16 bit data with described decoded data deposit described buffer queue in then.
Alternatively, export described audio data sequence to described audio frequency analog to digital converter according to the trigger pulse of described bit clock, specifically:
All export a voice data in the described audio data sequence at each rising edge of described bit clock when arriving to described audio frequency analog to digital converter.
Alternatively, the described audio file that obtains compression, specifically:
Read outside USB flash disk or SD card, obtain the audio file of described compression.
A kind of audio player that present embodiment provides comprises:
Decoder module, the lossless compress audio file that is used to decode obtains decoded data.
Buffer queue is connected with described decoder module, and the space of every address of described buffer queue is the W/2 position, and wherein W is the highest width of each sampling number certificate of audio file of this player support;
Processor is connected with described decoder module, buffer queue respectively, is used for each widely is the decoded data of W position, deposits each W/2 bit data in described buffer queue successively from the high position of decoded data to low level;
Read module is connected with described buffer queue, is used for reading the decoded data of described buffer queue;
Shift register, be connected with described read module, frequency divider, be used for from a high position to the low level, shifting out each bit data successively according to the trigger pulse of described bit clock, to audio frequency analog to digital converter outputting audio data sequence, finish up to reading of data, every address space of described shift register is the W/2 position;
Reference clock source generation module is used for generating the reference clock source according to the frequency of setting;
Clock source frequency setting module is connected with reference clock source generation module, is used for the frequency in described reference clock source is revised as the W*2*n*F hertz by setting value, and wherein, F is the highest sample frequency of the audio file of this player support, and described n is a natural number;
Frequency divider is connected with described reference clock source generation module, and be used for described reference clock source frequency division, respectively output: frequency is that purpose sound channel clock, the frequency of F hertz is the bit clock of W*2F hertz;
Described audio frequency analog to digital converter is used for according to described purpose sound channel clock, playing audio data.
Alternatively, described frequency divider comprises:
First frequency division module is connected with described reference clock source generation module, and be used for described reference clock source frequency division, respectively output: frequency is that the first sound channel clock, the frequency of 2F hertz is the bit clock of W*2F hertz;
Second frequency division module is connected with described first frequency division module, audio frequency analog to digital converter, is used for the described first road clock division, and output frequency is the purpose sound channel clock of F hertz.
Alternatively, the sample frequency of described audio file is 192 KHz, and the width of every sampling number certificate is 32;
The space of every address of described buffer queue is 16,
Described processor, specifically being used for described bit wide is 32 decoded data, deposits high 16 bit data in the described decoded data buffer queue of described demoder in, low 16 bit data with described decoded data deposit described buffer queue in then.
Alternatively, also comprise: USB interface is used for circumscribed USB storage equipment.
Alternatively, also comprise: the SD interface is used for external SD card.
Therefore, use the technical scheme of the embodiment of the invention,, a high position, the low level partition of decoded data are stored by to behind decoder decode, thereby guarantee to help guaranteeing the complete output of audio frequency output supporting harmless storing audio decoded data on the lower hardware of figure place; In addition, the present invention is by revising the frequency in reference clock source, make this reference clock source to obtain the purpose sound channel clock that frequency is F by frequency division, frequency is the bit clock of W*2F, like this, according to the pulse of bit clock bits per inch certificate, form decoded data sequence to audio digital to analog converter output decoder data.At the audio digital to analog converter end can be the purpose sound channel clock played data of F according to frequency, the L channel, R channel that guarantees each purpose sound channel clock be corresponding 32 bit data respectively, can realize utilizing the lower hardware of performance realize frequency on the hardware default frequency, data width plays for the data tones frequency file of the audio file of 2 times of hardware supported width.
Such as can utilize support 96 KHz, 16 hardware and realize sample frequency is F=192 KHz hertz the harmless broadcast of the audio file of the width W of each sampling number certificate=32.As seen, utilize the present embodiment method on the basis of low hardware cost, to play the more audio frequency of high sampling rate, higher data bit.
And the sound channel clock of raising musical audio digital interface output, bit clock frequency, and in order to make the L channel that is input to the sound channel clock of importing in the audio frequency analog to digital converter, the R channel clock respectively with the L channel data of audio file of input, right data is corresponding, so that playing the harmless lossless compress audio file of playing of end, at musical audio digital interface output channels clock (the first sound channel clock), behind the bit clock, the first sound channel clock to its output carries out frequency division again, divide the frequency purpose sound channel clock consistent that occur frequently with the sample frequency of audio file, be input to audio digital to analog converter purpose sound channel clock frequency this moment is F, bit clock frequency is W*2F
As seen,
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, does not constitute to improper qualification of the present invention, in the accompanying drawings:
The method flow synoptic diagram of a kind of voice playing that Fig. 1 provides for the embodiment of the invention 1;
The corresponding synoptic diagram of the purpose sound channel clock that Fig. 2 receives for the audio frequency analog to digital converter that provides in the embodiment of the invention 1, bit clock, data sequence;
The method flow synoptic diagram of the another kind of voice playing that Fig. 3 provides for the embodiment of the invention 3;
The structural representation of a kind of audio player that Fig. 4 provides for the embodiment of the invention 3;
The structural representation of a kind of audio player that Fig. 5 provides for the embodiment of the invention 4.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific embodiment, be used for explaining the present invention in this illustrative examples of the present invention and explanation, but not as a limitation of the invention.
Embodiment 1:
A kind of audio frequency playing method schematic flow sheet that Fig. 1 provides for present embodiment.Referring to shown in Figure 1, this method mainly may further comprise the steps:
Step 101: obtain the lossless compress audio file.
There are two kinds of compress modes in the audio compression field, is respectively lossy compression method and lossless compress.Our common MP3 that arrives, WMA, OGG are lossy compression method, and lossy compression method is as the term suggests be exactly to reduce audio sampling frequency and bit rate, and the audio file of output can be littler than original.Lossless compress just is exactly the audio format that voice signal is compressed with having no to lose.Lossless compress can be preserved under the prerequisite of all data of original 100%, littler with the volume compression of audio file, and after the audio file after will compress reduces, can realize the size identical, identical code check with source file.
This audio file both can be pre-stored in the player, also can be stored in the external memory devices such as external USB flash disk or SD card by USB interface or SD card.
This lossless compress audio file is the audio file of high sampling rate, higher data bit, and the sample frequency of establishing the audio file of this lossless compress is the F hertz, and the width of each sampling number certificate is the W position.
Step 102: the lossless compress audio file is decoded, obtain decoded data.
Decoding as used herein can be carried out according to the form of audio file, can adopt various coding/decoding method of the prior art to carry out, and obtains the decoded data of the size identical with source audio file, identical code check behind the coding that decompresses.
Such as being F=192 KHz hertz for sample frequency, the audio file of the width W of each sampling number certificate=32, the form of the decoded data that obtains is shown in following table one:
Table one: the decoded data layout signal of 32 audio file:
32 L channel data 32 right data ...... 32 L channel data 32 L channel data
One of them 32 bit data following (32 L channel data or 32 R channel certificates):
b 31b 29b 28b 27... b 19b 18b 17b 16... b 4b 3b 2b 1b 0(replacing with X down)
Step 103: buffer memory audio data decoder.
Because the width of each sampling number certificate of audio file is the W position, and demoder is only supported the audio coding of W/2 position (the space size of every address of buffer memory wherein only also be W/2 position), if and according to the direct buffer memory of prior art, then can cause the loss of the high W/2 bit data of audio coding, cause playing distortion.
In order to guarantee the free of losses of audio data decoder, the processing below in the process of caching of this step, doing:
Wide for each is the decoded data of W position: this decoded data is splitted into high W/2 position, hangs down the W/2 position, respectively high W/2 position, low W/2 are deposited in the buffer queue of demoder, so that wherein the audio data decoder of W position is finished harmless buffer memory in the decoding of only supporting the W/2 position.
Such as: establishing audio data decoder is 32 decoded datas as shown in Table 1:
1, L channel decoded data X=AB is carried out and computing, obtain low 16 decoded datas, be designated as data A, that is:
A=X&0x0000FFFF,
Obtain low 16 A=b of data X 16... b 4b 3b 2b 1b 0
2, L channel decoded data X is moved to right 16, obtain high 16 decoded datas, be designated as data B, that is:
B=X>>16,
Obtain high 16 B=b of L channel number decoder data X 31b 29b 28b 27... b 19b 18b 17
Then, the buffer queue with high 16, data A, the B low 16 of L channel number decoder data X put into demoder respectively by that analogy, all deposits data in the buffer queue of demoder.
Shown in the data store organisation of the decoder buffer formation table two specific as follows:
Table two: the data store organisation of decoder buffer formation
16 left sides (A)
16 right sides (B)
16 left sides (C)
16 right sides (D)
......
......
Wherein C, D are respectively high 16, low 16 data of R channel number decoder data.
Step 104: the multiple that the frequency values in reference clock source in the voice data interface is revised as the W*2F hertz by default value.
In existing voice data interface, be provided with a reference clock source of having preset clock frequency.
Use in the present embodiment and support the lower voice data interface of clock frequency to play high-quality audio frequency, the output of realization lossless audio, (is the W*2*n*F hertz with the frequency in default reference clock source by the multiple that default value is revised as the W*2F hertz, n is a natural number), wherein F is the sample frequency of lossless compress audio file.
Such as, frequency as the reference clock source of the acquiescence in this voice data interface is 96kHZ, and the sample frequency of the lossless compress audio file of input is 192kHZ, then can but be not limited to the default frequency in the reference clock source in this voice data interface is revised as the multiple of 192*2*32=12288kHZ or 12288kHZkHZ, such as=49.152MHZ.
Step 105: to reference clock source frequency division, output respectively: frequency is that purpose sound channel clock, the frequency of F hertz is the bit clock of W*2F hertz.
Frequency division is carried out in the reference clock source, obtain and export the first sound channel clock (frequency is the 2F hertz), bit clock (frequency is the W*2F hertz) respectively.
Specifically be exemplified below for step 104,105 enforcement:
If the sample frequency of audio file is the width of F=192 KHz hertz, each sampling number certificate is the W position, the frequency of digital audio interface acquiescence is 96 KHz, then execution in step 105 is revised as the 4*96 KHz with the frequency in reference clock source by 96 KHz, i.e. 384 KHz.
Then, frequency division is carried out in the reference clock source that 106 pairs of these frequencies of execution in step are 12288kHZ, and obtaining also, output frequency is that 192 KHz purpose sound channel clocks and frequency are the bit clock of 32*384 KHz (i.e. 12.288 megahertzes).
Because purpose sound channel clock, bit clock derive from an identical reference clock source jointly, then Shu Chu purpose sound channel clock, bit clock keeps synchronous constantly.
Step 106: the voice data interface reads decoded data from the buffer queue of demoder, deposit the decoded data that reads in shift register, shift register is according to the trigger pulse of bit clock, from a high position to the low level, shift out displacement successively, export each bit data to the audio frequency analog to digital converter, read up to decoded data and finish.
The mode that the voice data interface is handled earlier according to the advanced person reads the decoded data in the buffer queue of demoder, the data of the W/2 position of every reading unit, then deposit it in shift register, by the trigger pulse of shift register according to bit clock, from a high position to the low level, shift out each bit data successively, formation outputs to the audio data sequence of audio frequency analog to digital converter, reads up to decoded data to finish.Wherein, this shift register shifts out the one digit number certificate in the time of can arriving at each rising edge of bit clock, realizes according to bit clock output, shifts out the one digit number certificate in the time of also can arriving at each negative edge of bit clock, realizes exporting according to bit clock.
The displacement of the bits per inch certificate of shift register specifically can but be not limited to as follows:
The voice data interface reads the data of decoder buffer formation according to the principle of buffer queue first in first out, the data store organisation of hypothesis decoding device buffer queue as shown in Table 2, then shift register is for data B:b 31b 29b 28b 27... b 19b 18b 17, from b 31Begin to shift out, up to b 17Then, the voice data interface reads in the buffer queue next to data A b 16... b 4b 3b 2b 1b 0, shift register to these data from b 16Begin to shift out, up to b 0Like this, obtain data sequence: b 31b 29b 28b 27... b 19b 18b 17b 16... b 4b 3b 2b 1b 0The voice data interface continues to read the next address data in the buffer queue of demoder, continues to utilize shift register that the data that read are shifted, with one shifts out of data.
Step 107: the audio frequency analog to digital converter is according to purpose sound channel clock, playing audio-fequency data.
At this moment, the purpose sound channel clock that the audio frequency analog to digital converter receives, bit clock, data sequence signal are as shown in Figure 2, wherein the frequency of the signal of purpose sound channel clock is F, and the frequency of bit clock is 32*2F, all corresponding voice data in the drop edge of every bit clock.
Therefore, use the technical scheme of the embodiment of the invention,, a high position, the low level partition of decoded data are stored by to behind decoder decode, thereby guarantee to help guaranteeing the complete output of audio frequency output supporting harmless storing audio decoded data on the lower hardware of figure place; In addition, the present invention is by revising the frequency in reference clock source, make this reference clock source to obtain the purpose sound channel clock that frequency is F by frequency division, frequency is the bit clock of W*2F, like this, according to the pulse of bit clock bits per inch certificate, form decoded data sequence to audio digital to analog converter output decoder data.At the audio digital to analog converter end can be the purpose sound channel clock played data of F according to frequency, the L channel, R channel that guarantees each purpose sound channel clock be corresponding 32 bit data respectively, can realize utilizing the lower hardware of performance realize frequency on the hardware default frequency, data width plays for the data tones frequency file of the audio file of 2 times of hardware supported width.
Such as can utilize support 96 KHz, 16 hardware and realize sample frequency is F=192 KHz hertz the harmless broadcast of the audio file of the width W of each sampling number certificate=32.As seen, utilize the present embodiment method on the basis of low hardware cost, to play the more audio frequency of high sampling rate, higher data bit.
Embodiment 2:
The method flow synoptic diagram of the another kind of voice playing that Fig. 3 provides for the embodiment of the invention, it only is with respect to 1 difference of embodiment:
Step 105 among the embodiment can realize by following substep:
Usually, the reference source clock is default forming in the voice data interface, and its frequency division rule in order to solve its problem, can be adopted the secondary frequency division of present embodiment to obtain purpose sound channel clock by default fixing.
Substep 1051: to reference clock source frequency division, output respectively: frequency values is that the first sound channel clock, the frequency of the multiple of F is the bit clock of W*2F hertz.
Such as can first frequency division obtaining and output frequency value is that the first sound channel clock, the frequency of 2F is the bit clock of W*2F hertz.
Substep 1052:, be the purpose sound channel clock of F to audio frequency D/A converter module output purpose frequency to the first sound channel clock division.
Be provided with frequency divider between digital output interface and audio frequency analog to digital converter, this frequency divider is proceeded frequency division to the first sound channel clock, generates and output purpose sound channel clock, makes that the frequency of purpose sound channel clock is the F hertz.
Because the first sound channel clock, bit clock all derive from same reference clock source synchronously, and purpose sound channel clock derives from the first sound channel clock, so purpose sound channel clock, bit clock are synchronous.
Need to prove, when a frequency division can't obtain frequency and is the bit clock of W*2F, can utilize the thinking of present embodiment to carry out repeatedly frequency division equally and obtain the bit clock of frequency for W*2F.Do not give unnecessary details at this.
Embodiment 3:
The structural representation of a kind of audio player that Fig. 4 provides for present embodiment, referring to shown in Figure 4, the audio player that present embodiment provides mainly comprises with lower member: decoder module 4011, buffer queue 4012, processor 402, read module 4032, frequency divider 404, shift register 4032, reference clock source generation module 4033, clock source frequency setting module 406, audio frequency analog to digital converter 405.Wherein the structure of each several part and annexation are as follows:
The decoder module 4011 lossless compress audio file (establishing its sample frequency is the F hertz, and the width of each sampling number certificate is the W position) that is used to decode obtains audio data decoder.Buffer queue 4012 is connected with decoder module 4011 and is used for storing decoded data under the control of processor 402, and the space of every address of this buffer queue 4012 is the W/2 position.The present invention only analyzes for the situation of W/2 with regard to every address space of buffer queue.Wherein, this decoder module 4011, buffer queue 4012 can be inherited in a demoder 401.
Processor 402 is connected with decoder module 4011, buffer queue 4012 respectively, after decoding obtains decoded data, to each data cell in the decoded data (each is wide to be the decoded data of W position), deposit each W/2 bit data in described buffer queue 4012 successively from the high position of decoded data to low level, the control of 402 pairs of voice datas of this processor can be referring to the description in the step 103 among the embodiment 1.
Read module 4031 is connected with buffer queue 4012, is used for reading the decoded data of buffer queue 4012.
Shift register 4032 is connected with read module 4031, frequency divider 404 respectively, the data that at every turn read for read module 4031, shift register 4032 shifts out each bit data respectively to audio frequency analog to digital converter 405 outputting audio data sequences successively according to the trigger pulse of the bit clock of frequency divider 404 outputs from a high position to the low level, finish up to reading, thereby form the audio data sequence that exports audio frequency analog to digital converter 405 to.Present embodiment is that example describes with regard to every address space of shift register 4032 for the W/2 position.
The principle of work of read module 4031, shift register 4032 in detail can be referring to the description in the step 106 among the embodiment 1.
Reference clock source generation module 4033 is used for generating the reference clock source according to predetermined frequency.
In the present embodiment in order to make the lower data-interface of this default frequency can support the broadcast of the audio file of higher sample frequency, also setting a clock source frequency setting module 406 in this player is connected with frequency generation reference clock source generation module 4033, the frequency modification that is used to revise default reference clock source is the W*2*n*F hertz, and wherein F is the highest sample frequency of the audio file of this player support.Concrete principle can be referring to the description of embodiment step 104
Reference clock source generation module 4033 is connected with frequency divider 404, is used for frequency division is carried out in the reference clock source that generates, and becomes purpose sound channel clock, bit clock.Obtain respectively: frequency is that purpose sound channel clock, the frequency of F hertz is the bit clock of W*2F hertz, and F is the highest sample frequency of the audio file that this player is supported, W is the width of each sampling number certificate of audio file of high support of this player.Concrete principle can be referring to the description of embodiment step 105.
General, read module 4031, reference clock source generation module 4033, frequency divider 404, shift register 4032 can but be not limited to integrated being arranged in the voice data interface 403.
Audio frequency analog to digital converter 405 is used for according to purpose sound channel clock, playing audio data.Concrete principle can be referring to the description in the embodiment step 107.
At this moment, the signal that audio frequency analog to digital converter 405 receives as shown in Figure 2, wherein the frequency of the signal of purpose sound channel clock is F, the frequency of bit clock is 32*2F, all corresponding voice data in the rising edge of every bit clock.
Therefore, use the technical scheme of the embodiment of the invention,, a high position, the low level partition of decoded data are stored by to behind decoder decode, thereby guarantee to help guaranteeing the complete output of audio frequency output supporting harmless storing audio decoded data on the lower hardware of figure place; In addition, the present invention is by revising the frequency in reference clock source, make this reference clock source to obtain the purpose sound channel clock that frequency is F by frequency division, frequency is the bit clock of W*2F, like this, according to the pulse of bit clock bits per inch certificate, form decoded data sequence to audio digital to analog converter output decoder data.At the audio digital to analog converter end can be the purpose sound channel clock played data of F according to frequency, the L channel, R channel that guarantees each purpose sound channel clock be corresponding 32 bit data respectively, can realize utilizing the lower hardware of performance realize frequency on the hardware default frequency, data width plays for the data tones frequency file of the audio file of 2 times of hardware supported width.
Such as can utilize support 96 KHz, 16 hardware and realize sample frequency is F=192 KHz hertz the harmless broadcast of the audio file of the width W of each sampling number certificate=32.As seen, utilize the present embodiment method on the basis of low hardware cost, to play the more audio frequency of high sampling rate, higher data bit.
In addition, convenient in order to make that this audio player uses, expansion interfaces such as USB interface and/or SD card can also be set on this audio player.The user can use these expansion interfaces to get involved memory devices such as USB or SD like this, thereby the lossless compress audio file on the memory device is play, and obtained high-quality lossless audio output.
Embodiment 4:
Usually, reference source clock source generation unit 4033 is default forming in voice data interface 503, the frequency division rule that also is preset with this first frequency division module of a frequency division module (being designated as first frequency division module 4034 in the present embodiment) at voice data interface 503 is by default fixing, in order to solve its problem, can adopt the secondary frequency division of present embodiment to obtain purpose sound channel clock.Specifically can be referring to shown in Figure 5, present embodiment is with respect to 3 differences of embodiment:
Frequency divider 404 among the embodiment 3 can adopt to be arranged on first frequency division module 502 in the voice data interface 503 and to be arranged on first frequency divider and be connected with second frequency division module 501 between the audio frequency analog to digital converter 405,
First frequency division module 502 is connected with reference clock source generation module 4033, is used for reference clock source frequency division is exported respectively: frequency is that the first sound channel clock, the frequency of 2F hertz is the bit clock of W*2F hertz.
Second frequency division module 501 is connected with first frequency division module 502, audio frequency analog to digital converter 405, is used for the first road clock division, and output frequency is the purpose sound channel clock of F hertz.
Because the first sound channel clock, bit clock all derive from same reference clock source synchronously, and purpose sound channel clock derives from the first sound channel clock, so purpose sound channel clock, bit clock are synchronous.
Need to prove, when a frequency division can't obtain frequency and is the bit clock of W*2F, can utilize the thinking of present embodiment to carry out repeatedly frequency division equally and obtain the bit clock of frequency for W*2F.Do not give unnecessary details at this.
Principle can be referring to the principles illustrated among the embodiment 2 in detail.
More than the technical scheme that the embodiment of the invention provided is described in detail, used specific case herein the principle and the embodiment of the embodiment of the invention are set forth, the explanation of above embodiment only is applicable to the principle that helps to understand the embodiment of the invention; Simultaneously, for one of ordinary skill in the art, according to the embodiment of the invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. the method for a voice playing is characterized in that, comprising:
Obtain the lossless compress audio file, the sample frequency of wherein said audio file is designated as the F hertz, and the width of each sampling number certificate is designated as the W position;
The described lossless compress audio file of decoding obtains decoded data;
Wide to each is the decoded data of W position, from the high position of decoded data to low level each W/2 bit data is deposited in the buffer queue of described demoder successively, and the space of every address of described buffer queue is the W/2 position;
The frequency in reference clock source in the described voice data interface is revised as the W*2*n*F hertz by default value, and described n is a natural number;
To described reference clock source frequency division, purpose sound channel clock and the frequency of obtaining frequency respectively and be F are the bit clock of W*2F hertz;
To the described purpose sound channel of the described output of described audio frequency analog to digital converter clock, bit clock;
Read described decoded data from the buffer queue of described demoder, deposit the decoded data that reads in shift register, described shift register is the W/2 position, described shift register is according to the trigger pulse of described bit clock, from a high position to the low level, be shifted successively, export each bit data to the audio frequency analog to digital converter, finish up to reading;
Described audio frequency analog to digital converter is according to described sound channel clock, playing audio data sequence.
2. the method for a kind of voice playing according to claim 1 is characterized in that,
The frequency in reference clock source in the described voice data interface is revised as the W*2F hertz by default value,
To described reference clock source frequency division, purpose sound channel clock and the frequency of obtaining frequency respectively and be F are the bit clock of W*2F hertz, specifically comprise:
Described voice data interface is to described reference clock source frequency division, and the first sound channel clock and the frequency of obtaining frequency respectively and be 2F are the bit clock of W*2F hertz, and described voice data interface is exported the described first sound channel clock to external frequency divider;
Described frequency divider is to the described first sound channel clock division, and obtaining frequency is the purpose sound channel clock of F;
To the described purpose sound channel of the described output of described audio frequency analog to digital converter clock, bit clock, specifically:
Described frequency divider is exported described purpose sound channel clock to described audio frequency analog to digital converter,
Described voice data interface is exported described bit clock to described audio frequency analog to digital converter.
3. the method for a kind of voice playing according to claim 1 is characterized in that,
The sample frequency of described audio file is 192 KHz, and the width of every sampling number certificate is 32;
Wide to each is the decoded data of W position, each W/2 bit data is deposited successively in the buffer queue of described demoder from the high position of decoded data to low level, specifically:
To described bit wide is 32 decoded data, deposits high 16 bit data in the described decoded data buffer queue of described demoder in, and low 16 bit data with described decoded data deposit described buffer queue in then.
4. according to the method for claim 1,2 or 3 described a kind of voice playing, it is characterized in that,
Trigger pulse according to described bit clock is exported described audio data sequence to described audio frequency analog to digital converter, specifically:
All export a voice data in the described audio data sequence at each rising edge of described bit clock when arriving to described audio frequency analog to digital converter.
5. a kind of audio frequency playing method according to claim 1 and 2 is characterized in that,
The described audio file that obtains compression, specifically:
Read outside USB flash disk or SD card, obtain the audio file of described compression.
6. an audio player is characterized in that, comprising:
Decoder module, the lossless compress audio file that is used to decode obtains decoded data.
Buffer queue is connected with described decoder module, and the space of every address of described buffer queue is the W/2 position, and wherein W is the highest width of each sampling number certificate of audio file of this player support;
Processor is connected with described decoder module, buffer queue respectively, is used for each widely is the decoded data of W position, deposits each W/2 bit data in described buffer queue successively from the high position of decoded data to low level;
Read module is connected with described buffer queue, is used for reading the decoded data of described buffer queue;
Shift register, be connected with described read module, frequency divider, be used for from a high position to the low level, shifting out each bit data successively according to the trigger pulse of described bit clock, to audio frequency analog to digital converter outputting audio data sequence, finish up to reading of data, every address space of described shift register is the W/2 position;
Reference clock source generation module is used for generating the reference clock source according to the frequency of setting;
Clock source frequency setting module is connected with reference clock source generation module, is used for the frequency in described reference clock source is revised as the W*2*n*F hertz by setting value, and wherein, F is the highest sample frequency of the audio file of this player support, and described n is a natural number;
Frequency divider is connected with described reference clock source generation module, and be used for described reference clock source frequency division, respectively output: frequency is that purpose sound channel clock, the frequency of F hertz is the bit clock of W*2F hertz;
Described audio frequency analog to digital converter is used for according to described purpose sound channel clock, playing audio data.
7. a kind of audio player according to claim 6 is characterized in that,
Described frequency divider comprises:
First frequency division module is connected with described reference clock source generation module, and be used for described reference clock source frequency division, respectively output: frequency is that the first sound channel clock, the frequency of 2F hertz is the bit clock of W*2F hertz;
Second frequency division module is connected with described first frequency division module, audio frequency analog to digital converter, is used for the described first road clock division, and output frequency is the purpose sound channel clock of F hertz.
8. according to claim 6 or 7 described a kind of audio players, it is characterized in that,
The sample frequency of described audio file is 192 KHz, and the width of every sampling number certificate is 32;
The space of every address of described buffer queue is 16,
Described processor, specifically being used for described bit wide is 32 decoded data, deposits high 16 bit data in the described decoded data buffer queue of described demoder in, low 16 bit data with described decoded data deposit described buffer queue in then.
9. according to claim 6 or 7 described a kind of audio players, it is characterized in that,
Also comprise: USB interface is used for circumscribed USB storage equipment.
10. according to claim 6 or 7 described a kind of audio players, it is characterized in that,
Also comprise: the SD interface is used for external SD card.
CN201010148928.6A 2010-04-12 2010-04-12 Lossless audio playing method and audio player Active CN102208208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010148928.6A CN102208208B (en) 2010-04-12 2010-04-12 Lossless audio playing method and audio player

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010148928.6A CN102208208B (en) 2010-04-12 2010-04-12 Lossless audio playing method and audio player

Publications (2)

Publication Number Publication Date
CN102208208A true CN102208208A (en) 2011-10-05
CN102208208B CN102208208B (en) 2014-04-09

Family

ID=44697001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010148928.6A Active CN102208208B (en) 2010-04-12 2010-04-12 Lossless audio playing method and audio player

Country Status (1)

Country Link
CN (1) CN102208208B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102610267A (en) * 2012-03-16 2012-07-25 广东步步高电子工业有限公司 Method for improving audio playing quality of playing system
CN102881305A (en) * 2012-09-21 2013-01-16 北京君正集成电路股份有限公司 Method and device for playing audio file
CN105933313A (en) * 2016-04-20 2016-09-07 广东欧珀移动通信有限公司 Display method and system of multimedia data and control device
CN109830243A (en) * 2019-01-30 2019-05-31 腾讯科技(深圳)有限公司 Sound effect treatment method, device and computer equipment
CN112216310A (en) * 2019-07-09 2021-01-12 海信视像科技股份有限公司 Audio processing method and device and multi-channel system
CN114499728A (en) * 2020-11-11 2022-05-13 迈普通信技术股份有限公司 Associated clock jitter suppression method and device for E1 link and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6429902B1 (en) * 1999-12-07 2002-08-06 Lsi Logic Corporation Method and apparatus for audio and video end-to-end synchronization
US20060050825A1 (en) * 2004-09-03 2006-03-09 Michael Page Data transmission
CN101533640A (en) * 2009-04-16 2009-09-16 北京中星微电子有限公司 Method and device for playing digital audio
CN201707924U (en) * 2010-04-12 2011-01-12 佛山市智邦电子科技有限公司 Lossless audio frequency player

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6429902B1 (en) * 1999-12-07 2002-08-06 Lsi Logic Corporation Method and apparatus for audio and video end-to-end synchronization
US20060050825A1 (en) * 2004-09-03 2006-03-09 Michael Page Data transmission
CN101533640A (en) * 2009-04-16 2009-09-16 北京中星微电子有限公司 Method and device for playing digital audio
CN201707924U (en) * 2010-04-12 2011-01-12 佛山市智邦电子科技有限公司 Lossless audio frequency player

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102610267A (en) * 2012-03-16 2012-07-25 广东步步高电子工业有限公司 Method for improving audio playing quality of playing system
CN102610267B (en) * 2012-03-16 2014-09-03 广东步步高电子工业有限公司 Method for improving audio playing quality of playing system
CN102881305A (en) * 2012-09-21 2013-01-16 北京君正集成电路股份有限公司 Method and device for playing audio file
CN105933313A (en) * 2016-04-20 2016-09-07 广东欧珀移动通信有限公司 Display method and system of multimedia data and control device
CN109830243A (en) * 2019-01-30 2019-05-31 腾讯科技(深圳)有限公司 Sound effect treatment method, device and computer equipment
CN109830243B (en) * 2019-01-30 2021-01-12 腾讯科技(深圳)有限公司 Sound effect processing method and device and computer equipment
CN112216310A (en) * 2019-07-09 2021-01-12 海信视像科技股份有限公司 Audio processing method and device and multi-channel system
CN114499728A (en) * 2020-11-11 2022-05-13 迈普通信技术股份有限公司 Associated clock jitter suppression method and device for E1 link and electronic equipment

Also Published As

Publication number Publication date
CN102208208B (en) 2014-04-09

Similar Documents

Publication Publication Date Title
CN102208208B (en) Lossless audio playing method and audio player
JP5123351B2 (en) Decoding method of signal division information
US20070094031A1 (en) Audio time scale modification using decimation-based synchronized overlap-add algorithm
CN102610267B (en) Method for improving audio playing quality of playing system
CN105448312B (en) Audio sync playback method, apparatus and system
CN1091916C (en) Microwave form control of a sampling midi music synthesizer
CN102881283B (en) Method and system for processing voice
KR101166735B1 (en) Musical instrument digital interface hardware instructions
US9202452B2 (en) Musical sound generation device, storage medium, and musical sound generation method
CN201707924U (en) Lossless audio frequency player
CN112289300B (en) Audio processing method and device, electronic equipment and computer readable storage medium
CN102760437B (en) Audio decoding device of control conversion of real-time audio track
US20070055397A1 (en) Constant pitch variable speed audio decoding
US7196642B2 (en) Circuitry and method for sampling audio data
CN107888963B (en) Method and system for synthesizing video based on rhythm
US7711555B2 (en) Method for compression and expansion of digital audio data
KR101120968B1 (en) Musical instrument digital interface hardware instruction set
CN102074239B (en) Sound speed change method
WO2008115875A1 (en) Efficient identification of sets of audio parameters
Truax Context-based Composition
CN1233200C (en) FPGA 5.1 channel virtual speech reproducing method and device
CN100382594C (en) Fast forwarding method for video signal
JP4741208B2 (en) Speech text data selection program for speech synthesis and text data selection device for speech synthesis
CN102142256B (en) Method and device for calculating fade-in time
US20090234475A1 (en) Process for managing digital audio streams

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