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

Lossless audio playing method and audio player Download PDF

Info

Publication number
CN102208208B
CN102208208B CN201010148928.6A CN201010148928A CN102208208B CN 102208208 B CN102208208 B CN 102208208B CN 201010148928 A CN201010148928 A CN 201010148928A CN 102208208 B CN102208208 B CN 102208208B
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.)
Active
Application number
CN201010148928.6A
Other languages
Chinese (zh)
Other versions
CN102208208A (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
An important hearing enjoying in music people's life.Player mainly consists of following demoder, DAB output interface, stereo DAC along connecing in succession at present, and on the identical basis of audio file, audio frequency is play the hardware performance that is decided by demoder, DAB output interface.Current demoder, DAB output interface generally only support that playing sample frequency is 48 KHz, sampling bit wide is the audio file of 16, than the demoder of higher-end, DAB output interface, can support to play sample frequency is 96 KHz, and sampling bit wide is the audio file of 16.The audio sample rate of existing player plays is low, data bit figure place is lower, causes that the audio loss play is large, total harmonic distortion is higher, can not meet pursuing the crowd's of high music quality demand.
In the prior art, the restriction that the audio frequency play quality of audio player is subject to hardware cost is larger, improves the audio frequency of playing higher sampling, higher data bit merely by hardware performance, can cause the production cost of enterprise excessive, is not suitable for actual promotion and implementation.
Summary of the invention
The present invention's the first object is to provide: a kind of method that audio frequency is play, and utilize the method on the basis of lower hardware cost, to play the more audio frequency of high sampling rate, higher data bit.
The present invention's the second object is to provide: a kind of audio player, utilizes this player on the basis of lower hardware cost, to play the more audio frequency of high sampling rate, higher data bit.
The method that a kind of audio frequency that the embodiment of the present invention provides is play, comprising:
Obtain Lossless Compression audio file, the sample frequency of wherein said audio file is designated as F hertz, and the width of each sampling number certificate is designated as W position;
The described Lossless Compression audio file of decoding, obtains decoded data;
Wide to each is the decoded data of W position, to low level, each W/2 bit data is deposited in to the buffer queue of described demoder successively from a high position for decoded data, and the space of every address of described buffer queue is W/2 position;
The frequency in reference clock source in described audio frequency data interface is revised as to W*2*n*F hertz by default value, and described n is natural number;
To described reference clock source frequency division, object sound channel clock and the frequency of obtaining respectively frequency and be F are the bit clock of W*2F hertz;
To exporting described object sound channel clock, bit clock described in described audio frequency analog to digital converter;
From the buffer queue of described demoder, read described decoded data, deposit the decoded data reading in shift register, described shift register is W/2 position, described shift register is according to the trigger pulse of described bit clock, from a high position to low level, be shifted successively, to audio frequency analog to digital converter, export each bit data, until read complete;
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 described audio frequency data interface is revised as to W*2F hertz by default value,
To described reference clock source frequency division, object sound channel clock and the frequency of obtaining respectively frequency and be F are the bit clock of W*2F hertz, specifically comprise:
Described audio frequency data interface is to described reference clock source frequency division, and the first sound channel clock and the frequency of obtaining respectively frequency and be 2F are the bit clock of W*2F hertz, and described audio frequency data interface is exported described the first sound channel clock to external frequency divider;
Described frequency divider is to described the first sound channel clock division, and obtaining frequency is the object sound channel clock of F;
To exporting described object sound channel clock described in described audio frequency analog to digital converter, bit clock, specifically:
Described frequency divider is exported described object sound channel clock to described audio frequency analog to digital converter,
Described audio frequency 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, from a high position for decoded data, to low level, each W/2 bit data is deposited successively in to the buffer queue of described demoder, specifically:
To described bit wide, be the decoded data of 32, high 16 bit data in described decoded data deposited in to the buffer queue of described demoder, then deposit low 16 bit data of described decoded data in described buffer queue.
Alternatively, according to the trigger pulse of described bit clock, to described audio frequency analog to digital converter, export described audio data sequence, specifically:
At each rising edge of described bit clock, all to described audio frequency analog to digital converter, export a voice data in described audio data sequence when arriving.
Alternatively, described in obtain the audio file of compression, specifically:
Read outside USB flash disk or SD card, obtain the audio file of described compression.
A kind of audio player that the present embodiment provides, comprising:
Decoder module, for the Lossless Compression audio file of decoding, obtains decoded data.
Buffer queue, is connected with described decoder module, and the space of every address of described buffer queue is 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, for wide to each be the decoded data of W position, from a high position for decoded data, to low level, deposit successively each W/2 bit data in described buffer queue;
Read module, is connected with described buffer queue, for reading the decoded data of described buffer queue;
Shift register, be connected with described read module, frequency divider, for shift out successively each bit data from a high position to low level according to the trigger pulse of described bit clock, to audio frequency analog to digital converter outputting audio data sequence, until reading out data is complete, every address space of described shift register is W/2 position;
Reference clock source generation module, for generating reference clock source according to the frequency of setting;
Clock source frequency setting module, is connected with reference clock source generation module, and for the frequency in described reference clock source is revised as to W*2*n*F hertz by setting value, wherein, F is the highest sample frequency of the audio file of this player support, and described n is natural number;
Frequency divider, is connected with described reference clock source generation module, for to described reference clock source frequency division, exports respectively: frequency is that object sound channel clock, the frequency of F hertz is the bit clock of W*2F hertz;
Described audio frequency analog to digital converter, for according to described object sound channel clock, playing audio data.
Alternatively, described frequency divider comprises:
The first frequency division module, is connected with described reference clock source generation module, for to described reference clock source frequency division, exports respectively: frequency is that the first sound channel clock, the frequency of 2F hertz is the bit clock of W*2F hertz;
The second frequency division module, is connected with described the first frequency division module, audio frequency analog to digital converter, and for to described first clock division, output frequency is the object 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 for being the decoded data of 32 to described bit wide, deposits high 16 bit data in described decoded data in the buffer queue of described demoder, then deposits low 16 bit data of described decoded data in described buffer queue.
Alternatively, also comprise: USB interface, for circumscribed USB storage equipment.
Alternatively, also comprise: SD interface, for external SD card.
Therefore, the technical scheme of the application embodiment of the present invention, by after demoder decoding, stores a high position for decoded data, low level partition, thereby guarantee supporting lossless storage audio data decoder on the hardware that figure place is lower, be conducive to guarantee the complete output of audio frequency output; In addition, the present invention is by revising the frequency in reference clock source, make this reference clock source to obtain the object sound channel clock that frequency is F by frequency division, frequency is the bit clock of W*2F, like this, bits per inch certificate according to from the pulse of bit clock to audio digital to analog converter output decoded data, forms decoded data sequence.The object sound channel clock played data that can be F according to frequency at audio digital to analog converter end, the L channel, R channel that guarantees each object sound channel clock be corresponding 32 bit data respectively, can realize hardware that utility is lower realize frequency on hardware default frequency, data width is that the data tones frequency file of the audio file of 2 times of hardware supported width is play.
Such as can utilize support 96 KHz, 16 hardware and to realize sample frequency be F=192 KHz hertz, the harmless broadcasting of the audio file of width W=32 of each sampling number certificate.Visible, utilize the present embodiment method on the basis of lower 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 to be input to the L channel of the sound channel clock of inputting in audio frequency analog to digital converter, R channel clock respectively with the L channel data of audio file of input, right data is corresponding, so that playing the harmless Lossless Compression audio file of playing of end, at musical audio digital interface output channels clock (the first sound channel clock), after bit clock, again the first sound channel clock of its output is carried out to frequency division, divide the frequency object sound channel clock consistent with the sample frequency of audio file that occur frequently, now being input to audio digital to analog converter object sound channel clock frequency is F, bit clock frequency is W*2F,
It is visible,
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the application's a part, does not form inappropriate limitation of the present invention, in the accompanying drawings:
The method flow schematic diagram that Fig. 1 plays for a kind of audio frequency that the embodiment of the present invention 1 provides;
The corresponding schematic diagram of the object sound channel clock that Fig. 2 receives for the audio frequency analog to digital converter providing in the embodiment of the present invention 1, bit clock, data sequence;
The method flow schematic diagram that Fig. 3 plays for the another kind of audio frequency that the embodiment of the present invention 3 provides;
The structural representation of a kind of audio player that Fig. 4 provides for the embodiment of the present invention 3;
The structural representation of a kind of audio player that Fig. 5 provides for the embodiment of the present invention 4.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment, describe the present invention in detail, in this illustrative examples of the present invention and explanation, be used for explaining the present invention, 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 the present embodiment.Shown in Figure 1, the method mainly comprises the following steps:
Step 101: obtain Lossless Compression audio file.
, there are two kinds of compress modes in audio compression field, is respectively lossy compression method and Lossless Compression.Our common MP3 arriving, 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 less than original.Lossless Compression is exactly namely the audio format that milli compresses voice signal without loss.Lossless Compression can be under the prerequisite of all data of 100% preservation original, less by the volume compression of audio file, and by after the audio file reduction after compression, can realize the size identical with source file, identical code check.
This audio file both can be pre-stored in player, also can be stored in the external storage equipments such as external USB flash disk or SD card by USB interface or SD card interface.
This Lossless Compression 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 Compression is F hertz, and the width of each sampling number certificate is W position.
Step 102: Lossless Compression 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 after the coding that decompresses.
Such as being F=192 KHz hertz for sample frequency, the audio file of width W=32 of each sampling number certificate, the form of the decoded data obtaining is as shown in following table one:
Table one: the decoded data layout signal of audio file of 32:
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(under with X, replace)
Step 103: buffer memory audio data decoder.
Because the width of each sampling number certificate of audio file is W position, and demoder is only supported the audio coding of W/2 position (space size of every address of buffer memory wherein be only also W/2 position), if and according to the direct buffer memory of prior art, 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 doing in the process of caching of this step:
Wide for each is the decoded data of W position: this decoded data is splitted into high W/2 position, low W/2 position, respectively high W/2 position, low W/2 are deposited in to the buffer queue of demoder, so that only supporting the decoding of W/2 position wherein the audio data decoder of W position to be carried out to harmless buffer memory.
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 to 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 that high 16, data A, the B low 16 of L channel number decoder data X are put into respectively to demoder, by that analogy, all deposits data in the buffer queue of demoder.
Shown in the data store organisation table two specific as follows of decoder buffer queue:
Table two: the data store organisation of decoder buffer queue
16 left sides (A)
16 right sides (B)
16 left sides (C)
16 right sides (D)
......
......
Wherein C, D are respectively high 16, the data of low 16 of R channel number decoder data.
Step 104: the frequency values in reference clock source in audio frequency data interface is revised as to the multiple of W*2F hertz by default value.
In existing audio frequency data interface, be provided with a reference clock source of having preset clock frequency.
Use in the present embodiment and support the lower audio frequency data interface of clock frequency to play high-quality audio frequency, realize lossless audio output, the multiple that the frequency in default reference clock source is revised as to W*2F hertz by default value (is W*2*n*F hertz, n is natural number), wherein F is the sample frequency of Lossless Compression audio file.
Such as, if the frequency in the reference clock source of the acquiescence in this audio frequency data interface is 96kHZ, and the sample frequency of the Lossless Compression audio file of input is 192kHZ, can be, but not limited to the default frequency in the reference clock source in this audio frequency data interface to be 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 object sound channel clock, the frequency of F hertz is the bit clock of W*2F hertz.
Frequency division is carried out in reference clock source, obtain respectively and export the first sound channel clock (frequency is 2F hertz), bit clock (frequency is W*2F hertz).
As follows for step 104,105 enforcement concrete example:
If the sample frequency of audio file is the width of F=192 KHz hertz, each sampling number certificate is W position, the frequency of digital audio interface acquiescence is 96 KHz, perform step 105 the frequency in reference clock source is revised as to 4*96 KHz by 96 KHz, be i.e. 384 KHz.
Then, perform step the reference clock source that 106 pairs of these frequencies are 12288kHZ and carry out frequency division, obtaining also output frequency is that 192 KHz object sound channel clocks and frequency are the bit clock of 32*384 KHz (i.e. 12.288 megahertzes).
Because object sound channel clock, bit clock derive from an identical reference clock source jointly, object sound channel clock, the bit clock of output keep synchronous constantly.
Step 106: audio frequency data interface reads decoded data from the buffer queue of demoder, deposit the decoded data reading in shift register, shift register is according to the trigger pulse of bit clock, from a high position to low level, shift out successively displacement, to audio frequency analog to digital converter, export each bit data, until that decoded data reads is complete.
The mode that audio frequency data interface is first processed according to advanced person reads the decoded data in the buffer queue of demoder, the data of the W/2 position of every reading unit, deposited in shift register, by shift register according to the trigger pulse of bit clock, from a high position to low level, shift out successively each bit data, formation outputs to the audio data sequence of audio frequency analog to digital converter, until that decoded data reads is complete.Wherein, this shift register shifts out a data in the time of can arriving at each rising edge of bit clock, realizes according to bit clock output, in the time of also can arriving at each negative edge of bit clock, shifts out a data, realizes and exporting according to bit clock.
The displacement of the bits per inch certificate of shift register specifically can be, but not limited to as follows:
Audio frequency data interface, according to the principle of buffer queue first in first out, reads the data of decoder buffer queue, and as shown in Table 2, shift register is for data B:b for the data store organisation of hypothesis decoding device buffer queue 31b 29b 28b 27... b 19b 18b 17, from b 31start to shift out, until b 17; Then, audio frequency data interface reads next in buffer queue to data A b 16... b 4b 3b 2b 1b 0, shift register to these data from b 16start to shift out, until b 0.Like this, obtain data sequence: b 31b 29b 28b 27... b 19b 18b 17b 16... b 4b 3b 2b 1b 0.Audio frequency data interface continues to read the next address data in the buffer queue of demoder, continues to utilize shift register to be shifted to the data that read, by one shifts out of data.
Step 107: audio frequency analog to digital converter is according to object sound channel clock, playing audio-fequency data.
Now, the object sound channel clock that 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 object 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, the technical scheme of the application embodiment of the present invention, by after demoder decoding, stores a high position for decoded data, low level partition, thereby guarantee supporting lossless storage audio data decoder on the hardware that figure place is lower, be conducive to guarantee the complete output of audio frequency output; In addition, the present invention is by revising the frequency in reference clock source, make this reference clock source to obtain the object sound channel clock that frequency is F by frequency division, frequency is the bit clock of W*2F, like this, bits per inch certificate according to from the pulse of bit clock to audio digital to analog converter output decoded data, forms decoded data sequence.The object sound channel clock played data that can be F according to frequency at audio digital to analog converter end, the L channel, R channel that guarantees each object sound channel clock be corresponding 32 bit data respectively, can realize hardware that utility is lower realize frequency on hardware default frequency, data width is that the data tones frequency file of the audio file of 2 times of hardware supported width is play.
Such as can utilize support 96 KHz, 16 hardware and to realize sample frequency be F=192 KHz hertz, the harmless broadcasting of the audio file of width W=32 of each sampling number certificate.Visible, utilize the present embodiment method on the basis of lower hardware cost, to play the more audio frequency of high sampling rate, higher data bit.
Embodiment 2:
The method flow schematic diagram that Fig. 3 plays for the another kind of audio frequency that the embodiment of the present invention provides, it is only with respect to 1 difference of embodiment:
Step 105 in embodiment can realize by following sub-step:
Usually, reference source clock is default forming in audio frequency data interface, and its frequency division rule, by default fixing, in order to solve its problem, can adopt the secondary frequency division of the present embodiment to obtain object sound channel clock.
Sub-step 1051: to reference clock source frequency division, output respectively: the first sound channel clock of the multiple that frequency values is F, frequency are the bit clock of W*2F hertz.
Such as the first sound channel clock, frequency that can first frequency division obtains and output frequency value is 2F be the bit clock of W*2F hertz.
Sub-step 1052: to the first sound channel clock division, the object sound channel clock that is F to audio frequency D/A converter module output object frequency.
Between digital output interface and audio frequency analog to digital converter, arrange with frequency divider, this frequency divider is proceeded frequency division to the first sound channel clock, generates and export object sound channel clock, and the frequency that makes object sound channel clock is F hertz.
Synchronous because the first sound channel clock, bit clock all derive from same reference clock source, and object sound channel clock derives from the first sound channel clock, therefore object sound channel clock, bit clock are synchronous.
It should be noted that, when a frequency division cannot obtain frequency and is the bit clock of W*2F, can utilize equally the thinking of the present embodiment to carry out repeatedly frequency division and obtain the bit clock that frequency is W*2F.Therefore not to repeat here.
Embodiment 3:
The structural representation of a kind of audio player that Fig. 4 provides for the present embodiment, shown in Figure 4, the audio player that the 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:
Decoder module 4011, for the Lossless Compression audio file of decoding (establishing its sample frequency is F hertz, and the width of each sampling number certificate is W position), obtains audio data decoder.Buffer queue 4012 is connected with decoder module 4011 for store decoded data under the control of processor 402, and the space of every address of this buffer queue 4012 is W/2 position.The present invention with regard to every address space of buffer queue only for the situation of W/2 is analyzed.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, in decoding, obtain after decoded data, to each data cell in decoded data (each is wide is the decoded data of W position), from a high position for decoded data, to low level, deposit successively each W/2 bit data in described buffer queue 4012, the control of 402 pairs of voice datas of this processor can be referring to the description in step 103 in embodiment 1.
Read module 4031 is connected with buffer queue 4012, 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 successively respectively each bit data to audio frequency analog to digital converter 405 outputting audio data sequences according to the trigger pulse of the bit clock of frequency divider 404 outputs from a high position to low level, until read complete, thereby form the audio data sequence export audio frequency analog to digital converter 405 to.The present embodiment is that W/2 position is that example describes with regard to every address space of shift register 4032.
The principle of work of read module 4031, shift register 4032 in detail can be referring to the description in step 106 in embodiment 1.
Reference clock source generation module 4033, for generating reference clock source according to predetermined frequency.
In the present embodiment in order to make data-interface that this default frequency is lower can support the broadcasting of the audio file of higher sample frequency, in this player, also setting a clock source frequency setting module 406 is connected with frequency generation reference clock source generation module 4033, for revising the frequency modification in default reference clock source, be W*2*n*F hertz, 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, for frequency division is carried out in the reference clock source generating, becomes object sound channel clock, bit clock.Obtain respectively: frequency is that object sound channel clock, the frequency of F hertz is the bit clock of W*2F hertz, 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 be, but not limited to integrated being arranged in an audio frequency data interface 403.
Audio frequency analog to digital converter 405, for according to object sound channel clock, playing audio data.Concrete principle can be referring to the description in embodiment step 107.
Now, as shown in Figure 2, wherein the frequency of the signal of object sound channel clock is F to the signal that audio frequency analog to digital converter 405 receives, and the frequency of bit clock is 32*2F, all corresponding voice data in the rising edge of every bit clock.
Therefore, the technical scheme of the application embodiment of the present invention, by after demoder decoding, stores a high position for decoded data, low level partition, thereby guarantee supporting lossless storage audio data decoder on the hardware that figure place is lower, be conducive to guarantee the complete output of audio frequency output; In addition, the present invention is by revising the frequency in reference clock source, make this reference clock source to obtain the object sound channel clock that frequency is F by frequency division, frequency is the bit clock of W*2F, like this, bits per inch certificate according to from the pulse of bit clock to audio digital to analog converter output decoded data, forms decoded data sequence.The object sound channel clock played data that can be F according to frequency at audio digital to analog converter end, the L channel, R channel that guarantees each object sound channel clock be corresponding 32 bit data respectively, can realize hardware that utility is lower realize frequency on hardware default frequency, data width is that the data tones frequency file of the audio file of 2 times of hardware supported width is play.
Such as can utilize support 96 KHz, 16 hardware and to realize sample frequency be F=192 KHz hertz, the harmless broadcasting of the audio file of width W=32 of each sampling number certificate.Visible, utilize the present embodiment method on the basis of lower hardware cost, to play the more audio frequency of high sampling rate, higher data bit.
In addition, convenient for this audio player is used, the expansion interfaces such as USB interface and/or SD card interface can also be set on this audio player.User can use these expansion interfaces to get involved the memory devices such as USB or SD like this, thereby the Lossless Compression audio file on 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 audio frequency data interface 503, at audio frequency data interface 503, be also preset with the frequency division rule of this first frequency division module of a frequency division module (being designated as in the present embodiment the first frequency division module 4034) by default fixing, in order to solve its problem, can adopt the secondary frequency division of the present embodiment to obtain object sound channel clock.Specifically can be shown in Figure 5, the present embodiment is with respect to 3 differences of embodiment:
Frequency divider 404 in embodiment 3 can adopt to be arranged on the first frequency division module 502 in audio frequency data interface 503 and to be arranged on the first frequency divider and be connected with the second frequency division module 501 between audio frequency analog to digital converter 405,
The first frequency division module 502, is connected with reference clock source generation module 4033, 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.
The second frequency division module 501, is connected with the first frequency division module 502, audio frequency analog to digital converter 405, and for to first clock division, output frequency is the object sound channel clock of F hertz.
Synchronous because the first sound channel clock, bit clock all derive from same reference clock source, and object sound channel clock derives from the first sound channel clock, therefore object sound channel clock, bit clock are synchronous.
It should be noted that, when a frequency division cannot obtain frequency and is the bit clock of W*2F, can utilize equally the thinking of the present embodiment to carry out repeatedly frequency division and obtain the bit clock that frequency is W*2F.Therefore not to repeat here.
Principle can be referring to the principles illustrated in embodiment 2 in detail.
The technical scheme above embodiment of the present invention being provided is described in detail, applied specific case herein the principle of the embodiment of the present invention and embodiment are set forth, the explanation of above embodiment is only applicable to help to understand the principle of the embodiment of the present invention; , for one of ordinary skill in the art, according to the embodiment of the present invention, in embodiment and range of application, all will change, in sum, this description should not be construed as limitation of the present invention meanwhile.

Claims (10)

1. the method that audio frequency is play, is characterized in that, comprising:
Obtain Lossless Compression audio file, the sample frequency of wherein said audio file is designated as F hertz, and the width of each sampling number certificate is designated as W position;
The described Lossless Compression audio file of decoding, obtains decoded data;
Wide to each is the decoded data of W position, to low level, each W/2 bit data is deposited in to the buffer queue of demoder successively from a high position for decoded data, and the space of every address of described buffer queue is W/2 position;
The frequency in reference clock source in audio frequency data interface is revised as to W*2*n*F hertz by default value, and described n is natural number;
To described reference clock source frequency division, object sound channel clock and the frequency of obtaining respectively frequency and be F are the bit clock of W*2F hertz;
To audio frequency analog to digital converter, export described object sound channel clock, bit clock;
From the buffer queue of described demoder, read described decoded data, deposit the decoded data reading in shift register, described shift register is W/2 position, described shift register is according to the trigger pulse of described bit clock, from a high position to low level, be shifted successively, to audio frequency analog to digital converter, export each bit data, until read complete;
Described audio frequency analog to digital converter is according to described sound channel clock, playing audio-fequency data sequence.
2. the method that a kind of audio frequency according to claim 1 is play, is characterized in that,
The frequency in reference clock source in described audio frequency data interface is revised as to W*2F hertz by default value,
To described reference clock source frequency division, object sound channel clock and the frequency of obtaining respectively frequency and be F are the bit clock of W*2F hertz, specifically comprise:
Described audio frequency data interface is to described reference clock source frequency division, and the first sound channel clock and the frequency of obtaining respectively frequency and be 2F are the bit clock of W*2F hertz, and described audio frequency data interface is exported described the first sound channel clock to external frequency divider;
Described frequency divider is to described the first sound channel clock division, and obtaining frequency is the object sound channel clock of F;
To exporting described object sound channel clock described in described audio frequency analog to digital converter, bit clock, specifically:
Described frequency divider is exported described object sound channel clock to described audio frequency analog to digital converter,
Described audio frequency data interface is exported described bit clock to described audio frequency analog to digital converter.
3. the method that a kind of audio frequency according to claim 1 is play, 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, from a high position for decoded data, to low level, each W/2 bit data is deposited successively in to the buffer queue of described demoder, specifically:
To described bit wide, be the decoded data of 32, high 16 bit data in described decoded data deposited in to the buffer queue of described demoder, then deposit low 16 bit data of described decoded data in described buffer queue.
4. the method for playing according to a kind of audio frequency described in claim 1,2 or 3, is characterized in that,
According to the trigger pulse of described bit clock, to described audio frequency analog to digital converter, export described audio data sequence, specifically:
At each rising edge of described bit clock, all to described audio frequency analog to digital converter, export a voice data in described audio data sequence when arriving.
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, for the Lossless Compression audio file of decoding, obtains decoded data;
Buffer queue, is connected with described decoder module, and the space of every address of described buffer queue is 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, for wide to each be the decoded data of W position, from a high position for decoded data, to low level, deposit successively each W/2 bit data in described buffer queue;
Read module, is connected with described buffer queue, for reading the decoded data of described buffer queue;
Shift register, be connected with described read module, frequency divider, for shift out successively each bit data from a high position to low level according to the trigger pulse of bit clock, to audio frequency analog to digital converter outputting audio data sequence, until reading out data is complete, every address space of described shift register is W/2 position;
Reference clock source generation module, for generating reference clock source according to the frequency of setting;
Clock source frequency setting module, is connected with reference clock source generation module, and for the frequency in described reference clock source is revised as to W*2*n*F hertz by setting value, wherein, F is the highest sample frequency of the audio file of this player support, and described n is natural number;
Frequency divider, is connected with described reference clock source generation module, for to described reference clock source frequency division, exports respectively: frequency is that object sound channel clock, the frequency of F hertz is the bit clock of W*2F hertz;
Described audio frequency analog to digital converter, for according to described object sound channel clock, playing audio-fequency data.
7. a kind of audio player according to claim 6, is characterized in that,
Described frequency divider comprises:
The first frequency division module, is connected with described reference clock source generation module, for to described reference clock source frequency division, exports respectively: frequency is that the first sound channel clock, the frequency of 2F hertz is the bit clock of W*2F hertz;
The second frequency division module, is connected with described the first frequency division module, audio frequency analog to digital converter, for to described first soundroad clock division, output frequency is the object sound channel clock of F hertz.
8. according to a kind of audio player described in claim 6 or 7, 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 for being the decoded data of 32 to described bit wide, deposits high 16 bit data in described decoded data in the buffer queue of demoder, then deposits low 16 bit data of described decoded data in described buffer queue.
9. according to a kind of audio player described in claim 6 or 7, it is characterized in that,
Also comprise: USB interface, for circumscribed USB storage equipment.
10. according to a kind of audio player described in claim 6 or 7, it is characterized in that,
Also comprise: SD interface, 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 CN102208208A (en) 2011-10-05
CN102208208B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN109830243B (en) * 2019-01-30 2021-01-12 腾讯科技(深圳)有限公司 Sound effect processing method and device and computer equipment
CN112216310B (en) * 2019-07-09 2021-10-26 海信视像科技股份有限公司 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 (3)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2417867B (en) * 2004-09-03 2007-04-11 Sony Uk Ltd Data transmission

Patent Citations (3)

* 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
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

Also Published As

Publication number Publication date
CN102208208A (en) 2011-10-05

Similar Documents

Publication Publication Date Title
CN102208208B (en) Lossless audio playing method and audio player
US7957960B2 (en) Audio time scale modification using decimation-based synchronized overlap-add algorithm
ES2777600T3 (en) Dynamic range control based on extended metadata of encoded audio
JP5123351B2 (en) Decoding method of signal division information
ES2871859T3 (en) Cross-channel encoding of a high-band audio signal
US8229738B2 (en) Method for differentiated digital voice and music processing, noise filtering, creation of special effects and device for carrying out said method
EP3522151A1 (en) Method and device for processing dual-source audio data
CN102610267B (en) Method for improving audio playing quality of playing system
AU2006228821A1 (en) Device and method for producing a data flow and for producing a multi-channel representation
US20080304678A1 (en) Audio time scale modification algorithm for dynamic playback speed control
CN110459196A (en) A kind of method, apparatus and system adjusting singing songs difficulty
KR101166735B1 (en) Musical instrument digital interface hardware instructions
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
US7580833B2 (en) Constant pitch variable speed audio decoding
CN201707924U (en) Lossless audio frequency player
US7196642B2 (en) Circuitry and method for sampling audio data
US7711555B2 (en) Method for compression and expansion of digital audio data
US20120158410A1 (en) Digital audio signal processing system
KR101120968B1 (en) Musical instrument digital interface hardware instruction set
CN1440217A (en) FPGA 5.1 channel virtual speech reproducing method and device
WO2019167706A1 (en) Encoding device, encoding method, program, and recording medium
CN102142256B (en) Method and device for calculating fade-in time
JP5273366B2 (en) Content synchronized playback device
JP3884131B2 (en) Data compression device and data decompression 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