CN108616767B - Audio data transmission method and device - Google Patents
- ️Tue Dec 29 2020
CN108616767B - Audio data transmission method and device - Google Patents
Audio data transmission method and device Download PDFInfo
-
Publication number
- CN108616767B CN108616767B CN201810404771.5A CN201810404771A CN108616767B CN 108616767 B CN108616767 B CN 108616767B CN 201810404771 A CN201810404771 A CN 201810404771A CN 108616767 B CN108616767 B CN 108616767B Authority
- CN
- China Prior art keywords
- audio
- audio data
- delay
- data segment
- receiving device Prior art date
- 2018-04-28 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
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 58
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000001360 synchronised effect Effects 0.000 claims abstract description 43
- 238000012545 processing Methods 0.000 claims description 11
- 238000011156 evaluation Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 239000000872 buffer Substances 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000005236 sound signal Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/4302—Content synchronisation processes, e.g. decoder synchronisation
- H04N21/4307—Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/4302—Content synchronisation processes, e.g. decoder synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/436—Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
- H04N21/4363—Adapting the video stream to a specific local network, e.g. a Bluetooth® network
- H04N21/43637—Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
The embodiment of the invention provides an audio data transmission method and device, relates to the technical field of audio transmission, and can solve the problem of delay in audio playing and the problem of asynchronism of sound and pictures. The method comprises the following steps: the audio receiving device sends a synchronous signal to the audio sending device through a wireless channel according to a preset period; the audio frequency sending device evaluates the audio frequency delay according to the number of preset periods spaced between two adjacent synchronous signals in the received synchronous signals; and if the audio delay is determined to be larger than the delay threshold, sending a preset audio data segment to the audio receiving device so that the audio receiving device plays the preset audio data segment after receiving the preset audio data segment, wherein the preset audio data segment comprises an audio data segment which is updated compared with the next frame of audio data segment sent when the audio data segments are sent in sequence. The invention is applied to audio data transmission.
Description
Technical Field
The present invention relates to the field of audio transmission technologies, and in particular, to an audio data transmission method and apparatus.
Background
With the rapid development of playing devices such as smart televisions and the like, various external devices are increasing, and more external devices adopt a wireless technology to transmit data. In the process of data wireless transmission, data transmission delay often occurs due to problems such as channel quality. Particularly, in the scene of audio and video playing, for example, when a program audio is played by using a bluetooth sound box, the transmission delay of audio data is caused due to the unreliability of wireless transmission, and further the transmission delay of the audio data causes the problem of asynchronization of sound and picture, which seriously affects the use experience of users.
Disclosure of Invention
The embodiment of the invention provides an audio data transmission method and an audio data transmission device, which can evaluate the audio delay when an audio receiving device plays audio data, and send an audio data segment which is updated compared with the audio data segment normally sent to the audio receiving device after the audio delay is determined to be overlarge, so that the delay problem during audio playing is improved, and the problem of asynchronization of sound and pictures is solved.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, the present invention provides an audio data transmission method, including: the audio receiving device sends a synchronous signal to the audio sending device through a wireless channel according to a preset period; the audio frequency sending device evaluates the audio frequency delay when the audio frequency sending device sends the audio frequency data to the audio frequency receiving device by using the wireless channel according to the number of the preset periods of the interval between two adjacent synchronous signals in the received synchronous signals; and if the audio delay is determined to be larger than the delay threshold, sending a preset audio data segment to the audio receiving device so that the audio receiving device plays the preset audio data segment after receiving the preset audio data segment, wherein the preset audio data segment comprises an audio data segment which is newer than the audio data segment of the next frame sent when the audio data segment is sent in sequence.
In a second aspect, the present invention provides an audio transmitting apparatus, comprising: a receiving unit for receiving a synchronization signal transmitted by the audio receiving apparatus according to a predetermined period through a wireless channel; the time delay evaluating unit is used for evaluating the audio time delay when the audio transmitting device transmits the audio data to the audio receiving device by using the wireless channel according to the number of the preset periods at intervals between two adjacent synchronous signals in the synchronous signals received by the receiving unit; and the sending unit is used for sending a preset audio data segment to the audio receiving device after the delay evaluating unit determines that the audio delay is greater than the delay threshold value, so that the audio receiving device plays the preset audio data segment after receiving the preset audio data segment, wherein the preset audio data segment comprises an audio data segment which is newer than the audio data segment of the next frame sent when the audio data segment is sent in sequence.
In a third aspect, the present invention provides an audio receiving apparatus, comprising: a sending unit, configured to send synchronization signals to an audio sending apparatus through a wireless channel according to a predetermined period, so that the audio sending apparatus evaluates an audio delay when the audio sending apparatus sends audio data to an audio receiving apparatus through the wireless channel and the audio receiving apparatus plays the audio data according to the number of the predetermined periods spaced between two adjacent synchronization signals in the received synchronization signals, and sends a predetermined audio data segment to the audio receiving apparatus when it is determined that the audio delay is greater than a delay threshold; the receiving unit is used for receiving the preset audio data segment sent by the audio sending device after the sending unit sends the synchronous signal; and the playing unit is used for playing the preset audio data segment after the receiving unit receives the preset audio data segment.
In a fourth aspect, the present invention provides an electronic device, which includes the audio transmitting apparatus according to the second aspect.
In a fifth aspect, the present invention provides a bluetooth speaker, where the bluetooth speaker includes the audio receiving apparatus according to the third aspect.
In the embodiment of the present invention, the inventor finds that when audio data is played through a wireless sound box device, because packet loss and other situations may exist in data transmission of a wireless channel, a delay of playing the audio data may be caused, and the delay may change in real time along with a transmission situation of a current wireless channel. Based on the situation, the audio receiving device periodically sends the synchronous signals to the audio sending device, and the audio sending device judges the packet loss situation of the wireless channel according to the number of the periods of the interval between two adjacent synchronous signals in the received synchronous signals, so as to evaluate the audio delay. And then when the audio delay is determined to be overlarge, changing the next frame of audio data segment which should be sent sequentially originally and sending the updated audio data segment, thereby solving the problem of picture-sound asynchronism caused by the overlarge audio delay.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of an audio data transmission method according to an embodiment of the present invention;
fig. 2 is a block diagram of an audio transmitting apparatus according to an embodiment of the present invention;
fig. 3 is a block diagram of another audio transmitting apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of another audio transmitting apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of an audio receiving apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of another audio receiving apparatus according to an embodiment of the present invention;
fig. 7 is a block diagram of another audio receiving apparatus according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings.
The method and the device are applied to scenes of playing the audio signals in the audio and video programs by utilizing the wireless equipment. For example, the present invention may be applied to a scene where an audio signal of a program is played through a wireless sound box device connected to an electronic device when the electronic device such as a television, a computer, or a mobile phone is used to play an audio/video program.
The first embodiment is as follows:
fig. 1 is a schematic flow chart of an audio data transmission method according to an embodiment of the present invention. The method comprises the following steps:
s101, the audio receiving device sends a synchronous signal to the audio sending device through a wireless channel according to a preset period.
In the embodiment of the invention, the audio sending device can be arranged in an electronic device which has an audio and video playing function and can be connected with an external device through a wireless channel (such as a wireless channel established based on wireless transmission mechanisms such as Bluetooth, infrared communication, WLAN and the like) and the like, such as a television, a computer or a mobile phone; the audio receiving device can be arranged in a wireless sound box or other external equipment which can receive audio data through a wireless channel and play the audio data through a power amplifier and a loudspeaker of the audio receiving device. Furthermore, after the audio sending device and the audio receiving device execute corresponding steps according to the method provided by the embodiment of the invention, the problem that the video picture played on the electronic equipment is not synchronous with the audio sound played by the external equipment can be solved.
In addition, the period duration of the predetermined period can be selected according to actual needs in specific implementation. In one example, a minimum period for data transmission of a wireless channel may be used as the predetermined period in the present invention in order to more accurately estimate the voice delay.
For example, if the wireless channel uses a wireless data transmission mechanism of Bluetooth BLE (Bluetooth Low Energy) technology, and the minimum data transmission period set by the universal Bluetooth BLE includes 7.5ms, 10ms, and 12.5ms, the predetermined period in the present invention may be set to one of 7.5ms, 10ms, and 12.5ms according to the minimum data transmission period used by the current wireless channel.
S103, the audio sending device evaluates the audio delay when the audio sending device sends the audio data to the audio receiving device by using the wireless channel according to the number of the preset periods of the interval between two adjacent synchronous signals in the received synchronous signals.
Specifically, since there may be a packet loss in the process of transmitting audio data through the wireless channel, once the packet loss occurs, the audio transmitting apparatus is required to retransmit the frame of audio data segment, which may result in a delay in playing the audio signal. Therefore, in the invention, after the audio receiving device sends the synchronous signals to the audio sending device according to the fixed period, the audio sending device receives the synchronous signals, the transmission performance of the wireless channel in the time period can be judged according to the number of the periods of the interval between two adjacent synchronous signals in the synchronous signals received by the audio sending device, and then the audio delay in the time period is evaluated.
For example, the audio receiving apparatus transmits four synchronization signals of T1, T2, T3, and T4 to the audio transmitting apparatus at predetermined periods, each of which is spaced apart by a predetermined period. The audio transmitting apparatus receives two synchronization signals T1 and T4 through a wireless channel. Then, it can be determined that there are three predetermined periods between the synchronization signals T1 and T4 received by the audio transmitting apparatus, that is, there are two synchronization signal transmission failures between T1 and T4, and it can be determined that the transmission of the audio data within the corresponding time is delayed due to transmission packet loss. Therefore, the audio delay at the moment can be evaluated according to the preset number of cycles of the interval between two adjacent synchronous signals received by the audio transmitting device.
In an implementation manner, considering that the delay when playing the voice is mainly composed of a delay generated in a transmission process of the audio data and a delay generated when the audio receiving device decodes and buffers the audio data after receiving the audio data, the embodiment of the present invention evaluates the audio delay when the audio transmitting device transmits the audio data to the audio receiving device by using the wireless channel and the audio receiving device plays the audio data, and specifically may include:
an audio delay when the audio transmitting apparatus transmits audio data to the audio receiving apparatus using the wireless channel and the audio data is played by the audio receiving apparatus is calculated using the formula T + TL × N, where T denotes the audio delay, Tb denotes a time when the audio receiving apparatus processes a piece of audio data, TL denotes a predetermined period, and N denotes the number of predetermined periods of an interval between two adjacent synchronization signals.
Tb may specifically be a duration of buffering the audio data after the audio receiving apparatus receives the audio data.
In addition, in another implementation manner, the number of the predetermined periods of the interval between two adjacent synchronization signals may be determined by adding a count field to the synchronization signal, specifically: the synchronization signal includes an index identifier. And when the audio receiving device sends a synchronous signal, the value of the index identifier is increased by one. Furthermore, before the step S103 is executed, the method provided in the embodiment of the present invention further includes:
s102, determining the number of preset periods of intervals between two adjacent synchronous signals according to values of index identifiers respectively included in the two adjacent synchronous signals in the synchronous signals received by the audio sending device.
Specifically, one byte in the synchronization signal may be used as an index identifier, and a value of the index identifier is counted cyclically between 0 and 255. For example, in a wireless channel established based on the bluetooth BLE mechanism, every 20 bytes is transmitted as one frame of data when data is transmitted, and table 1 below provides a frame structure of a synchronization signal according to an embodiment of the present invention:
TABLE 1
Wherein each of the "Report ID" and the "Command head" occupies one byte for indicating that the frame signal is a sync signal; "Index" is one byte in length and is used to indicate the Index identifier of the synchronization signal; in addition, the synchronization signal also includes reserved 17 bytes from 3 rd to 19 th, and corresponding data can be written according to actual needs to realize corresponding functions. Wherein the Index is 0x00-0xFF, for example, the Index in the previous frame sync signal is 0x19, the Index in the next frame sync signal is 0x1A, and the Index in the next frame sync signal is 0x 1B; for another example, if the Index in the previous frame sync signal is 0xFF, the Index in the next frame sync signal is 0x 00.
Furthermore, considering that when the value of the index flag in the next synchronization signal in the two adjacent synchronization signals is smaller than the value of the index flag in the previous synchronization signal, the value counted from 0x00 again in the next synchronization signal is described, so the step S102 may specifically include:
if N1 is less than N2, where N1 is a value of an index identifier in a previous synchronization signal of two adjacent synchronization signals received by the audio transmitting apparatus, and N2 is a value of an index identifier in a subsequent synchronization signal, the number of data transmission cycles N is N2-N1; if N1 is larger than or equal to N2, the number of data transmission cycles N is N2-N1+ 255.
After step S103 is executed and the evaluation of the audio delay is completed, the method provided in the embodiment of the present invention further includes:
and S104, if the audio delay is determined to be larger than the delay threshold, sending a preset audio data segment to the audio receiving device, so that the audio receiving device plays the preset audio data segment after receiving the preset audio data segment. The predetermined audio data segment includes an audio data segment that is updated from a next frame audio data segment transmitted when the audio data segments are sequentially transmitted.
Specifically, when the audio delay is determined to be greater than the delay threshold, it is indicated that the playing of the audio is slower than the playing of the video, and the audio delay already affects the audiovisual experience of the user. Furthermore, in the embodiment of the present invention, when it is determined that the audio delay is greater than the delay threshold, the audio sending device sends the updated audio data segment in advance by changing the audio data segment to be sent to the audio receiving device by the audio sending device, thereby achieving the effect of eliminating the audio delay.
In the embodiment of the present invention, as to the process of determining whether the audio delay is greater than the delay threshold, the following may be implemented in various ways: for example, according to the subjective feeling of a human, it is generally considered that when the audio delay is longer than 100ms, the human can subjectively feel that the sound and the picture are not synchronous. The audio delay can be calculated by the above formula T Tb + TL × N, and the calculated audio delay is compared with the set delay threshold of 100 ms. Whether the audio delay is too large may also be determined by other manners, for example, when the audio transmitting apparatus determines that the predetermined period of the interval between two adjacent received synchronization signals is greater than a threshold, it may also be determined that the audio delay at this time is necessarily greater than the delay threshold, and for example: if the predetermined period is 7.5ms, it can be directly determined that the audio delay is greater than the delay threshold value by 100ms if it is determined that two adjacent synchronization signals are separated by 15 periods, i.e., by 112.5 ms. Therefore, in the present invention, when determining whether the audio delay is greater than the delay threshold, it is not limited to calculate the value of the audio delay, and it can also be determined whether the audio delay is too large by comparing other parameters, which does not limit the embodiment of the present invention.
In addition, sending a predetermined audio data segment to the audio receiving apparatus specifically includes: the audio sending device clears the audio data segment in the sending buffer, and refills the preset audio data segment, namely the audio data segment which is updated compared with the audio data segment in the original sending buffer, so that the audio receiving device plays the preset audio data segment after receiving the preset audio data segment. Therefore, the audio data can be played in advance, and the audio delay is eliminated.
In the embodiment of the present invention, the inventor finds that when audio data is played through a wireless sound box device, because packet loss and other situations may exist in data transmission of a wireless channel, a delay of playing the audio data may be caused, and the delay may change in real time along with a transmission situation of a current wireless channel. Based on the situation, the audio receiving device periodically sends the synchronous signals to the audio sending device, and the audio sending device judges the packet loss situation of the wireless channel according to the number of the periods of the interval between two adjacent synchronous signals in the received synchronous signals, so as to evaluate the audio delay. And then when the audio delay is determined to be overlarge, changing the next frame of audio data segment which should be sent sequentially originally and sending the updated audio data segment, thereby solving the problem of picture-sound asynchronism caused by the overlarge audio delay.
Example two:
the embodiment of the invention also provides an audio sending device which is used for executing the audio data transmission method. The usage scenario of the audio transmission device provided by the present invention can refer to fig. 1 and the corresponding description of fig. 1. The audio transmitting apparatus according to the embodiments of the present invention may be divided into functional modules according to the above method, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation. Fig. 2 is a schematic diagram of a possible structure of an audio transmitting apparatus according to an embodiment of the present invention, in a case where functional modules are divided according to functions. Specifically, the
audio transmission device20 includes: a receiving
unit201, a
delay evaluating unit202 and a sending
unit203. Wherein:
a receiving
unit201 for receiving a synchronization signal transmitted by an audio receiving apparatus according to a predetermined cycle through a wireless channel.
Specifically, in one implementation, a minimum period of data transmission of the wireless channel may be taken as the predetermined period.
The
delay evaluating unit202 is configured to evaluate an audio delay when the audio transmitting apparatus transmits the audio data to the audio receiving apparatus by using the wireless channel according to the number of the predetermined periods of the interval between two adjacent synchronization signals in the synchronization signals received by the receiving unit.
In one implementation, the
delay evaluating unit202 has a function of calculating the audio delay using the formula T ═ Tb + TL × N, where T denotes the audio delay, Tb denotes the time for the audio receiving device to process the audio data segment, TL denotes the predetermined period, and N denotes the number of the predetermined periods of the interval between two adjacent synchronization signals.
A sending
unit203, configured to send a predetermined audio data segment to the audio receiving apparatus after the delay evaluating unit determines that the audio delay is greater than the delay threshold, so that the audio receiving apparatus plays the predetermined audio data segment after receiving the predetermined audio data segment, where the predetermined audio data segment includes an audio data segment that is updated compared with a next frame of audio data segment sent when the audio data segment is sent sequentially.
In another implementation, the synchronization signal includes an index identifier; and when the audio receiving device sends a synchronous signal, the value of the index identifier is increased by one. The
audio transmission device20 further includes:
the interval period calculating unit 204 is configured to determine the number of predetermined periods of the interval between two adjacent synchronization signals according to values of index identifiers respectively included in the two adjacent synchronization signals received by the receiving unit.
In another implementation, the length of the index identifier is one byte, and the value of the index identifier is circularly counted between 0 and 255;
the interval period calculating unit 204 is specifically configured to, if N1 is less than N2, where N1 is a value of an index identifier in a previous synchronization signal of two adjacent synchronization signals received by the audio transmitting apparatus, and N2 is a value of an index identifier in a subsequent synchronization signal, where N is N2-N1 of data transmission periods;
the interval period calculating unit 204 is further configured to, if N1 is greater than or equal to N2, count N of data transmission periods to N2-N1+ 255.
It should be noted that, for other corresponding descriptions of the units in the audio sending apparatus provided in the embodiment of the present invention, reference may be made to fig. 1 and the corresponding description of fig. 1 in the foregoing, which is not repeated herein.
Fig. 3 shows a possible structural diagram of the audio transmission device described above, in the case of an integrated unit. The
audio transmission device30 includes: a
storage unit301, a
processing unit302, and an
interface unit303. The
processing unit302 is used for controlling and managing the actions of the
audio transmitting apparatus30, for example, the
interface unit303 is controlled to receive the synchronization signals, and to evaluate the audio delay according to the number of the predetermined cycles of the interval between two adjacent received synchronization signals, and then the
interface unit303 is controlled to transmit the audio data segments. A
storage unit301 for storing program codes and data of the audio transmitting apparatus. The
interface unit303 is used for connecting with other external devices to receive input contents, for example, the interface unit is used for receiving a synchronization signal transmitted by an audio receiving apparatus through a wireless channel, and transmitting audio data segments and the like to the audio receiving apparatus through the wireless channel.
For example, the processing unit is a processor, the storage unit is a memory, and the interface unit is a transceiver. The audio transmitting apparatus shown in fig. 4 includes a
transceiver403, a
processor402, a
memory401, and a
bus404, and the
transceiver403 and the
processor402 are connected to the
memory401 through the
bus404.
402 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application-Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to control the execution of programs in accordance with the present invention.
The
Memory401 may be a Read-Only Memory (ROM) or other types of static storage devices that can store static information and instructions, a Random Access Memory (RAM) or other types of dynamic storage devices that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory may be self-contained and coupled to the processor via a bus. The memory may also be integral to the processor.
The
memory401 is used for storing application program codes for executing the present invention, and is controlled by the
processor402. The
transceiver403 is used for receiving contents input from an external device, and the
processor402 is used for executing application program codes stored in the
memory401, thereby implementing the audio data transmission method in the embodiment of the present invention.
Example three:
the embodiment of the invention also provides an audio receiving device which is used for executing the audio data transmission method. The usage scenario of the audio receiving apparatus provided by the present invention can refer to fig. 1 and the corresponding description of fig. 1. The audio receiving apparatus according to the embodiments of the present invention may be divided into functional modules according to the above method, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation. Fig. 5 is a schematic diagram of a possible structure of an audio receiving apparatus according to an embodiment of the present invention, in a case where functional modules are divided according to respective functions. Specifically, the
audio receiving apparatus50 includes: a transmitting
unit501, a receiving
unit502, and a
playing unit503. Wherein:
a sending
unit501, configured to send synchronization signals to an audio sending apparatus through a wireless channel according to a predetermined period, so that the audio sending apparatus evaluates an audio delay when the audio sending apparatus sends audio data to an audio receiving apparatus through the wireless channel and the audio receiving apparatus plays the audio data according to the number of the predetermined periods spaced between two adjacent synchronization signals in the received synchronization signals, and sends a predetermined audio data segment to the audio receiving apparatus when it is determined that the audio delay is greater than a delay threshold;
a receiving
unit502, configured to receive a predetermined audio data segment sent by the audio sending apparatus after the sending
unit501 sends the synchronization signal;
a
playing unit503, configured to play the predetermined audio data segment after the receiving
unit502 receives the predetermined audio data segment.
It should be noted that, for other corresponding descriptions of the units in the audio receiving apparatus provided in the embodiment of the present invention, reference may be made to fig. 1 and the corresponding description of fig. 1 in the foregoing, which is not repeated herein.
Fig. 6 shows a possible structural diagram of the audio receiving device described above, in the case of an integrated unit. The
audio receiving apparatus60 includes: a
storage unit601, a
processing unit602, and an
interface unit603. The
processing unit602 is used for controlling and managing the operation of the
audio transmitting apparatus60. A
storage unit601 for storing program codes and data of the audio transmitting apparatus. The
interface unit603 is used for connecting with other external devices to receive input content.
For example, the processing unit is a processor, the storage unit is a memory, and the interface unit is a transceiver. The
audio receiving apparatus70, as shown in fig. 7, includes a
transceiver703, a
processor702, a
memory701, and a
bus704, where the
transceiver703 and the
processor702 are connected to the
memory701 through the
bus704. For the detailed description of the components of the
audio receiving apparatus70, reference may be made to the above description of the
audio transmitting apparatus40, and repeated descriptions will be omitted.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the invention are all or partially effected when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or can comprise one or more data storage devices, such as a server, a data center, etc., that can be integrated with the medium. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In one embodiment, the present invention provides an electronic device, which includes the audio transmitting apparatus as described in the second embodiment
In an embodiment, the present invention provides a bluetooth speaker, which includes the audio receiving apparatus as described in the third embodiment.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (10)
1. An audio data transmission method, comprising:
the audio receiving device sends a synchronous signal to the audio sending device through a wireless channel according to a preset period;
the audio transmitting device evaluates audio delay when the audio transmitting device transmits audio data to the audio receiving device by using the wireless channel according to the number of the preset periods spaced between two adjacent synchronous signals in the received synchronous signals;
if the audio delay is determined to be greater than the delay threshold, sending a predetermined audio data segment to an audio receiving device, so that the audio receiving device plays the predetermined audio data segment after receiving the predetermined audio data segment, where the predetermined audio data segment includes: an audio data segment that is newer than the audio data segment of the next frame that is transmitted when the audio data segments are sequentially transmitted.
2. The audio data transmission method according to claim 1, wherein a minimum period of data transmission of the wireless channel is taken as the predetermined period.
3. The audio data transmission method according to claim 1, wherein the synchronization signal includes an index flag; the audio receiving device adds one to the value of the index identifier every time the audio receiving device sends a synchronizing signal; the method further comprises the following steps:
and determining the number of the preset periods at intervals between two adjacent synchronous signals according to the values of the index identifiers respectively included in the two adjacent synchronous signals in the synchronous signals received by the audio sending device.
4. The audio data transmission method according to claim 3, wherein the length of the index identifier is one byte, and the value of the index identifier is circularly counted between 0 and 255;
the determining, according to values of index identifiers respectively included in two adjacent synchronization signals in the synchronization signals received by the audio sending apparatus, the number of the predetermined periods at intervals between the two adjacent synchronization signals includes:
if N1 is less than N2, where N1 is a value of an index flag in a previous synchronization signal of the two adjacent synchronization signals received by the audio transmitting apparatus, and N2 is a value of an index flag in a subsequent synchronization signal, the number N of data transmission cycles is N2-N1;
if N1 is larger than or equal to N2, the number of the data transmission cycles is N2-N1+ 255.
5. Audio data transmission method according to one of claims 1 to 4,
the audio transmitting device evaluates audio delay when the audio transmitting device transmits audio data to the audio receiving device by using the wireless channel and the audio receiving device plays the audio data according to the number of the predetermined periods spaced between two adjacent synchronizing signals in the received synchronizing signals, and the evaluation comprises the following steps:
calculating the audio delay time by using a formula T ═ Tb + TL xN, wherein T represents the audio delay time, Tb represents the time for processing the audio data segment by the audio receiving device, TL represents the predetermined period, and N represents the number of the predetermined periods spaced between the two adjacent synchronous signals.
6. An audio transmission apparatus, comprising:
a receiving unit for receiving a synchronization signal transmitted by the audio receiving apparatus according to a predetermined period through a wireless channel;
the time delay evaluating unit is used for evaluating the audio time delay when the audio transmitting device transmits the audio data to the audio receiving device by using the wireless channel according to the number of the preset periods spaced between two adjacent synchronous signals in the synchronous signals received by the receiving unit;
a sending unit, configured to send a predetermined audio data segment to an audio receiving apparatus after the delay evaluation unit determines that the audio delay is greater than a delay threshold, so that the audio receiving apparatus plays the predetermined audio data segment after receiving the predetermined audio data segment, where the predetermined audio data segment includes: an audio data segment that is newer than the audio data segment of the next frame that is transmitted when the audio data segments are sequentially transmitted.
7. The audio transmission apparatus according to claim 6, wherein a minimum period of data transmission of the wireless channel is taken as the predetermined period.
8. The audio transmission apparatus according to claim 6, wherein the synchronization signal includes an index flag; the audio receiving device adds one to the value of the index identifier every time the audio receiving device sends a synchronizing signal; the audio transmitting apparatus further includes:
and the interval period calculation unit is used for determining the number of the preset periods of the interval between the two adjacent synchronous signals according to the values of the index identifiers respectively included in the two adjacent synchronous signals in the synchronous signals received by the receiving unit.
9. The audio transmitter according to claim 8, wherein the length of the index flag is one byte, and the value of the index flag is circularly counted between 0 and 255;
the interval period calculating unit is specifically configured to, if N1 is less than N2, where N1 is a value of an index identifier in a previous synchronization signal of the two adjacent synchronization signals received by the audio transmitting apparatus, and N2 is a value of an index identifier in a subsequent synchronization signal, where N is the number of data transmission periods N — N2-N1;
the interval period calculating unit is specifically configured to, if N1 is greater than or equal to N2, count N of the data transmission periods to N2-N1+ 255.
10. The audio transmission apparatus according to any one of claims 6 to 9,
the delay evaluating unit is provided with a function of calculating the audio delay by using a formula T ═ Tb + TL xN, wherein T represents the audio delay, Tb represents the time of the audio receiving device for processing the audio data segment, TL represents the preset period, and N represents the number of the preset periods of the interval between the two adjacent synchronous signals.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810404771.5A CN108616767B (en) | 2018-04-28 | 2018-04-28 | Audio data transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810404771.5A CN108616767B (en) | 2018-04-28 | 2018-04-28 | Audio data transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108616767A CN108616767A (en) | 2018-10-02 |
CN108616767B true CN108616767B (en) | 2020-12-29 |
Family
ID=63661568
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810404771.5A Active CN108616767B (en) | 2018-04-28 | 2018-04-28 | Audio data transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108616767B (en) |
Families Citing this family (3)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114827696B (en) * | 2021-01-29 | 2023-06-27 | 华为技术有限公司 | Method for synchronously playing audio and video data of cross-equipment and electronic equipment |
CN114302192B (en) * | 2021-12-15 | 2023-06-30 | 广州小鹏汽车科技有限公司 | Sound and picture synchronization method and device, vehicle and storage medium |
CN114495952A (en) * | 2021-12-27 | 2022-05-13 | 北京百度网讯科技有限公司 | Method, apparatus, device, medium and product for audio processing |
Citations (8)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103546662A (en) * | 2013-09-23 | 2014-01-29 | 浙江工业大学 | A method for synchronizing audio and video in a network monitoring system |
CN103795950A (en) * | 2014-02-21 | 2014-05-14 | 深圳创维-Rgb电子有限公司 | Television audio signal processing device |
CN104581599A (en) * | 2014-12-30 | 2015-04-29 | 歌尔声学股份有限公司 | Method and system for synchronous broadcast of multiple speaker boxes, and speaker box |
CN105338393A (en) * | 2015-10-29 | 2016-02-17 | 小米科技有限责任公司 | Medium synchronization method and device |
CN105376628A (en) * | 2014-08-27 | 2016-03-02 | 深圳Tcl新技术有限公司 | Method and device for synchronizing audio-video signals |
CN105898502A (en) * | 2016-04-11 | 2016-08-24 | 深圳Tcl新技术有限公司 | Audio and video playing synchronization method and synchronization device |
CN105959786A (en) * | 2016-04-28 | 2016-09-21 | 乐视控股(北京)有限公司 | Audio and video playing method and device |
CN106653068A (en) * | 2016-10-08 | 2017-05-10 | 广东欧珀移动通信有限公司 | A method, device and terminal for playing audio data |
Family Cites Families (2)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5316189B2 (en) * | 2008-05-23 | 2013-10-16 | ヤマハ株式会社 | AV system |
JP6287315B2 (en) * | 2014-02-20 | 2018-03-07 | 富士通株式会社 | Video / audio synchronization apparatus, video / audio synchronization method, and computer program for video / audio synchronization |
-
2018
- 2018-04-28 CN CN201810404771.5A patent/CN108616767B/en active Active
Patent Citations (8)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103546662A (en) * | 2013-09-23 | 2014-01-29 | 浙江工业大学 | A method for synchronizing audio and video in a network monitoring system |
CN103795950A (en) * | 2014-02-21 | 2014-05-14 | 深圳创维-Rgb电子有限公司 | Television audio signal processing device |
CN105376628A (en) * | 2014-08-27 | 2016-03-02 | 深圳Tcl新技术有限公司 | Method and device for synchronizing audio-video signals |
CN104581599A (en) * | 2014-12-30 | 2015-04-29 | 歌尔声学股份有限公司 | Method and system for synchronous broadcast of multiple speaker boxes, and speaker box |
CN105338393A (en) * | 2015-10-29 | 2016-02-17 | 小米科技有限责任公司 | Medium synchronization method and device |
CN105898502A (en) * | 2016-04-11 | 2016-08-24 | 深圳Tcl新技术有限公司 | Audio and video playing synchronization method and synchronization device |
CN105959786A (en) * | 2016-04-28 | 2016-09-21 | 乐视控股(北京)有限公司 | Audio and video playing method and device |
CN106653068A (en) * | 2016-10-08 | 2017-05-10 | 广东欧珀移动通信有限公司 | A method, device and terminal for playing audio data |
Also Published As
Publication number | Publication date |
---|---|
CN108616767A (en) | 2018-10-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109906613B (en) | 2022-09-13 | Multi-mode synchronized rendering of audio and video |
CN108377406B (en) | 2020-12-22 | Method and device for adjusting sound and picture synchronization |
US10034036B2 (en) | 2018-07-24 | Media synchronization for real-time streaming |
EP3697088A1 (en) | 2020-08-19 | Video sending and receiving method, device, and terminal |
CN108616767B (en) | 2020-12-29 | Audio data transmission method and device |
MX2011005782A (en) | 2011-06-30 | Audio/video data play control method and apparatus. |
JP2009016990A (en) | 2009-01-22 | Stream transmission server and stream transmission system |
CN110996122B (en) | 2022-11-15 | Video frame transmission method, device, computer equipment and storage medium |
CN106303287A (en) | 2017-01-04 | A kind of multi-mobile-terminal screen splicing method based on near-field communication, equipment and system |
CN108259998B (en) | 2021-01-22 | Player, play control method and device, electronic equipment and play system |
CN109144463A (en) | 2019-01-04 | Transmission control method and device and electronic equipment |
CN113364726A (en) | 2021-09-07 | Method, device and system for transmitting distributed data |
US20240340507A1 (en) | 2024-10-10 | Methods, systems, and media for streaming video content using adaptive buffers |
CN113535115A (en) | 2021-10-22 | Audio playing method and device, electronic equipment and storage medium |
CN112565876A (en) | 2021-03-26 | Screen projection method, device, equipment, system and storage medium |
CN104427383A (en) | 2015-03-18 | Information processing method and electronic equipment |
CN114416013B (en) | 2025-03-11 | Data transmission method, device, electronic device and computer readable storage medium |
CN111787268B (en) | 2022-04-22 | Audio signal processing method and device, electronic equipment and storage medium |
JP2004354677A (en) | 2004-12-16 | Information processing device, method therefor, program therefor, recording medium recorded with he program, and reproducing device |
CN108924618A (en) | 2018-11-30 | A kind of determination method and device of audio-video delay |
CN111586152A (en) | 2020-08-25 | Bluetooth transmission data playing method and device and Bluetooth transmission data sending method and device |
US20240153522A1 (en) | 2024-05-09 | Audio playback method, electronic device, and computer-readable storage medium |
CN112020043A (en) | 2020-12-01 | Bluetooth device, method of operating the same, and non-transitory computer-readable recording medium |
CN113613125B (en) | 2024-07-09 | Audio synchronous control method, device, audio equipment and system |
CN115278858B (en) | 2024-08-30 | Low-delay audio data transmission method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2018-10-02 | PB01 | Publication | |
2018-10-02 | PB01 | Publication | |
2018-10-30 | SE01 | Entry into force of request for substantive examination | |
2018-10-30 | SE01 | Entry into force of request for substantive examination | |
2020-06-02 | CB02 | Change of applicant information | |
2020-06-02 | CB02 | Change of applicant information |
Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218 Applicant after: Hisense Visual Technology Co., Ltd. Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No. Applicant before: QINGDAO HISENSE ELECTRONICS Co.,Ltd. |
2020-12-29 | GR01 | Patent grant | |
2020-12-29 | GR01 | Patent grant |