CN108847248A - Bluetooth equipment audio-frequency processing method, system, readable storage medium storing program for executing and bluetooth equipment - Google Patents

Bluetooth equipment audio-frequency processing method, system, readable storage medium storing program for executing and bluetooth equipment Download PDF

Info

Publication number
CN108847248A
CN108847248A CN201810623859.6A CN201810623859A CN108847248A CN 108847248 A CN108847248 A CN 108847248A CN 201810623859 A CN201810623859 A CN 201810623859A CN 108847248 A CN108847248 A CN 108847248A
Authority
CN
China
Prior art keywords
audio
data
bluetooth
packets
audio data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810623859.6A
Other languages
Chinese (zh)
Other versions
CN108847248B (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.)
Zhuhai Jieli Technology Co Ltd
Original Assignee
Zhuhai Jieli Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Jieli Technology Co Ltd filed Critical Zhuhai Jieli Technology Co Ltd
Priority to CN201810623859.6A priority Critical patent/CN108847248B/en
Publication of CN108847248A publication Critical patent/CN108847248A/en
Application granted granted Critical
Publication of CN108847248B publication Critical patent/CN108847248B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/008Multichannel audio signal coding or decoding using interchannel correlation to reduce redundancy, e.g. joint-stereo, intensity-coding or matrixing
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/005Correction of errors induced by the transmission channel, if related to the coding algorithm
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Abstract

The present invention relates to a kind of bluetooth equipment audio-frequency processing methods, system, readable storage medium storing program for executing and bluetooth equipment, belong to audio signal processing technique field, when receiving the first packets of audio data to be played, it is pre-processed, obtain the independent frequency domain data of sound channel, compressed encoding is carried out respectively to the frequency domain data of separate channels, obtain corresponding second audio data packet, demand is played according to the audio of bluetooth slave devices, the third packets of audio data of corresponding sound channel is chosen from second audio data packet, encapsulation is to bluetooth data packets and is transmitted to bluetooth slave devices, bluetooth slave devices can play the audio of corresponding sound channel;Bluetooth host equipment carries out compressed encoding to audio data, the packets of audio data that demand transmits corresponding sound channel is played according to the audio of bluetooth slave devices, audio data transmission quantity can be substantially reduced, reduce corresponding spatial cache, audio sound quality is kept in the independent audio of bluetooth slave devices broadcasting sound channel simultaneously, to promote the performance of bluetooth equipment.

Description

Bluetooth equipment audio-frequency processing method, system, readable storage medium storing program for executing and bluetooth equipment
Technical field
The present invention relates to audio signal processing technique field, more particularly to a kind of bluetooth equipment audio-frequency processing method, system, can Read storage medium and bluetooth equipment.
Background technique
With the development of Audiotechnica, multichannel analog sterophonic technique using increasingly extensive.Multichannel analog is stood Body audio technology applies in the advanced audio of bluetooth equipment truly to reproduce the sound of original sound field, can bring more preferably for user Hearing effect.
Currently, need bluetooth host equipment that audio stream is forwarded to bluetooth slave devices when bluetooth equipment exports audio, When carrying out the audio output of multichannel, the amount of audio data for needing to forward is greatly increased, and increases data bandwidth pressure, is reduced The performance of bluetooth equipment.
Summary of the invention
Based on this, it is necessary to for bluetooth equipment because audio data packet loss leads to nonsynchronous problem, provide a kind of bluetooth Equipment audio-frequency processing method, system, readable storage medium storing program for executing and bluetooth equipment.
A kind of bluetooth equipment audio-frequency processing method, includes the following steps:
When receiving the first packets of audio data to be played, the first packets of audio data is pre-processed, obtains sound channel Independent frequency domain data;
Compressed encoding is carried out to the frequency domain data of different sound channels respectively, obtains the second audio data packet of corresponding sound channel;
Demand is played according to the audio of bluetooth slave devices, third audio data is chosen from each second audio data packet Packet, wherein third packets of audio data is corresponding with the sound channel in audio broadcasting demand;
Third packets of audio data is encapsulated into bluetooth data packets, bluetooth data packets are transmitted to bluetooth slave devices.
According to above-mentioned bluetooth equipment audio-frequency processing method, be when receiving the first packets of audio data to be played, it is right It is pre-processed, and is obtained the independent frequency domain data of sound channel, is carried out compressed encoding respectively to the frequency domain data of separate channels, obtain Corresponding second audio data packet plays demand according to the audio of bluetooth slave devices, the selection pair from second audio data packet The third packets of audio data of sound channel is answered, encapsulates into bluetooth data packets, bluetooth data packets is transmitted to bluetooth slave devices, bluetooth Slave devices can play the audio of corresponding sound channel;The above method can be applied in bluetooth host equipment, bluetooth host equipment Compressed encoding is carried out to audio data, the audio data that demand transmits corresponding sound channel is played according to the audio of bluetooth slave devices Packet, can substantially reduce audio data transmission quantity, reduce corresponding spatial cache, while only in bluetooth slave devices broadcasting sound channel Audio sound quality is kept when vertical audio, to promote the performance of bluetooth equipment.
The first packets of audio data is pre-processed in one of the embodiments, obtains the independent frequency domain data of sound channel The step of include the following steps:
First packets of audio data is parsed, audio frame head and intraframe data are obtained;
CRC check is carried out to audio frame head, if verification passes through, bit stream distribution, inverse quantization and solid are carried out to intraframe data Sonication obtains frequency domain data.
The step of carrying out CRC check to audio frame head in one of the embodiments, includes the following steps:
The target information in audio frame head is obtained, target information includes sound channel mode, sample rate, code rate, block mode, bit stream Allocation model, sub-band scheme, zoom factor and the first CRC check value;
The is obtained according to sound channel mode, sample rate, code rate, block mode, bit stream allocation model, sub-band scheme and zoom factor Two CRC check values determine that CRC check passes through if the first CRC check value is consistent with the second CRC check value.
In one of the embodiments, compressed encoding is carried out to the frequency domain data of different sound channels respectively, obtains corresponding sound channel Second audio data packet the step of include the following steps:
Bit stream distribution, quantization and master data are carried out according to frequency domain data of the coding parameter to any sound channel to encapsulate, and are obtained only The coded data of vertical sound channel;
The coded data of separate channels is packaged, second audio data packet is obtained.
The step of being packaged in one of the embodiments, to the coded data of separate channels includes the following steps:
Audio attribute information is obtained according to coded data, third CRC check value is obtained according to Audio attribute information, by audio Attribute information and third CRC check value are as header packet information, using coded data as master data in wrapping, generation second audio data Packet.
Bluetooth equipment audio-frequency processing method is further comprising the steps of in one of the embodiments,:
Demand is played according to local audio, the 4th packets of audio data is chosen from each second audio data packet, to the 4th Packets of audio data is decoded, and obtains the first time domain PCM data;
First time domain PCM data is sent to local DAC device, with bluetooth slave devices synchronously playing audio frequency, wherein blue Tooth slave devices obtain third packets of audio data from bluetooth data packets, are decoded to third packets of audio data, obtain second Second time domain PCM data is sent to the DAC device of bluetooth slave devices and plays audio by time domain PCM data.
A kind of bluetooth equipment audio processing system, including:
Audio pre-processing unit, for when receiving the first packets of audio data to be played, to the first packets of audio data It is pre-processed, obtains the independent frequency domain data of sound channel;
Audio coding unit carries out compressed encoding for the frequency domain data to different sound channels respectively, obtains corresponding sound channel Second audio data packet;
Audio distribution unit, for playing demand according to the audio of bluetooth slave devices, from each second audio data packet Choose third packets of audio data, wherein third packets of audio data is corresponding with the sound channel in audio broadcasting demand;
Audio transmission unit transmits bluetooth data packets for third packets of audio data to be encapsulated into bluetooth data packets To bluetooth slave devices.
According to above-mentioned bluetooth equipment audio processing system, Audio pre-processing unit is receiving the first audio number to be played When according to packet, it is pre-processed, obtains the independent frequency domain data of sound channel, frequency domain data of the audio coding unit to separate channels Carry out compressed encoding respectively, obtain corresponding second audio data packet, audio distribution unit according to bluetooth slave devices audio Broadcasting demand, chooses the third packets of audio data of corresponding sound channel from second audio data packet, and audio transmission unit is by third sound Frequency packet encapsulation is transmitted to bluetooth slave devices into bluetooth data packets, by bluetooth data packets, and bluetooth slave devices can be broadcast Put the audio of corresponding sound channel;Above system can be applied in bluetooth host equipment, carry out compressed encoding to audio data, according to The audio of bluetooth slave devices plays the packets of audio data that demand transmits corresponding sound channel, can substantially reduce audio data transmission Amount reduces corresponding spatial cache, while keeping audio sound quality in the independent audio of bluetooth slave devices broadcasting sound channel, thus Promote the performance of bluetooth equipment.
A kind of readable storage medium storing program for executing is stored with executable program on readable storage medium storing program for executing, the executable code processor The step of above-mentioned bluetooth equipment audio-frequency processing method is realized when execution.
Above-mentioned readable storage medium storing program for executing realizes by the executable program that it is stored and carries out compressed encoding to audio data, The packets of audio data that demand transmission determines corresponding sound channel is played according to the audio of bluetooth slave devices, audio number can be substantially reduced According to transmission quantity, reduce corresponding spatial cache, while keeping audio sound quality when bluetooth slave devices play audio, to be promoted The performance of bluetooth equipment.
A kind of bluetooth host equipment, including memory and processor, memory are stored with executable program, and processor executes The step of above-mentioned bluetooth equipment audio-frequency processing method is realized when executable program.
Above-mentioned bluetooth host equipment is realized and is pressed audio data by running executable program on a processor Code is reduced the staff, the packets of audio data that demand transmission determines corresponding sound channel is played according to the audio of bluetooth slave devices, can be dropped significantly Bass volume of transmitted data reduces corresponding spatial cache, while keeping audio sound quality when bluetooth slave devices play audio, To promote the performance of bluetooth equipment.
A kind of bluetooth equipment audio-frequency processing method, includes the following steps:
Above-mentioned bluetooth data packets are received from bluetooth host equipment, and third packets of audio data is obtained from bluetooth data packets;
Third packets of audio data is parsed, header packet information and Bao Nei data are obtained;
Header packet information is verified, if verification passes through, data in wrapping is parsed, target frequency domain data is obtained;
The second time domain PCM data is converted by target frequency domain data, the second time domain PCM data is sent to local DAC and is filled It sets, with bluetooth host equipment synchronously playing audio frequency, wherein bluetooth host equipment plays demand from each second audio number according to audio According to the 4th packets of audio data is chosen in packet, the 4th packets of audio data is decoded, the first time domain PCM data is obtained, by first Time domain PCM data is sent to the DAC device of bluetooth host equipment and plays audio.
It is the bluetooth number received from bluetooth host equipment in the above method according to above-mentioned bluetooth equipment audio-frequency processing method According to packet, third packets of audio data is therefrom obtained, it is verified and is parsed, when obtaining target frequency domain data and being converted to second Domain PCM data, by local the second time domain of DAC device plays PCM data, meanwhile, bluetooth host equipment plays demand according to audio The 4th packets of audio data is chosen, it is decoded, obtains the first time domain PCM data, and by the DAC equipment of bluetooth host equipment Play the first time domain PCM data, the DAC equipment synchronously playing audio frequency of local DAC equipment and bluetooth host equipment;The above method can To apply in bluetooth slave devices, bluetooth slave devices receive the blue-teeth data comprising separate channels packets of audio data, independent Channel audio data packet is compress coding data, and amount of audio data is small, can substantially reduce audio data transmission quantity, reduces and corresponds to Spatial cache, while keeping audio sound quality when bluetooth slave devices play the independent audio of sound channel, set to promote bluetooth Standby performance.
A kind of bluetooth equipment audio processing system, including:
Audio receiving unit is obtained from bluetooth data packets for receiving above-mentioned bluetooth data packets from bluetooth host equipment Take third packets of audio data;
Resolution unit is verified, for parsing to third packets of audio data, obtains header packet information and Bao Nei data;To packet Head information is verified, if verification passes through, is parsed to data in wrapping, is obtained target frequency domain data;
Transmission unit is converted, for converting the second time domain PCM data for target frequency domain data, by the second time domain PCM number According to local DAC device is sent to, with bluetooth host equipment synchronously playing audio frequency, wherein bluetooth host equipment is played according to audio Demand chooses the 4th packets of audio data from each second audio data packet, is decoded to the 4th packets of audio data, obtains first First time domain PCM data is sent to the DAC device of bluetooth host equipment and plays audio by time domain PCM data.
A kind of readable storage medium storing program for executing is stored with executable program on readable storage medium storing program for executing, the executable code processor The step of above-mentioned bluetooth equipment audio-frequency processing method is realized when execution.
Above-mentioned readable storage medium storing program for executing realizes reception and includes separate channels audio number by the executable program that it is stored According to the blue-teeth data of packet, separate channels packets of audio data is compress coding data, and amount of audio data is small, can substantially reduce audio Volume of transmitted data reduces corresponding spatial cache, while keeping audio in the independent audio of bluetooth slave devices broadcasting sound channel Sound quality, to promote the performance of bluetooth equipment.
A kind of bluetooth slave devices, including memory and processor, memory are stored with executable program, and processor executes The step of above-mentioned bluetooth equipment audio-frequency processing method is realized when executable program.
Above-mentioned bluetooth slave devices realize reception and include separate channels by running executable program on a processor The blue-teeth data of packets of audio data, separate channels packets of audio data are compress coding datas, and amount of audio data is small, can be dropped significantly Bass volume of transmitted data reduces corresponding spatial cache, while protecting in the independent audio of bluetooth slave devices broadcasting sound channel Audio sound quality is held, to promote the performance of bluetooth equipment.
A kind of bluetooth equipment, including bluetooth host equipment and bluetooth slave devices;
Bluetooth host equipment locates the first packets of audio data when receiving the first packets of audio data to be played in advance Reason obtains the independent frequency domain data of sound channel;Compressed encoding is carried out to the frequency domain data of different sound channels respectively, obtains corresponding sound channel Second audio data packet;Demand is played according to the audio of bluetooth slave devices, third sound is chosen from each second audio data packet Frequency data packet, wherein third packets of audio data is corresponding with the sound channel in audio broadcasting demand;By third audio data encapsulation Into bluetooth data packets, bluetooth data packets are transmitted to bluetooth slave devices;
Bluetooth host equipment plays demand according to audio and chooses the 4th packets of audio data from each second audio data packet, right 4th packets of audio data is decoded, and obtains the first time domain PCM data, the first time domain PCM data is sent to bluetooth host and is set Standby DAC device.
Bluetooth slave devices obtain third packets of audio data from the bluetooth data packets received;To third packets of audio data It is parsed, obtains header packet information and Bao Nei data;Header packet information is verified, if verification passes through, data in wrapping are carried out Parsing obtains target frequency domain data;The second time domain PCM data is converted by target frequency domain data, the second time domain PCM data is sent out It send to the DAC device of bluetooth slave devices, the DAC device synchronously playing audio frequency with bluetooth host equipment.
Detailed description of the invention
Fig. 1 is the application scenario diagram of bluetooth equipment audio-frequency processing method in one embodiment;
Fig. 2 is the flow diagram of bluetooth equipment audio-frequency processing method in one embodiment;
Fig. 3 is the structural schematic diagram of bluetooth equipment audio processing system in one embodiment;
Fig. 4 is the structural schematic diagram of bluetooth equipment audio processing system in another embodiment;
Fig. 5 is the flow diagram of bluetooth equipment audio-frequency processing method in another embodiment;
Fig. 6 is the structural schematic diagram of bluetooth equipment audio processing system in another embodiment;
Fig. 7 is the relation schematic diagram of bluetooth equipment in one embodiment;
Fig. 8 is the flow diagram of bluetooth host equipment processing packets of audio data in one embodiment;
Fig. 9 is the flow diagram of bluetooth host equipment processing frequency domain data in one embodiment;
Figure 10 is one embodiment sound intermediate frequency packet encapsulation form schematic diagram.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention more comprehensible, with reference to the accompanying drawings and embodiments, to this Invention is described in further detail.It should be appreciated that the specific embodiments described herein are only used to explain the present invention, And the scope of protection of the present invention is not limited.
It should be noted that term involved in the embodiment of the present invention " first second third " be only be that difference is similar Object, do not represent the particular sorted for object, it is possible to understand that ground, " Yi Er third " can be in the case where permission Exchange specific sequence or precedence.It should be understood that the object that " first second third " is distinguished in the appropriate case can be mutual It changes, so that the embodiment of the present invention described herein can be real with the sequence other than those of illustrating or describing herein It applies.
Bluetooth equipment audio-frequency processing method provided by the present application, can be applied in application environment as shown in Figure 1.Its In, bluetooth host equipment is communicated with bluetooth slave devices.Bluetooth host equipment is receiving packets of audio data to be played When, packets of audio data is handled, demand is played according to the audio of bluetooth slave devices, chooses the audio data of corresponding sound channel Packet, is encapsulated into bluetooth data packets and is transmitted to bluetooth slave devices, and bluetooth slave devices extract in bluetooth data packets Audio data handles it and is played.Wherein, bluetooth host equipment and bluetooth slave devices may each be various and have indigo plant The equipment of tooth communication and audio playing function, such as personal computer, laptop, palm PC, smart phone, plate electricity Brain, portable wearable device, Baffle Box of Bluetooth etc., bluetooth slave devices can have multiple.
It is shown in Figure 2, it is the flow diagram of the bluetooth equipment audio-frequency processing method of one embodiment of the invention.The reality The bluetooth equipment audio-frequency processing method applied in example includes the following steps:
Step S110:When receiving the first packets of audio data to be played, the first packets of audio data is pre-processed, Obtain the independent frequency domain data of sound channel;
In this step, the first packets of audio data to be played can be from extraneous received audio data, the first audio Data packet can be stored in local spatial cache;The frequency domain data of different sound channels is different, the independent frequency domain number of sound channel According to data volume be less than original audio data data volume;
Step S120:Compressed encoding is carried out to the frequency domain data of different sound channels respectively, obtains the second audio of corresponding sound channel Data packet;
In this step, the frequency domain data of different sound channels is to need the corresponding frequency domain data of sound channel that plays out, into When row two-channel plays, there are two the frequency domain datas of sound channel;When carrying out quadraphonic broadcasting, there are four the frequency domain datas of sound channel;
Step S130:Demand is played according to the audio of bluetooth slave devices, chooses third from each second audio data packet Packets of audio data, wherein third packets of audio data is corresponding with the sound channel in audio broadcasting demand;
In this step, bluetooth slave devices play demand according to audio and carry out audio broadcasting using corresponding sound channel;
Step S140:Third packets of audio data is encapsulated into bluetooth data packets, by bluetooth data packets be transmitted to bluetooth from Machine equipment.
In this step, third packets of audio data is encapsulated in bluetooth data packets, and indigo plant is transmitted in the form of Bluetooth signal Tooth slave devices, bluetooth slave devices can play out the audio data in third packets of audio data.
In the present embodiment, when receiving the first packets of audio data to be played, it is pre-processed, obtains sound channel Independent frequency domain data carries out compressed encoding to the frequency domain data of separate channels respectively, obtains corresponding second audio data packet, Demand is played according to the audio of bluetooth slave devices, the third audio data of corresponding sound channel is chosen from second audio data packet Packet encapsulates into bluetooth data packets, bluetooth data packets is transmitted to bluetooth slave devices, bluetooth slave devices can play correspondence The audio of sound channel;The above method can be applied in bluetooth host equipment, and bluetooth host equipment carries out compression volume to audio data Code plays the packets of audio data that demand transmits corresponding sound channel according to the audio of bluetooth slave devices, can substantially reduce audio number According to transmission quantity, reduce corresponding spatial cache, while keeping audio sound in the independent audio of bluetooth slave devices broadcasting sound channel Matter, to promote the performance of bluetooth equipment.
It should be noted that being established with bluetooth slave devices before bluetooth data packets are transmitted to bluetooth slave devices Bluetooth connection is played, received first packets of audio data to be played can be from mobile phone terminal or other audio data transmitting terminals Audio data.
In one embodiment, the first packets of audio data is pre-processed, obtains the step of the independent frequency domain data of sound channel Suddenly include the following steps:
First packets of audio data is parsed, audio frame head and intraframe data are obtained;
CRC check is carried out to audio frame head, if verification passes through, bit stream distribution, inverse quantization and solid are carried out to intraframe data Sonication obtains frequency domain data.
In the present embodiment, when pre-processing to the first packets of audio data, parsing obtains audio frame head and frame therein Interior data first carry out CRC check (Cyclic Redundancy Check, cyclic redundancy check) to audio frame head, examination first Whether frame originating point information is correct in packets of audio data, under conditions of CRC check passes through, shows the data in the first packets of audio data Accurately, interference is not received, and the operations such as bit stream distribution, inverse quantization and three-dimensional sonication can be carried out to intraframe data, are corresponded to The frequency domain data of sound channel;Carrying out CRC check may insure the integrality of the audio data received, obtain accurate separate channels Frequency domain data.
Further, if CRC check does not pass through, show that the first audio data bag data is wrong or checking procedure malfunctions, Subsequent operation can not be carried out to audio data, the first packets of audio data be parsed again, alternatively, to the first audio is sent The terminal of data packet is initiated to retransmit request, receives the first packets of audio data again.
In one embodiment, the step of carrying out CRC check to audio frame head includes the following steps:
The target information in audio frame head is obtained, target information includes sound channel mode, sample rate, code rate, block mode, bit stream Allocation model, sub-band scheme, zoom factor and the first CRC check value;
The is obtained according to sound channel mode, sample rate, code rate, block mode, bit stream allocation model, sub-band scheme and zoom factor Two CRC check values determine that CRC check passes through if the first CRC check value is consistent with the second CRC check value.
In the present embodiment, audio frame head is parsed, obtains sound channel mode therein, sample rate, code rate, block mould The information such as formula, bit stream allocation model, sub-band scheme, zoom factor and the first CRC check value, the first CRC check value are originally to remember Record in audio frame head for verify compare, using above-mentioned sound channel mode, sample rate, code rate, block mode, bit stream allocation model, The information such as sub-band scheme, zoom factor calculate the second CRC check value, and compared with the first CRC check value, if unanimously, showing Audio-frequency information does not change, and audio data is normal, it is possible to determine that CRC check passes through, and is verified using Audio attribute information It can guarantee the correctness and integrality of data transmission.
In one embodiment, compressed encoding carried out to the frequency domain data of different sound channels respectively, obtains the of corresponding sound channel The step of two packets of audio data, includes the following steps:
Bit stream distribution, quantization and master data are carried out according to frequency domain data of the coding parameter to any sound channel to encapsulate, and are obtained only The coded data of vertical sound channel;
The coded data of separate channels is packaged, second audio data packet is obtained.
In the present embodiment, different coding methods is different to the treatment process of frequency domain data, can be with reference encoder parameter Frequency domain data is handled, is encapsulated by bit stream distribution, quantization and master data, obtains the coded data of separate channels, in turn Second audio data packet is obtained, the coding of the frequency domain data of separate channels can be completed through the above way, and makes the second audio Data packet is corresponding with sound channel.
In one embodiment, the step of being packaged to the coded data of separate channels includes the following steps:
Audio attribute information is obtained according to coded data, third CRC check value is obtained according to Audio attribute information, by audio Attribute information and third CRC check value are as header packet information, using coded data as master data in wrapping, generation second audio data Packet.
In the present embodiment, it when generating second audio data packet, needs to add necessary header packet information in the packet, The header packet information mainly includes Audio attribute information, using the available third CRC check value of the Audio attribute information, and is added In header packet information, for being verified to second audio data packet, it is ensured that second audio data packet can be by completely correctly It receives.
Further, Audio attribute information may include packet synchronization character, audio essential information, energy grade, Bale No. information, Frame number information etc. in wrapping, the interior frame number information of packet is corresponding with the frame number of coded data in second audio data packet, audio essential information Including code rate information, code rate is fixed in same packets of audio data, and code rate is variable in different packets of audio data, different packets of audio data It may include different frame numbers, indicated by frame number information in the packet in header packet information.It should be noted that second audio data packet with Sound channel is corresponding, and corresponding separate channels can have multiple second audio data packets.
Further, the frame number compressed can be calculated according to points, the sample rate of frame each in packets of audio data According to length, to each frame compressed data carry out byte-aligned processing, to save data capacity.
In one embodiment, bluetooth equipment audio-frequency processing method is further comprising the steps of:
Demand is played according to local audio, the 4th packets of audio data is chosen from each second audio data packet, to the 4th Packets of audio data is decoded, and obtains the first time domain PCM data;
First time domain PCM data is sent to local DAC device, with bluetooth slave devices synchronously playing audio frequency, wherein blue Tooth slave devices obtain third packets of audio data from bluetooth data packets, are decoded to third packets of audio data, obtain second Second time domain PCM data is sent to the DAC device of bluetooth slave devices and plays audio by time domain PCM data.
In the present embodiment, locally the 4th packets of audio data can be chosen by broadcasting demand, and it is decoded, obtain the One time domain PCM (Pulse Code Modulation, pulse code modulation) data, and it is sent to local DAC (Digital to Analog converter, digital-to-analogue conversion) device, DAC device can directly play decoded time domain PCM data; For bluetooth slave devices after obtaining third packets of audio data, decoding obtains the second time domain PCM data, is sent to bluetooth slave and sets Standby DAC device realizes the hearing effect of audio stereo with local DAC device synchronously playing audio frequency.
According to above-mentioned bluetooth equipment audio-frequency processing method, the embodiment of the present invention also provides a kind of bluetooth equipment audio processing system System, just the embodiment of bluetooth equipment audio processing system of the invention is described in detail below.
It is shown in Figure 3, it is the structural schematic diagram of the bluetooth equipment audio processing system of one embodiment of the invention.The reality The bluetooth equipment audio processing system applied in example includes:
Audio pre-processing unit 210, for when receiving the first packets of audio data to be played, to the first audio data Packet is pre-processed, and the independent frequency domain data of sound channel is obtained;
Audio coding unit 220 carries out compressed encoding for the frequency domain data to different sound channels respectively, obtains corresponding sound channel Second audio data packet;
Audio distribution unit 230, for playing demand according to the audio of bluetooth slave devices, from each second audio data packet Middle selection third packets of audio data, wherein third packets of audio data is corresponding with the sound channel in audio broadcasting demand;
Audio transmission unit 240 passes bluetooth data packets for third packets of audio data to be encapsulated into bluetooth data packets Transport to bluetooth slave devices.
In the present embodiment, Audio pre-processing unit carries out it when receiving the first packets of audio data to be played Pretreatment, obtains the independent frequency domain data of sound channel, and audio coding unit carries out compression volume to the frequency domain data of separate channels respectively Code obtains corresponding second audio data packet, and audio distribution unit plays demand according to the audio of bluetooth slave devices, from second Choose the third packets of audio data of corresponding sound channel in packets of audio data, audio transmission unit is by third audio data encapsulation to indigo plant In tooth data packet, bluetooth data packets are transmitted to bluetooth slave devices, bluetooth slave devices can play the audio of corresponding sound channel; Above system can be applied in bluetooth host equipment, compressed encoding be carried out to audio data, according to the sound of bluetooth slave devices Frequency plays the packets of audio data that demand transmits corresponding sound channel, can substantially reduce audio data transmission quantity, reduce corresponding caching Space, while audio sound quality is kept in the independent audio of bluetooth slave devices broadcasting sound channel, to promote the property of bluetooth equipment Energy.
In one embodiment, Audio pre-processing unit 210 parses the first packets of audio data, obtains audio frame head And intraframe data;CRC check is carried out to audio frame head, if verification passes through, bit stream distribution, inverse quantization is carried out to intraframe data and stood Body sonication obtains frequency domain data.
Audio pre-processing unit 210 obtains the target information in audio frame head, target information in one of the embodiments, Including sound channel mode, sample rate, code rate, block mode, bit stream allocation model, sub-band scheme, zoom factor and the first CRC check Value;The 2nd CRC is obtained according to sound channel mode, sample rate, code rate, block mode, bit stream allocation model, sub-band scheme and zoom factor Check value determines that CRC check passes through if the first CRC check value is consistent with the second CRC check value.
In one of the embodiments, audio coding unit 220 according to coding parameter to the frequency domain data of any sound channel into The distribution of line position stream, quantization and master data encapsulation, obtain the coded data of separate channels;The coded data of separate channels is sealed Dress obtains second audio data packet.
Audio coding unit 220 obtains Audio attribute information according to coded data in one of the embodiments, according to sound Frequency attribute information obtains third CRC check value and will encode using Audio attribute information and third CRC check value as header packet information Data generate second audio data packet as master data in wrapping.
In one of the embodiments, as shown in figure 4, bluetooth equipment audio processing system further includes audio conversion unit 250;
Audio conversion unit 250 is used to play demand according to local audio, and the is chosen from each second audio data packet Four packets of audio data are decoded the 4th packets of audio data, obtain the first time domain PCM data;First time domain PCM data is sent out It send to local DAC device, with bluetooth slave devices synchronously playing audio frequency;Wherein, bluetooth slave devices are obtained from bluetooth data packets Third packets of audio data is taken, third packets of audio data is decoded, the second time domain PCM data is obtained, by the second time domain PCM number According to the DAC device for being sent to bluetooth slave devices and play audio.
Bluetooth equipment audio processing system of the invention is corresponding with bluetooth equipment audio-frequency processing method of the invention, upper It states technical characteristic described in the embodiment of bluetooth equipment audio-frequency processing method and its advantages and is suitable for bluetooth equipment sound In the embodiment of frequency processing system.
According to above-mentioned bluetooth equipment audio-frequency processing method, the embodiment of the present invention also provides a kind of readable storage medium storing program for executing and one kind Bluetooth host equipment.
A kind of readable storage medium storing program for executing, is stored thereon with executable program, which realizes when executing The step of above-mentioned bluetooth equipment audio-frequency processing method.
Above-mentioned readable storage medium storing program for executing realizes by the executable program that it is stored and carries out compressed encoding to audio data, The packets of audio data that demand transmission determines corresponding sound channel is played according to the audio of bluetooth slave devices, audio number can be substantially reduced According to transmission quantity, reduce corresponding spatial cache, while keeping audio sound quality when bluetooth slave devices play audio, to be promoted The performance of bluetooth equipment.
A kind of bluetooth host equipment, including memory and processor, memory are stored with executable program, and processor executes The step of above-mentioned bluetooth equipment audio-frequency processing method is realized when executable program.
Above-mentioned bluetooth host equipment is realized and is pressed audio data by running executable program on a processor Code is reduced the staff, the packets of audio data that demand transmission determines corresponding sound channel is played according to the audio of bluetooth slave devices, can be dropped significantly Bass volume of transmitted data reduces corresponding spatial cache, while keeping audio sound quality when bluetooth slave devices play audio, To promote the performance of bluetooth equipment.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, program can be stored in a non-volatile computer-readable storage In medium, in embodiment, which be can be stored in the storage medium of computer system, and by the computer system extremely A few processor executes, and includes the process such as the embodiment of above-mentioned bluetooth equipment audio-frequency processing method with realization.Wherein, it stores Medium can be magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
According to above-mentioned bluetooth equipment audio-frequency processing method, the embodiment of the present invention also provides another bluetooth equipment audio processing Method, just the embodiment of another bluetooth equipment audio-frequency processing method of the invention is described in detail below.
It is shown in Figure 5, it is the flow diagram of the bluetooth equipment audio-frequency processing method of one embodiment of the invention.The reality The bluetooth equipment audio-frequency processing method applied in example includes the following steps:
Step S310:Above-mentioned bluetooth data packets are received from bluetooth host equipment, and third sound is obtained from bluetooth data packets Frequency data packet;
Step S320:Third packets of audio data is parsed, header packet information and Bao Nei data are obtained;
Step S330:Header packet information is verified, if verification passes through, data in wrapping are parsed, obtain target frequency Numeric field data;
Step S340:The second time domain PCM data is converted by target frequency domain data, the second time domain PCM data is sent to Local DAC device, with bluetooth host equipment synchronously playing audio frequency, wherein bluetooth host equipment plays demand from each according to audio The 4th packets of audio data is chosen in second audio data packet, the 4th packets of audio data is decoded, and obtains the first time domain PCM number According to the first time domain PCM data is sent to the DAC device of bluetooth host equipment and plays audio.
In the present embodiment, the bluetooth data packets in the above method are received from bluetooth host equipment, therefrom obtains third sound Frequency data packet, verifies it and is parsed, and obtains target frequency domain data and is converted to the second time domain PCM data, by local DAC Device plays the second time domain PCM data, meanwhile, bluetooth host equipment plays demand according to audio and chooses the 4th packets of audio data, It is decoded, obtains the first time domain PCM data, and by DAC device plays the first time domain PCM number of bluetooth host equipment According to the DAC equipment synchronously playing audio frequency of local DAC equipment and bluetooth host equipment;The above method can be applied in bluetooth slave In equipment, bluetooth slave devices receive the blue-teeth data comprising separate channels packets of audio data, and separate channels packets of audio data is Compress coding data, amount of audio data is small, can substantially reduce audio data transmission quantity, reduces corresponding spatial cache, simultaneously Audio sound quality is kept in the independent audio of bluetooth slave devices broadcasting sound channel, to promote the performance of bluetooth equipment.
Further, when parsing to third packets of audio data, the synchronization in third packets of audio data can first be verified Word determines packet header position with this, obtains header packet information and Bao Nei data.
It should be noted that the audio data of frame compressions several in packet is passed through bit stream when parsing to data in wrapping The processing such as distribution, inverse quantization, obtains frequency domain data.
In one embodiment, the step of verifying to header packet information includes the following steps:
Bale No. information is obtained from header packet information, is not connected in Bale No. information and the Bale No. information of upper third packets of audio data When continuous, initiate to retransmit request or mend to bluetooth host equipment according to audio broadcasting demand to wrap request.
In the present embodiment, Bale No. information is used to indicate that the information of third packets of audio data sequence, utilizes current third The Bale No. information in Bale No. information and a received upper third packets of audio data in packets of audio data, judges whether the two connects It is continuous, if so, showing that received third packets of audio data is not broken continuously;Otherwise, show that the feelings of packet loss occurs in third packets of audio data Condition can be initiated to retransmit request to bluetooth host equipment or mend packet request, to guarantee the integrality of third packets of audio data, retransmit Request or the request of benefit packet can play demand according to actual audio to select, to adapt to using needs.
In one embodiment, the step of verifying to header packet information includes the following steps:
The third CRC check value in header packet information is obtained, according to other letters in header packet information in addition to third CRC check value Breath obtains the 4th CRC check value;
If third CRC check value is consistent with the 4th CRC check value, determine that verification passes through.
In the present embodiment, header packet information includes the attribute information of third CRC check value and audio data, utilizes audio category Property information calculate the 4th CRC check value, and compared with third CRC check value, if unanimously, showing that audio-frequency information does not change Become, audio data is normal, it is possible to determine that CRC check passes through, and carrying out verification using Audio attribute information can guarantee that data are transmitted Correctness and integrality.
It should be noted that CRC check can be used to the checking procedure of header packet information, it can also be using other forms Data verification method.
According to above-mentioned bluetooth equipment audio-frequency processing method, the embodiment of the present invention also provides a kind of bluetooth equipment audio processing system System, just the embodiment of bluetooth equipment audio processing system of the invention is described in detail below.
It is shown in Figure 6, it is the structural schematic diagram of the bluetooth equipment audio processing system of one embodiment of the invention.The reality The bluetooth equipment audio processing system applied in example includes:
Audio receiving unit 410, for receiving above-mentioned bluetooth data packets from bluetooth host equipment, from bluetooth data packets Obtain third packets of audio data;
Resolution unit 420 is verified, for parsing to third packets of audio data, obtains header packet information and Bao Nei data; Header packet information is verified, if verification passes through, data in wrapping is parsed, target frequency domain data is obtained;
Transmission unit 430 is converted, for converting the second time domain PCM data for target frequency domain data, by the second time domain PCM Data are sent to local DAC device, with bluetooth host equipment synchronously playing audio frequency, wherein bluetooth host equipment is broadcast according to audio It puts demand and chooses the 4th packets of audio data from each second audio data packet, the 4th packets of audio data is decoded, obtain the First time domain PCM data is sent to the DAC device of bluetooth host equipment and plays audio by one time domain PCM data.
In the present embodiment, audio receiving unit 410 receives the bluetooth data packets in the above method from bluetooth host equipment, Third packets of audio data is therefrom obtained, verification resolution unit 420 is verified and parsed to it, is obtained target frequency domain data, is turned Change transmission unit 430 and converts it into the second time domain PCM data, by local the second time domain of DAC device plays PCM data, meanwhile, Bluetooth host equipment plays demand according to audio and chooses the 4th packets of audio data, is decoded to it, obtains the first time domain PCM number According to, and by DAC device plays the first time domain PCM data of bluetooth host equipment, local DAC equipment and bluetooth host equipment DAC equipment synchronously playing audio frequency;Above system can be applied in bluetooth slave devices, and bluetooth slave devices are received comprising independent The blue-teeth data of channel audio data packet, separate channels packets of audio data are compress coding datas, and amount of audio data is small, Ke Yi great It is big to reduce audio data transmission quantity, reduce corresponding spatial cache, while playing the independent audio of sound channel in bluetooth slave devices When keep audio sound quality, to promote the performance of bluetooth equipment.
In one embodiment, verification resolution unit 420 Bale No. information is obtained from header packet information, Bale No. information with it is upper When the Bale No. information of one third packets of audio data is discontinuous, demand is played according to audio and initiates to retransmit request to bluetooth host equipment Or mend packet request.
Bluetooth equipment audio processing system of the invention is corresponding with bluetooth equipment audio-frequency processing method of the invention, upper It states technical characteristic described in the embodiment of bluetooth equipment audio-frequency processing method and its advantages and is suitable for bluetooth equipment sound In the embodiment of frequency processing system.
According to above-mentioned bluetooth equipment audio-frequency processing method, the embodiment of the present invention also provides a kind of readable storage medium storing program for executing and one kind Bluetooth slave devices.
A kind of readable storage medium storing program for executing, is stored thereon with executable program, which realizes when executing The step of above-mentioned bluetooth equipment audio-frequency processing method.
Above-mentioned readable storage medium storing program for executing realizes reception and includes separate channels audio number by the executable program that it is stored According to the blue-teeth data of packet, separate channels packets of audio data is compress coding data, and amount of audio data is small, can substantially reduce audio Volume of transmitted data reduces corresponding spatial cache, while keeping audio in the independent audio of bluetooth slave devices broadcasting sound channel Sound quality, to promote the performance of bluetooth equipment.
A kind of bluetooth slave devices, including memory and processor, memory are stored with executable program, and processor executes The step of above-mentioned bluetooth equipment audio-frequency processing method is realized when executable program.
Above-mentioned bluetooth slave devices realize reception and include separate channels by running executable program on a processor The blue-teeth data of packets of audio data, separate channels packets of audio data are compress coding datas, and amount of audio data is small, can be dropped significantly Bass volume of transmitted data reduces corresponding spatial cache, while protecting in the independent audio of bluetooth slave devices broadcasting sound channel Audio sound quality is held, to promote the performance of bluetooth equipment.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, program can be stored in a non-volatile computer-readable storage In medium, in embodiment, which be can be stored in the storage medium of computer system, and by the computer system extremely A few processor executes, and includes the process such as the embodiment of above-mentioned bluetooth equipment audio-frequency processing method with realization.Wherein, it stores Medium can be magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
According to above-mentioned bluetooth equipment audio-frequency processing method, the embodiment of the present invention also provides a kind of bluetooth equipment, below just originally A kind of embodiment of bluetooth equipment of invention is described in detail.
It is shown in Figure 7, it is the structural schematic diagram of the bluetooth equipment of one embodiment of the invention.Bluetooth in the embodiment Equipment includes bluetooth host equipment 510 and bluetooth slave devices 520;
Bluetooth host equipment 510 carries out the first packets of audio data when receiving the first packets of audio data to be played Pretreatment obtains the independent frequency domain data of sound channel;Compressed encoding is carried out to the frequency domain data of different sound channels respectively, is obtained at the sound The second audio data packet in road;Demand is played according to the audio of bluetooth slave devices 520, is chosen from each second audio data packet Third packets of audio data, wherein third packets of audio data is corresponding with the sound channel in audio broadcasting demand;By third audio data Encapsulating is attached in bluetooth data packets, and bluetooth data packets are transmitted to bluetooth slave devices 520;
Bluetooth host equipment 510 plays demand according to audio and chooses the 4th audio data from each second audio data packet Packet, is decoded the 4th packets of audio data, obtains the first time domain PCM data, the first time domain PCM data is sent to bluetooth master The DAC device of machine equipment 510.
Bluetooth slave devices 520 obtain third packets of audio data from the bluetooth data packets received;To third audio number It is parsed according to packet, obtains header packet information and Bao Nei data;Header packet information is verified, if verification passes through, to data in wrapping It is parsed, obtains target frequency domain data;The second time domain PCM data is converted by target frequency domain data, by the second time domain PCM number DAC device synchronously playing audio frequency according to the DAC device for being sent to bluetooth slave devices 520, with bluetooth host equipment 510.
In the present embodiment, bluetooth host equipment 510 carries out it when receiving the first packets of audio data to be played Pretreatment obtains the independent frequency domain data of sound channel, carries out compressed encoding respectively to the frequency domain data of separate channels, obtains corresponding Second audio data packet plays demand according to the audio of bluetooth slave devices 520, chooses from second audio data packet at the sound The third packets of audio data in road encapsulates into bluetooth data packets, bluetooth data packets is transmitted to bluetooth slave devices 520, bluetooth Slave devices 520 obtain third packets of audio data from bluetooth data packets, are verified and are parsed to it, and target frequency domain number is obtained According to and be converted to the second time domain PCM data, by local the second time domain of DAC device plays PCM data, meanwhile, bluetooth host equipment 510, which play demand according to audio, chooses the 4th packets of audio data, is decoded to it, obtains the first time domain PCM data, and by indigo plant DAC device plays the first time domain PCM data of tooth host equipment 510, the DAC of local DAC equipment and bluetooth host equipment 510 are set Standby synchronously playing audio frequency;By the above process, independence can be played simultaneously in bluetooth host equipment 510 and bluetooth slave devices 520 The audio of sound channel ensures audio sound quality and audio by the audio broadcasting of multichannel, and is transferred through the sound channel of compressed encoding Independent amount of audio data is small relative to general amount of audio data, and reduction audio data transmission quantity can effectively reduce corresponding Spatial cache, to promote the performance of bluetooth equipment.
Further, bluetooth host equipment 510 can access public network by modes such as wired or wireless ways, such as Internet etc. is communicated with other terminals or server, receive and buffered audio data, arrange packets of audio data it It is sent afterwards to bluetooth slave devices 520.
In one embodiment, bluetooth equipment audio-frequency processing method can be applied in bluetooth in case.
Bluetooth includes bluetooth host equipment and bluetooth slave devices to case, and bluetooth slave devices can have multiple.
The audio number of advanced audio SBC (Sub Band Code, sub-band coding) format that bluetooth host equipment is received According to packet carry out framing pretreatment, as shown in figure 8, mainly have audio frame originating point information parsing, including sound channel mode, sample rate, code rate, Block mode, bit stream allocation model, sub-band scheme, SBC scale factor information and CRC check value C0, then carry out CRC check, Calculating sound channel mode, sample rate, code rate, block mode, bit stream allocation model, sub-band scheme, SBC scale factor information, these are heavy It wants the CRC of information to obtain C1, whether consistent compares C0 and C1.Look for the synchronization header parsing in packets of audio data again if inconsistent Audio frame originating point information such as unanimously carries out bit stream allocation plan parsing, frequency domain data inverse quantization again, and three-dimensional sonication obtains sound channel Independent frequency domain data.
Compressed encoding processing is carried out to frequency domain data according to different sound channels.As shown in figure 9, mainly including being joined according to coding Several pairs of frequency domain datas carry out bit stream distribution, quantization, master data encapsulation, then by audio data encapsulation, according to shown in Figure 10 Format is plus frame number information in packet synchronization character, audio essential information, energy grade, Bale No. information, packet, and these are important to packet header Information does CRC check, and CRC check value is attached to thereafter, in addition the corresponding main number encoded for wrapping frame number shown in interior frame number information According to the formation independent packets of audio data of sound channel.Two independent voice data streams are then formed if it is two-channel, if it is the four tones of standard Chinese pronunciation Road then forms four independent voice data streams, then forms the independent voice data stream of corresponding number if it is more multichannel.Again The length that the frame data compressed are calculated according to the points of each frame, sample rate does byte pair to each frame compressed data It is neat to handle, it include code rate information in audio essential information, code rate is fixed in same packets of audio data, and different audio pack code rates can Become.Different packets of audio data may include different frame number, be indicated by frame number information in the variable packet in packet header.
Bluetooth host equipment encapsulates the audio data in a selected channel according to the broadcasting demand of bluetooth slave devices It is attached in bluetooth data packets, is transferred to a bluetooth slave devices.Bluetooth slave devices parse corresponding packets of audio data, school It tests synchronization character and determines packet header position, parse audio essential information, energy grade, Bale No. information, frame number information in packet, the school CRC Test value.By comparing the crc value of calculated crc value and header packet information, whether consistent or other data verification methods determine packet Whether head important information correct, Bale No. information and upper one wrap it is whether continuous, judge the audio data of Bluetooth transmission either with or without packet loss, It is determined according to application demand and requires to retransmit or mend packet.Bluetooth slave devices execute decoding process corresponding with compressed encoding, The voice data stream of several frame compressions is handled by bit stream distribution, inverse quantization etc. in packet, is obtained frequency domain data, is finally passed through SBC Subband synthesis filter group, the time domain PCM data for being decoded as directly playing are pushed to DAC.
Another aspect bluetooth host equipment also selectes the packets of audio data in a channel according to the demand of broadcasting, is directly solved Code stream journey, obtains time domain data, synchronizes broadcasting with bluetooth slave devices.
It so can be while keeping advanced audio compared with high tone quality, according to broadcasting demand to the separate channels for needing to forward Audio carry out frequency domain compression, greatly reduce audio data transmission quantity on the basis of increasing a small amount of operation, correspondence can be reduced Spatial cache, to promote bluetooth performance.
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, all should be considered as described in this specification.
Those of ordinary skill in the art will appreciate that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program.The program can be stored in a computer readable storage medium. The program when being executed, includes the steps that described in the above method.The storage medium, including:ROM/RAM, magnetic disk, CD Deng.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the invention Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (12)

1. a kind of bluetooth equipment audio-frequency processing method, which is characterized in that include the following steps:
When receiving the first packets of audio data to be played, first packets of audio data is pre-processed, obtains sound channel Independent frequency domain data;
Compressed encoding is carried out to the frequency domain data of different sound channels respectively, obtains the second audio data packet of corresponding sound channel;
Demand is played according to the audio of bluetooth slave devices, third audio data is chosen from each second audio data packet Packet, wherein the third packets of audio data is corresponding with the sound channel in the audio broadcasting demand;
The third packets of audio data is encapsulated into bluetooth data packets, the bluetooth data packets are transmitted to the bluetooth slave Equipment.
2. bluetooth equipment audio-frequency processing method according to claim 1, which is characterized in that described to the first audio number The step of being pre-processed according to packet, obtaining sound channel independent frequency domain data includes the following steps:
First packets of audio data is parsed, audio frame head and intraframe data are obtained;
To the audio frame head carry out CRC check, if verification pass through, to the intraframe data carry out bit stream distribution, inverse quantization and Three-dimensional sonication obtains the frequency domain data.
3. bluetooth equipment audio-frequency processing method according to claim 2, which is characterized in that it is described to the audio frame head into The step of row CRC check, includes the following steps:
Obtain the target information in the audio frame head, the target information include sound channel mode, sample rate, code rate, block mode, Bit stream allocation model, sub-band scheme, zoom factor and the first CRC check value;
The is obtained according to the sound channel mode, sample rate, code rate, block mode, bit stream allocation model, sub-band scheme and zoom factor Two CRC check values determine that CRC check passes through if first CRC check value is consistent with second CRC check value.
4. bluetooth equipment audio-frequency processing method according to claim 1, which is characterized in that the frequency domain to different sound channels The step of data carry out compressed encoding respectively, obtain the second audio data packet of corresponding sound channel includes the following steps:
Bit stream distribution, quantization and master data are carried out according to frequency domain data of the coding parameter to any sound channel to encapsulate, and obtain independent sound The coded data in road;
The coded data of the separate channels is packaged, the second audio data packet is obtained.
5. bluetooth equipment audio-frequency processing method according to claim 4, which is characterized in that described to the separate channels The step of coded data is packaged includes the following steps:
Audio attribute information is obtained according to the coded data, third CRC check value is obtained according to the Audio attribute information, it will The Audio attribute information and the third CRC check value are as header packet information, using the coded data as master data in wrapping, Generate the second audio data packet.
6. bluetooth equipment audio-frequency processing method according to claim 1, which is characterized in that further comprising the steps of:
Demand is played according to local audio, the 4th packets of audio data is chosen from each second audio data packet, to described 4th packets of audio data is decoded, and obtains the first time domain PCM data;
The first time domain PCM data is sent to local DAC device, and the bluetooth slave devices synchronously playing audio frequency, In, the bluetooth slave devices obtain the third packets of audio data from the bluetooth data packets, to the third audio number It is decoded according to packet, obtains the second time domain PCM data, the second time domain PCM data is sent to the DAC of bluetooth slave devices Device simultaneously plays audio.
7. a kind of bluetooth equipment audio-frequency processing method, which is characterized in that include the following steps:
The bluetooth data packets as described in any one of claim 1 to 6 are received from bluetooth host equipment, from the blue-teeth data The third packets of audio data is obtained in packet;
The third packets of audio data is parsed, header packet information and Bao Nei data are obtained;
The header packet information is verified, if verification passes through, data in the packet are parsed, obtains target frequency domain number According to;
The second time domain PCM data is converted by the target frequency domain data, the second time domain PCM data is sent to local DAC device, with the bluetooth host equipment synchronously playing audio frequency, wherein the bluetooth host equipment plays demand according to audio The 4th packets of audio data is chosen from each second audio data packet, the 4th packets of audio data is decoded, and is obtained The first time domain PCM data is sent to the DAC device of bluetooth host equipment and plays audio by the first time domain PCM data;
Described the step of verifying to the header packet information, includes the following steps:
Bale No. information is obtained from the header packet information, in the Bale No. information of the Bale No. information and upper third packets of audio data When discontinuous, demand is played according to audio and initiates to retransmit request or benefit packet request to the bluetooth host equipment.
8. a kind of bluetooth equipment audio processing system, which is characterized in that including:
Audio pre-processing unit, for when receiving the first packets of audio data to be played, to first packets of audio data It is pre-processed, obtains the independent frequency domain data of sound channel;
Audio coding unit carries out compressed encoding for the frequency domain data to different sound channels respectively, obtains the second of corresponding sound channel Packets of audio data;
Audio distribution unit, for playing demand according to the audio of bluetooth slave devices, from each second audio data packet Choose third packets of audio data, wherein the third packets of audio data is corresponding with the sound channel in the audio broadcasting demand;
Audio transmission unit, for the third packets of audio data to be encapsulated into bluetooth data packets, by the bluetooth data packets It is transmitted to the bluetooth slave devices.
9. a kind of bluetooth host equipment, including memory and processor, the memory are stored with executable program, feature exists In the processor is realized at bluetooth equipment audio described in any one of claims 1 to 6 when executing the executable program The step of reason method.
10. a kind of bluetooth equipment audio processing system, which is characterized in that including:
Audio receiving unit, for receiving bluetooth data packets as claimed in claim 9 from bluetooth host equipment, from the bluetooth The third packets of audio data is obtained in data packet;
Resolution unit is verified, for parsing to the third packets of audio data, obtains header packet information and Bao Nei data;To institute It states header packet information to be verified, if verification passes through, data in the packet is parsed, obtain target frequency domain data;
Transmission unit is converted, for converting the second time domain PCM data for the target frequency domain data, by second time domain PCM data is sent to local DAC device, with the bluetooth host equipment synchronously playing audio frequency, wherein the bluetooth host equipment Demand is played according to audio and chooses the 4th packets of audio data from each second audio data packet, to the 4th audio data Packet is decoded, and obtains the first time domain PCM data, and the DAC that the first time domain PCM data is sent to bluetooth host equipment is filled It sets and plays audio.
11. a kind of bluetooth slave devices, including memory and processor, the memory are stored with computer program, feature It is, the processor realizes bluetooth equipment audio-frequency processing method described in claim 7 or 8 when executing the computer program The step of.
12. a kind of bluetooth equipment, which is characterized in that including bluetooth host equipment and bluetooth slave devices;
The bluetooth host equipment carries out first packets of audio data when receiving the first packets of audio data to be played Pretreatment obtains the independent frequency domain data of sound channel;Compressed encoding is carried out to the frequency domain data of different sound channels respectively, is obtained at the sound The second audio data packet in road;Demand is played according to the audio of the bluetooth slave devices, from each second audio data packet Middle selection third packets of audio data, wherein the third packets of audio data is corresponding with the sound channel in the audio broadcasting demand; The third packets of audio data is encapsulated into bluetooth data packets, the bluetooth data packets are transmitted to the bluetooth slave and are set It is standby;
The bluetooth host equipment plays demand according to audio and chooses the 4th audio data from each second audio data packet Packet, is decoded the 4th packets of audio data, obtains the first time domain PCM data, and the first time domain PCM data is sent To the DAC device of the bluetooth host equipment;
The bluetooth slave devices obtain the third packets of audio data from the bluetooth data packets received;To the third sound Frequency data packet is parsed, and header packet information and Bao Nei data are obtained;The header packet information is verified, it is right if verification passes through Data are parsed in the packet, obtain target frequency domain data;The second time domain PCM number is converted by the target frequency domain data According to the second time domain PCM data being sent to the DAC device of the bluetooth slave devices, with the bluetooth host equipment DAC device synchronously playing audio frequency.
CN201810623859.6A 2018-06-15 2018-06-15 Bluetooth device audio processing method, system, readable storage medium and Bluetooth device Active CN108847248B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810623859.6A CN108847248B (en) 2018-06-15 2018-06-15 Bluetooth device audio processing method, system, readable storage medium and Bluetooth device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810623859.6A CN108847248B (en) 2018-06-15 2018-06-15 Bluetooth device audio processing method, system, readable storage medium and Bluetooth device

Publications (2)

Publication Number Publication Date
CN108847248A true CN108847248A (en) 2018-11-20
CN108847248B CN108847248B (en) 2020-12-15

Family

ID=64201844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810623859.6A Active CN108847248B (en) 2018-06-15 2018-06-15 Bluetooth device audio processing method, system, readable storage medium and Bluetooth device

Country Status (1)

Country Link
CN (1) CN108847248B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768793A (en) * 2020-07-11 2020-10-13 北京百瑞互联技术有限公司 LC3 audio encoder coding optimization method, system and storage medium
CN111885414A (en) * 2020-07-24 2020-11-03 腾讯科技(深圳)有限公司 Data processing method, device and equipment and readable storage medium
CN112019885A (en) * 2020-08-12 2020-12-01 四川长虹网络科技有限责任公司 ECM data verification method and device based on digital television and computer equipment
CN113395392A (en) * 2021-06-11 2021-09-14 哈尔滨海能达科技有限公司 Call access control method, system, simulcast system and terminal
WO2021208683A1 (en) * 2020-04-16 2021-10-21 华为技术有限公司 Control signal sending method, control signal receiving method, and related device
CN113689864A (en) * 2021-10-27 2021-11-23 北京百瑞互联技术有限公司 Audio data processing method and device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217038A (en) * 2008-01-17 2008-07-09 中兴通讯股份有限公司 An encoding method of audio data SBC algorithm and Bluetooth stereo subsystem
CN103699501A (en) * 2013-12-17 2014-04-02 上海斐讯数据通信技术有限公司 Audio equipment managing method and system of mobile terminal
CN103945310A (en) * 2014-04-29 2014-07-23 华为终端有限公司 Transmission method, mobile terminal, multi-channel earphones and audio playing system
US20150055015A1 (en) * 2013-08-23 2015-02-26 Mstar Semiconductor, Inc. Video/audio data processing method and associated module
CN105047209A (en) * 2015-08-13 2015-11-11 珠海市杰理科技有限公司 Bluetooth audio playing synchronization method and apparatus and Bluetooth audio playing apparatus
CN103369371B (en) * 2012-03-29 2017-06-09 索尼公司 Method and apparatus for providing the content channels of the access of selection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217038A (en) * 2008-01-17 2008-07-09 中兴通讯股份有限公司 An encoding method of audio data SBC algorithm and Bluetooth stereo subsystem
CN103369371B (en) * 2012-03-29 2017-06-09 索尼公司 Method and apparatus for providing the content channels of the access of selection
US20150055015A1 (en) * 2013-08-23 2015-02-26 Mstar Semiconductor, Inc. Video/audio data processing method and associated module
CN103699501A (en) * 2013-12-17 2014-04-02 上海斐讯数据通信技术有限公司 Audio equipment managing method and system of mobile terminal
CN103945310A (en) * 2014-04-29 2014-07-23 华为终端有限公司 Transmission method, mobile terminal, multi-channel earphones and audio playing system
CN105047209A (en) * 2015-08-13 2015-11-11 珠海市杰理科技有限公司 Bluetooth audio playing synchronization method and apparatus and Bluetooth audio playing apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DUAN SHUKAI1,等: "Analog memristive memory with applications in audio signal processing", 《SCIENCE CHINA(INFORMATION SCIENCES)》 *
郭昌建,吴永忠: "基于ACL 的蓝牙音频应用模型及算法研究", 《计算机技术与发展》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021208683A1 (en) * 2020-04-16 2021-10-21 华为技术有限公司 Control signal sending method, control signal receiving method, and related device
CN111768793A (en) * 2020-07-11 2020-10-13 北京百瑞互联技术有限公司 LC3 audio encoder coding optimization method, system and storage medium
CN111768793B (en) * 2020-07-11 2023-09-01 北京百瑞互联技术有限公司 LC3 audio encoder coding optimization method, system and storage medium
CN111885414A (en) * 2020-07-24 2020-11-03 腾讯科技(深圳)有限公司 Data processing method, device and equipment and readable storage medium
CN112019885A (en) * 2020-08-12 2020-12-01 四川长虹网络科技有限责任公司 ECM data verification method and device based on digital television and computer equipment
CN113395392A (en) * 2021-06-11 2021-09-14 哈尔滨海能达科技有限公司 Call access control method, system, simulcast system and terminal
CN113395392B (en) * 2021-06-11 2022-08-05 哈尔滨海能达科技有限公司 Call access control method, system, simulcast system and terminal
CN113689864A (en) * 2021-10-27 2021-11-23 北京百瑞互联技术有限公司 Audio data processing method and device and storage medium

Also Published As

Publication number Publication date
CN108847248B (en) 2020-12-15

Similar Documents

Publication Publication Date Title
CN108847248A (en) Bluetooth equipment audio-frequency processing method, system, readable storage medium storing program for executing and bluetooth equipment
CN104917671B (en) Audio-frequency processing method and device based on mobile terminal
CN101180674B (en) Method of encoding and decoding an audio signal
CN100568966C (en) A kind of network transfer method of audio/video data
CN102740064B (en) Packing method for streaming media transmission in intercom system
CN107872422B (en) Data transmission method and device and electronic equipment
US20230113453A1 (en) High-Speed Audio Data Transmission Method and Apparatus
US8717971B2 (en) Systems, methods and apparatus for transmitting data over a voice channel of a wireless telephone network using multiple frequency shift-keying modulation
CN107170460A (en) Sound quality adjusting method, system, host side and storage medium
US8867571B2 (en) Systems, methods and apparatus for transmitting data over a voice channel of a wireless telephone network
CN102143166B (en) Multi-view-point stereoscopic mobile phone video processing method based on gratings
TW200816655A (en) Method and apparatus for an audio signal processing
BRPI0412889B1 (en) conversion, combination and decoding methods, conversion and decoding apparatus, and computer readable media
CN100435486C (en) Audio-coding and decoding method and its device
CN105282110A (en) Mobile phone streaming media transmission method fusing GPS positioning information and system thereof
CN101159579B (en) Method and terminal of receiving network transport protocol based stream media data
CN106374991A (en) Method, device and system for performing data transmission by utilizing Beidou satellite
CN104506287A (en) Real-time sound communication method under TD-LTE (time division-long term evolution) emergency communication
CN113689864B (en) Audio data processing method and device and storage medium
CN115273869A (en) Audio data transmission method, device, chip, electronic equipment and storage medium
US8200482B2 (en) Systems, methods and apparatus for transmitting data over a voice channel of a telephone network using linear predictive coding based modulation
CN106134207A (en) Dispensing device, sending method, reception device and method of reseptance
WO2009123880A1 (en) Systems, methods and apparatus for transmitting data over a voice channel of a wireless telephone network
WO2017157168A1 (en) Method, terminal, system and computer storage medium for video calling
WO2024001387A1 (en) Data encoding method and apparatus, data decoding method and apparatus, device, and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 519000 No. 333, Kexing Road, Xiangzhou District, Zhuhai City, Guangdong Province

Patentee after: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

Address before: Floor 1-107, building 904, ShiJiHua Road, Zhuhai City, Guangdong Province

Patentee before: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder