An audio synchronization method, an audio playback device, and a storage medium

By receiving synchronization data packets sent by the audio source and determining the timestamp information, audio synchronization between wireless Bluetooth headsets is achieved, solving the problem of poor synchronization performance caused by data link burden and improving the synchronization effect.

CN115549832BActive Publication Date: 2026-04-10GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2021-06-29
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing wireless Bluetooth headsets, during audio synchronization, the main earphone needs to periodically send playback information to the secondary earphone, which increases the data link burden and may lead to poor synchronization performance when the link is unstable.

Method used

The audio playback device receives synchronization data packets sent by the audio source, determines the timestamp information, and records the start time of playback. Based on this information, audio synchronization between the device and the audio source is achieved, reducing the data link load between devices.

Benefits of technology

By directly utilizing the timestamp information in the synchronization data packets sent by the audio source for synchronization, the burden on the data link between devices is reduced, the audio synchronization performance between headphones is improved, and the problem of playback asynchrony is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115549832B_ABST
    Figure CN115549832B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides an audio synchronization method, an audio playing device and a storage medium, which comprise the following steps: receiving a group of synchronization data packets sent by an audio source; wherein the group of synchronization data packets comprises at least one synchronization data packet; determining at least one timestamp information corresponding to the at least one synchronization data packet in sequence; playing the group of synchronization data packets and recording at least one starting playing time of the at least one synchronization data packet; and realizing the audio synchronization operation between the audio playing device and the audio source based on the at least one timestamp information and the at least one starting playing time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of audio, in particular to an audio synchronization method, an audio playing device and a storage medium. BACKGROUND

[0002] In order to realize the left and right ear audio synchronization of the wireless Bluetooth earphone, the existing scheme is to periodically send the local playing information of the master earphone to the slave earphone in the initial synchronization and synchronization tracking stage, and the slave earphone determines the adjustment value of the playing progress according to the difference between the playing information of the master earphone and the playing information of the slave earphone, and adjusts the playing speed of the slave earphone based on the adjustment value, so as to realize the playing following of the slave earphone to the master earphone.

[0003] However, the existing scheme needs the master earphone to periodically send the playing information to the slave earphone, which increases the data link burden between the pair of earphones, and in the case that the data link between the pair of earphones is not good, it may cause packet loss, and thus causes the problem of poor audio synchronization performance. SUMMARY

[0004] The embodiments of the present application provide an audio synchronization method, an audio playing device and a storage medium, which can improve the audio synchronization performance between earphones.

[0005] The technical scheme of the present application is implemented as follows:

[0006] In a first aspect, the embodiments of the present application provide an audio synchronization method for an audio playing device, which comprises:

[0007] receiving a group of synchronization data packets sent by an audio source; wherein the group of synchronization data packets comprises at least one synchronization data packet; and sequentially determining at least one timestamp information corresponding to the at least one synchronization data packet;

[0008] playing the group of synchronization data packets, and recording at least one starting playing time of the at least one synchronization data packet;

[0009] implementing the audio synchronization operation between the audio playing device and the audio source based on the at least one timestamp information and the at least one starting playing time.

[0010] In a second aspect, the embodiments of the present application provide an audio playing device, which comprises:

[0011] a receiving unit, configured to receive a group of synchronization data packets sent by an audio source; wherein the group of synchronization data packets comprises at least one synchronization data packet;

[0012] a playing unit, configured to play the group of synchronization data packets;

[0013] a recording unit configured to record at least one start playing time corresponding to the at least one synchronization data packet;

[0014] a determining unit configured to sequentially determine at least one timestamp information corresponding to the at least one synchronization data packet; and implement the audio synchronization operation between the audio playing device and the audio source based on the at least one timestamp information and the at least one start playing time.

[0015] In a third aspect, an embodiment of the present application provides an audio playing device, which comprises a receiver, a processor, a memory and a communication bus; and the processor implements the method according to any one of the preceding aspects when executing a program stored in the memory.

[0016] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the method according to any one of the preceding aspects.

[0017] The embodiments of the present application provide an audio synchronization method, an audio playing device and a storage medium. The method comprises the following steps: receiving a group of synchronization data packets sent by an audio source; wherein the group of synchronization data packets comprises at least one synchronization data packet; sequentially determining at least one timestamp information corresponding to the at least one synchronization data packet; playing the group of synchronization data packets and recording at least one start playing time of the at least one synchronization data packet; and implementing an audio synchronization operation between the audio playing device and the audio source based on the at least one timestamp information and the at least one start playing time. By using the implementation scheme, the audio source sends a group of synchronization data packets to the audio playing device, the audio playing device determines the timestamp information based on at least one synchronization data packet in the group of synchronization data packets, and then implements the audio synchronization operation between the audio playing device and the audio source, thereby realizing the synchronization playing between a pair of audio playing devices, reducing the load of the data link between the pair of audio playing devices, and further reducing the problem of playing out of synchronization caused by unstable air interface link transmission between the pair of audio playing devices, and further improving the audio synchronization performance between earphones. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 A flowchart of an audio synchronization method provided by an embodiment of the present application;

[0019] Figure 2 An exemplary synchronization playing schematic diagram provided by an embodiment of the present application;

[0020] Figure 3 An exemplary initialization synchronization schematic block diagram of an audio source and a TWS earphone provided by an embodiment of the present application;

[0021] Figure 4An exemplary schematic diagram of data stream information provided for an embodiment of the present application;

[0022] Figure 5 A structural schematic of an audio playback device 1 provided for an embodiment of the present application Figure 1 ;

[0023] Figure 6 A structural schematic of an audio playback device 1 provided for an embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0024] It should be understood that the specific embodiments described herein merely exemplify the present application. They are not intended to limit the present application.

[0025] An audio synchronization method for an audio playback device is provided in embodiments of the present application. The audio playback device can be a True Wireless Stereo (TWS) earphone, a Bluetooth speaker, or any other device capable of wireless audio playback. The audio playback device includes a first Bluetooth module, and the audio source includes a second Bluetooth module. The audio playback device and the audio source interact through the first Bluetooth module and the second Bluetooth module. As shown in FIG. 1, the method can include the following steps. Figure 1

[0026] S101, receiving a group of synchronization data packets sent by an audio source; wherein the group of synchronization data packets includes at least one synchronization data packet; and determining at least one timestamp information corresponding to at least one synchronization data packet in sequence.

[0027] In embodiments of the present application, the audio source sends an audio data stream supported by the Bluetooth standard to the audio playback device through the second Bluetooth module. The audio data stream is composed of a group of synchronization data packets, and the group of synchronization data packets includes at least one synchronization data packet. The audio source can be a tablet computer, a mobile phone, a personal computer (PC), a notebook computer, a wearable device, or any other Bluetooth device. As shown in FIG. 2, the audio source simultaneously sends an audio stream to the left and right TWS earphones. Figure 2

[0028] In embodiments of the present application, the audio playback device receives the audio data stream through the first Bluetooth module. Then, the audio playback device determines one timestamp information corresponding to each synchronization data packet in the audio data stream in sequence, and obtains at least one timestamp information corresponding to at least one synchronization data packet.

[0029] ​​In the embodiments of the present application, different data packet types correspond to different forms of timestamp acquisition strategies. The data packet types of the current and synchronous data packets can include broadcast isochronous stream (BIS) / connected isochronous stream (CIS) data packets (i.e., the first type of synchronous data packet), Bluetooth synchronous connection-oriented (SCO) data packets / extended Bluetooth synchronous connection-oriented (ESCO) data packets (i.e., the second type of synchronous data packet), and Bluetooth advanced audio distribution profile (A2DP) data packets (i.e., the third type of synchronous data packet), etc. The specific data packet type can be selected according to actual conditions, and the embodiments of the present application do not limit the specific data packet type, as long as it meets the Bluetooth standard support.

[0030] It should be noted that since the BIS / CIS audio data packet itself carries timestamp information and sequence number information of the data packet, if it is determined that the data packet type is the first type, the corresponding at least one timestamp information is directly searched from the at least one synchronous data packet in turn.

[0031] It should be noted that since the Bluetooth SCO / ESCO audio data packet only contains sequence number information of the data packet, and the Bluetooth SCO / ESCO audio data packet is sent at a time interval of 7.5 ms, if it is determined that the data packet type is the second type, at least one timestamp information corresponding to the at least one synchronous data packet is determined in turn according to the preset data packet sending interval. Then the at least one timestamp information can be filled into the corresponding data packet to participate in the subsequent audio synchronization process.

[0032] Specifically, the initial value of the index of the Bluetooth SCO / ESCO audio data packet is 0. After receiving a Bluetooth SCO / ESCO audio data packet at a preset data packet sending interval, the value of the index is increased by 1. Then, the calculation of the timestamp information corresponding to the synchronous data packet is implemented according to the index, as shown in formula (1).

[0033] time_stamp=index*7.5ms (1)

[0034] Wherein, time_stamp is the timestamp information. For the case of possible packet loss, the operation of formula (2) needs to be completed.

[0035] index = index + 1 (2)

[0036] It should be noted that since the Bluetooth A2DP audio data packet only contains the sequence number information of the data packet, and the transmission time interval of the Bluetooth A2DP audio data packet is inconsistent, if it is judged that the data packet type is the third type, then according to the preset playing speed, the last time stamp information corresponding to the last synchronization data packet and the last data packet length, a time stamp information corresponding to each synchronization data packet is determined, and at least one time stamp information is obtained.

[0037] Specifically, the time_stamp information is calculated according to the data packet length of the received Bluetooth A2DP audio data packet, as shown in formula (3),

[0038] time_stamp(n) = time_stamp(n-1) + length(n-1) / play_speed (3)

[0039] Wherein, time_stamp(n) represents the time stamp information of the nth synchronization data packet; length(n) represents the data length of the nth synchronization data packet; play_speed represents the playing speed.

[0040] Further, after receiving a group of synchronization data packets sent by the audio source, the initial alignment between the audio source and the audio playback device is performed first, and then at least one time stamp information corresponding to at least one synchronization data packet is determined in turn.

[0041] Specifically, the initial alignment process between the audio source and the audio playback device includes: calculating the frequency error and the clock error between the audio source and the audio playback device; compensating the system frequency of the audio playback device based on the frequency error; and compensating the system clock of the audio playback device based on the clock error. Further, the frequency alignment and clock alignment between the audio source and the audio playback device are realized.

[0042] For example, as shown in FIG. 4, the audio source and the audio playback device are initially aligned, and then the time stamp information corresponding to each synchronization data packet is determined in turn. Figure 3As shown, the audio source includes an application (AP) module, a digital signal processor (DSP) module, and a Bluetooth (BT) module, wherein the DSP module is provided with an audio phase locked loop (PLL) device for controlling the speed of audio playback, and the TWS earphone includes a COder-DECoder (CODEC) module, a DSP module, and a BT module, wherein the DSP module is also provided with an audio PLL device. The BT module of the audio source sends a mobile phone initialization frequency offset and a mobile phone initialization clock offset, as well as a synchronous playback instruction to the BT module of the TWS earphone.

[0043] S102, a group of synchronization data packets are played, and at least one starting playback time of at least one synchronization data packet is recorded.

[0044] After determining the at least one timestamp information corresponding to the at least one data packet, the synchronization playback instruction sent by the audio source is received, and a group of synchronization data packets are played based on the synchronization playback instruction. During the playing of the group of synchronization data packets, the starting playback time of each synchronization data packet is recorded to obtain at least one starting playback time corresponding to at least one synchronization data packet.

[0045] S103, based on the at least one timestamp information and the at least one starting playback time, the audio synchronization operation between the audio playback device and the audio source is realized.

[0046] After playing a group of synchronization data packets and recording at least one starting playback time of at least one synchronization data packet in real time, based on the at least one timestamp information and the at least one starting playback time, the audio synchronization operation between the audio playback device and the audio source is realized.

[0047] In the embodiments of the present application, based on the at least one timestamp information and the at least one starting playback time, the initial playback time difference and the target playback time difference every preset time period are determined respectively; and the audio synchronization operation between the audio playback device and the audio source is realized according to the target playback time difference and the initial playback time difference.

[0048] In the embodiments of the present application, according to the first starting playback time corresponding to the first synchronization data packet played first and the first timestamp information corresponding to the first synchronization data packet, the initial playback time difference is determined.

[0049] It should be noted that, in order to realize the synchronization between the audio source and the audio playback device, the time point of starting playback play_time(1) is set as time_stamp(1) (i.e. the first time stamp information corresponding to the first synchronization data packet) plus a fixed audio processing delay audio_process_delay, which is the initial playback time difference, and the function of the initial playback time difference is to serve as a reference for playback tracking.

[0050] In the embodiments of the present application, during the process of playing a group of synchronization data packets, playback tracking is performed based on the above-mentioned audio processing delay. Specifically, at each preset time period, the target playback time difference is determined according to the second start playback time corresponding to the currently played second synchronization data packet and the second time stamp information corresponding to the second synchronization data packet.

[0051] It should be noted that, during the process of playing a group of synchronization data packets, after a certain playback time is experienced, the frequency difference between the audio source and the audio playback device may be caused due to the differences in crystals themselves, temperature and other factors, and with the accumulation of time, the frequency difference will be reflected in the playback progress between the left and right ears. Therefore, the preset time period for playback tracking is set in advance, and when the preset time period is reached, the second synchronization data packet currently played is determined, the second start playback time and the second time stamp information corresponding to the second synchronization data packet are determined, and then the target playback time difference is determined based on the second start playback time and the second time stamp information.

[0052] In the embodiments of the present application, the difference between the second start playback time and the second time stamp information is calculated, and the difference is the target playback time difference.

[0053] In the embodiments of the present application, the audio playback device compares the target playback time difference with the initial playback time difference. If the target playback time difference is equal to the initial playback time difference, the audio playback speed of the audio playback device is not adjusted. If the target playback time difference is greater than the initial playback time difference, the audio playback speed of the audio playback device is increased. If the target playback time difference is less than the initial playback time difference, the audio playback speed of the audio playback device is decreased.

[0054] It should be noted that the target playback time difference and the initial playback time difference can be compared by calculating the difference between the target playback time difference and the initial playback time difference and comparing the difference with 0. The specific comparison method can be selected according to the actual situation, and the embodiments of the present application do not make specific limitations.

[0055] Based on the above embodiments, an exemplary audio synchronization method for TWS earphones is proposed in the embodiments of the present application. The specific data flow information is as follows: Figure 4As shown, the data stream is composed of a group of synchronization data packets with sequence number 1 to sequence number 14, each of which includes corresponding timestamp information and data volume. When starting to play the data stream information, the starting playing time 1 of the synchronization data packet with sequence number 1 is recorded, and the timestamp 1 of the synchronization data packet with sequence number 1 is obtained, and the difference 1 between the starting playing time 1 and the timestamp 1 is calculated. The sequence number 11 of the synchronization data packet separated by a preset time period is determined, the starting playing time 11 of the synchronization data packet with sequence number 11 is recorded, and the timestamp 11 of the synchronization data packet with sequence number 11 is obtained, and the difference 11 between the starting playing time 11 and the timestamp 11 is calculated. Then, the playing error between the difference 11 and the difference 1 is calculated. If the playing error is equal to 0, it means that the playing progress of the TWS earphone and the mobile phone is consistent, and no adjustment is needed at this time. If the playing error is greater than 0, it means that the playing progress of the TWS earphone lags behind, and the audio PLL of the TWS earphone needs to be adjusted faster. If the playing error is less than 0, it means that the playing progress of the TWS earphone is ahead of schedule, and the audio PLL of the TWS earphone needs to be adjusted slower.

[0056] It should be noted that the number of audio playing devices can be one or more, that is, the audio source can simultaneously implement the audio synchronization process of one or more audio playing devices. The audio source only needs to broadcast a group of synchronization data packets and a synchronization playing instruction to the audio playing devices to be synchronized, and one or more audio playing devices can automatically implement audio synchronization according to the received group of synchronization data packets. For the scene of multi-link and multi-audio playing, the synchronization playing between multiple devices can be realized without one device distributing to other devices, which greatly improves the convenience and real-time performance of audio synchronization.

[0057] It can be understood that the present application directly realizes the synchronization of the audio playing progress between the TWS earphone and the mobile phone based on the timestamp information carried by the group of synchronization data packets sent by the audio source, without the interaction between the earphones, reducing the load of the data link between the earphones, and reducing the problem of playing out of sync caused by unstable air interface link transmission between the earphones.

[0058] An audio playing device 1 is provided in the embodiments of the present application. As shown in the figure, the device 1 comprises: Figure 5 As shown, the device 1 comprises:

[0059] A receiving unit 10 is configured to receive a group of synchronization data packets sent by an audio source; wherein the group of synchronization data packets comprises at least one synchronization data packet;

[0060] A playing unit 11 is configured to play the group of synchronization data packets;

[0061] A recording unit 12 is configured to record at least one starting playing time corresponding to the at least one synchronization data packet;

[0062] The determining unit 13 is configured to sequentially determine at least one timestamp information corresponding to the at least one synchronization data packet; and implement audio synchronization operation between the audio playback device and the audio source based on the at least one timestamp information and the at least one start playback time.

[0063] Optionally, the determining unit 13 is further configured to determine an initial playback time difference and a target playback time difference every preset time period based on the at least one timestamp information and the at least one start playback time; and implement the audio synchronization operation between the audio playback device and the audio source according to the target playback time difference and the initial playback time difference.

[0064] Optionally, the determining unit 13 is further configured to determine the initial playback time difference according to a first start playback time corresponding to a first synchronization data packet that is played first and a first timestamp information corresponding to the first synchronization data packet.

[0065] Optionally, the determining unit 13 is further configured to determine the target playback time difference every preset time period according to a second start playback time corresponding to a second synchronization data packet that is played currently and a second timestamp information corresponding to the second synchronization data packet.

[0066] Optionally, the determining unit 13 is further configured to not adjust the audio playback speed of the audio playback device if the target playback time difference is equal to the initial playback time difference; to speed up the audio playback speed of the audio playback device if the target playback time difference is greater than the initial playback time difference; and to slow down the audio playback speed of the audio playback device if the target playback time difference is less than the initial playback time difference.

[0067] Optionally, the determining unit 13 is further configured to determine a data packet type corresponding to the at least one synchronization data packet; to sequentially search for the at least one timestamp information corresponding to the at least one synchronization data packet if the data packet type is a first type; to sequentially determine the at least one timestamp information corresponding to the at least one synchronization data packet according to a preset data packet sending interval if the data packet type is a second type; and to determine one timestamp information corresponding to each synchronization data packet according to a preset playback speed, a last timestamp information corresponding to a last synchronization data packet and a last data packet length, to obtain the at least one timestamp information if the data packet type is a third type.

[0068] Optionally, the device 1 further comprises a calculating unit and a compensating unit.

[0069] The calculating unit is configured to calculate a frequency error and a clock error between the audio source and the audio playback device.

[0070] The compensation unit is configured to compensate a system frequency of the audio playback device based on the frequency error and compensate a system clock of the audio playback device based on the clock error.

[0071] Optionally, the audio playback device comprises a Bluetooth module, and the audio source comprises a second Bluetooth module, and the audio playback device and the audio source interact through the first Bluetooth module and the second Bluetooth module.

[0072] Optionally, the number of the audio playback devices is one or more.

[0073] Optionally, the first type of synchronization data packet is a broadcast synchronization data stream (BIS) or a connection-oriented synchronization data stream (CIS) packet; the second type of synchronization data packet is a connection-oriented synchronization (SCO) packet or an extended Bluetooth connection-oriented synchronization data (ESCO) packet; and the third type of synchronization data packet is a Bluetooth audio transmission model agreement (A2DP) packet.

[0074] The audio playback device provided by the embodiment of the present application receives a group of synchronization data packets sent by an audio source; wherein the group of synchronization data packets comprises at least one synchronization data packet; at least one timestamp information corresponding to the at least one synchronization data packet is determined in sequence; the group of synchronization data packets is played, and at least one starting playing time of the at least one synchronization data packet is recorded; and audio synchronization operation between the audio playback device and the audio source is realized based on the at least one timestamp information and the at least one starting playing time. As can be seen, the audio playback device provided by the embodiment sends a group of synchronization data packets to the audio playback device, and the audio playback device realizes audio synchronization between the audio playback device and the audio source based on the timestamp information determined by the at least one synchronization data packet in the group of synchronization data packets, thereby realizing synchronization between a pair of audio playback devices, reducing the load of the data link between the pair of audio playback devices, and further reducing the problem of playing out of synchronization caused by unstable air interface link transmission between the pair of audio playback devices, thereby improving the audio synchronization performance between earphones.

[0075] Figure 6 A schematic structural diagram of an audio playback device 1 provided by the embodiment of the present application Figure 2 In actual application, based on the same disclosure concept of the above embodiment, as shown in Figure 6 The device 1 of the embodiment comprises a receiver 14, a processor 15, a memory 16 and a communication bus 17.

[0076] In the process of the specific embodiments, the playing unit 11, the recording unit 12, the determining unit 13, the calculating unit and the compensating unit described above can be implemented by a processor 15 located on the audio playing device 1, the receiving unit 10 described above can be implemented by a receiver 14 located on the device 1, and the processor 15 can be at least one of an application specific integrated circuit (ASIC), a DSP, a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a micro controller, and a microprocessor. It can be understood that, for different devices, the electronic device used to implement the functions of the processor described above can also be other devices, and the embodiments are not limited in this regard.

[0077] In the embodiments of the present application, the communication bus 17 is used to realize the connection and communication among the receiver 14, the processor 15 and the memory 16; the receiver 14 is used to receive a group of synchronization data packets sent by an audio source; at least one synchronization data packet is included in the group of synchronization data packets; and the processor 15 realizes the following audio synchronization method when executing the running program stored in the memory 16.

[0078] The at least one timestamp information corresponding to the at least one synchronization data packet is determined in sequence; the group of synchronization data packets is played, and at least one starting playing time of the at least one synchronization data packet is recorded; and the audio synchronization operation between the audio playing device and the audio source is realized based on the at least one timestamp information and the at least one starting playing time.

[0079] Further, in the embodiments described above, the processor 15 is further used to determine an initial playing time difference and a target playing time difference every preset time period based on the at least one timestamp information and the at least one starting playing time; and the audio synchronization operation between the audio playing device and the audio source is realized according to the target playing time difference and the initial playing time difference.

[0080] Further, in the embodiments described above, the processor 15 is further used to determine the initial playing time difference according to a first starting playing time corresponding to a first synchronization data packet played first and a first timestamp information corresponding to the first synchronization data packet.

[0081] Further, in the above embodiment, the processor 15 is further configured to determine the target play time difference according to a second start play time corresponding to the currently played second synchronization data packet and the second timestamp information corresponding to the second synchronization data packet every preset time period.

[0082] Further, in the above embodiment, the processor 15 is further configured to, if the target play time difference is equal to the initial play time difference, not adjust the audio play speed of the audio play device; if the target play time difference is greater than the initial play time difference, speed up the audio play speed of the audio play device; and if the target play time difference is less than the initial play time difference, slow down the audio play speed of the audio play device.

[0083] Further, in the above embodiment, the processor 15 is further configured to determine a data packet type corresponding to the at least one synchronization data packet; if the data packet type is a first type, sequentially search for the at least one timestamp information corresponding to the at least one synchronization data packet; if the data packet type is a second type, sequentially determine the at least one timestamp information corresponding to the at least one synchronization data packet according to a preset data packet sending interval; and if the data packet type is a third type, determine one timestamp information corresponding to each synchronization data packet according to a preset play speed, a previous timestamp information corresponding to a previous synchronization data packet and a previous data packet length, to obtain the at least one timestamp information.

[0084] Further, in the above embodiment, the processor 15 is further configured to calculate a frequency error and a clock error between the audio source and the audio play device; compensate a system frequency of the audio play device based on the frequency error; and compensate a system clock of the audio play device based on the clock error.

[0085] Further, in the above embodiment, the audio play device comprises a Bluetooth module, and the audio source comprises a second Bluetooth module, and the audio play device and the audio source interact through the first Bluetooth module and the second Bluetooth module.

[0086] Further, in the above embodiment, the number of the audio play devices is one or more.

[0087] Further, in the above embodiment, the first type of synchronization data packet is a broadcast synchronization data stream (BIS) or a connection-oriented synchronization data stream (CIS) data packet; the second type of synchronization data packet is a connection-oriented synchronization (SCO) data packet or an extended Bluetooth connection-oriented synchronization data (ESCO) data packet; and the third type of synchronization data packet is a Bluetooth audio transmission model agreement (A2DP) data packet.

[0088] The embodiment of the present application provides a storage medium, which stores a computer program, the computer readable storage medium stores one or more programs, the one or more programs can be executed by one or more processors, and the one or more programs are applied to an audio playing device, and the computer program implements the method for audio synchronization.

[0089] It should be noted that, in this document, the terms "comprising", "containing" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or apparatus that comprises a list of elements not only includes those elements, but also includes other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.

[0090] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present disclosure essentially or say the part that contributes to the related art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions to make an image display device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in each embodiment of the present disclosure.

[0091] The above description is only a preferred embodiment of the present application, and is not intended to limit the protection scope of the present application.

Claims

1. An audio synchronization method for an audio playback device, characterized by, The method comprises: receiving a set of synchronization data packets sent by an audio source, wherein the set of synchronization data packets comprises at least one synchronization data packet; and determining at least one timestamp information corresponding to the at least one synchronization data packet in sequence according to a data packet type corresponding to the at least one synchronization data packet; playing the set of synchronization data packets and recording at least one starting playing time of the at least one synchronization data packet; implementing audio synchronization operation between the audio playing device and the audio source based on the at least one timestamp information and the at least one starting playing time; the implementation of the audio synchronization operation between the audio playing device and the audio source based on the at least one timestamp information and the at least one starting playing time comprises: determining an initial playing time difference and a target playing time difference every preset time period based on the at least one timestamp information and the at least one starting playing time; the initial playing time difference is a fixed audio processing time delay; comparing the target playing time difference and the initial playing time difference to implement the audio synchronization operation between the audio playing device and the audio source.

2. The method of claim 1, wherein, the determination of the initial playing time difference based on the at least one timestamp information and the at least one starting playing time comprises: determining the initial playing time difference according to a first starting playing time corresponding to a first synchronization data packet played first and a first timestamp information corresponding to the first synchronization data packet.

3. The method of claim 1, wherein, the determination of the target playing time difference every preset time period based on the at least one timestamp information and the at least one starting playing time comprises: determining the target playing time difference every preset time period according to a second starting playing time corresponding to a second synchronization data packet played currently and a second timestamp information corresponding to the second synchronization data packet.

4. The method of claim 1, wherein, the implementation of the audio synchronization operation between the audio playing device and the audio source according to the target playing time difference and the initial playing time difference comprises: if the target playing time difference is equal to the initial playing time difference, not adjusting the audio playing speed of the audio playing device; if the target playing time difference is greater than the initial playing time difference, increasing the audio playing speed of the audio playing device; if the target playing time difference is less than the initial playing time difference, decreasing the audio playing speed of the audio playing device.

5. The method of claim 1, wherein, the determination of the at least one timestamp information corresponding to the at least one synchronization data packet in sequence comprises: determining a data packet type corresponding to the at least one synchronization data packet; if the data packet type is a first type, sequentially searching for the at least one timestamp information corresponding to the at least one synchronization data packet from the at least one synchronization data packet; if the data packet type is a second type, sequentially determining the at least one timestamp information corresponding to the at least one synchronization data packet according to a preset data packet sending interval; if the data packet type is a third type, determining one timestamp information corresponding to each synchronization data packet according to a preset playing speed, a last timestamp information corresponding to a last synchronization data packet and a last data packet length, to obtain the at least one timestamp information.

6. The method of claim 1, wherein, after receiving the set of synchronization data packets sent by the audio source; before sequentially determining the at least one timestamp information corresponding to the at least one synchronization data packet, the method further comprises: calculating a frequency error and a clock error between the audio source and the audio playback device; compensating a system frequency of the audio playback device based on the frequency error and compensating a system clock of the audio playback device based on the clock error.

7. The method of claim 1, wherein, The audio playback device comprises a first Bluetooth module, and the audio source comprises a second Bluetooth module, and the audio playback device and the audio source interact through the first Bluetooth module and the second Bluetooth module.

8. The method of claim 1, wherein, The number of the audio playback devices is one or more.

9. The method of claim 5, wherein, The first type of synchronization data packet is a broadcast synchronization data stream (BIS) or a connection-oriented synchronization data stream (CIS) packet; the second type of synchronization data packet is a connection-oriented synchronization (SCO) packet or an extended Bluetooth connection-oriented synchronization data (ESCO) packet; and the third type of synchronization data packet is a Bluetooth audio transmission model agreement (A2DP) packet.

10. An audio playback device, comprising: The device comprises: a receiving unit configured to receive a set of synchronization data packets sent by an audio source, wherein the set of synchronization data packets comprises at least one synchronization data packet; a playback unit configured to play the set of synchronization data packets; a recording unit configured to record at least one start playback time corresponding to the at least one synchronization data packet; a determining unit configured to sequentially determine at least one timestamp information corresponding to the at least one synchronization data packet according to a type of the at least one synchronization data packet, and to implement an audio synchronization operation between the audio playback device and the audio source based on the at least one timestamp information and the at least one start playback time. The determining unit is further configured to determine an initial playback time difference and a target playback time difference every preset time period based on the at least one timestamp information and the at least one start playback time, the initial playback time difference being a fixed audio processing time delay, and to compare the target playback time difference with the initial playback time difference to implement the audio synchronization operation between the audio playback device and the audio source.

11. An audio playback device, comprising: The device comprises a receiver, a processor, a memory, and a communication bus; and the processor implements the method according to any one of claims 1-9 when executing the running program stored in the memory.

12. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Accurate and synchronous video playing method, apparatus and device among multiple devices, and storage medium

    CN108495239A