CN109521988B - Audio playing synchronization method and device - Google Patents

Audio playing synchronization method and device Download PDF

Info

Publication number
CN109521988B
CN109521988B CN201710841085.XA CN201710841085A CN109521988B CN 109521988 B CN109521988 B CN 109521988B CN 201710841085 A CN201710841085 A CN 201710841085A CN 109521988 B CN109521988 B CN 109521988B
Authority
CN
China
Prior art keywords
audio
later
equipment
stage
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710841085.XA
Other languages
Chinese (zh)
Other versions
CN109521988A (en
Inventor
柯海涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Actions Technology Co Ltd
Original Assignee
Actions Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Actions Technology Co Ltd filed Critical Actions Technology Co Ltd
Priority to CN201710841085.XA priority Critical patent/CN109521988B/en
Publication of CN109521988A publication Critical patent/CN109521988A/en
Application granted granted Critical
Publication of CN109521988B publication Critical patent/CN109521988B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs

Abstract

The application discloses an audio playing synchronization method and device. In the method, a first receiving parameter and a later receiving parameter are firstly obtained, wherein the first receiving parameter is obtained according to the statistics of the audio data receiving condition of first audio equipment, and the later receiving parameter is obtained according to the statistics of the audio data receiving condition of later audio equipment; further, an adjustment scheme is determined according to the first receiving parameter and a first preset threshold and/or the later receiving parameter and a later preset threshold, where the adjustment scheme is used to adjust the playing sampling rate of the first audio device and/or the later audio device.

Description

Audio playing synchronization method and device
Technical Field
The present application relates to the field of wireless audio, and in particular, to an audio playing synchronization method and apparatus.
Background
When audio data is transmitted between devices, the devices may be defined as a source terminal and a sink terminal, for example, a mobile phone and a computer may be a source terminal device (also referred to as an audio source device), an earphone and a speaker may be a sink terminal device (also referred to as an audio device), and the source terminal device sends the audio data to the sink terminal device for playing. It is common that a source terminal and a plurality of sink terminals transmit audio data in a wireless manner, and a plurality of sink terminal devices play the received audio data synchronously.
However, there are many uncertainties in wireless transmission, which results in the problem that the multiple devices cannot synchronize. For example, signal attenuation and instability are caused by signal interference or too large transmission distance, so that sink end equipment cannot receive audio data in time, or packet loss is caused. The time requirement for playing scenes with different sound channels by multiple devices is strict, the traditional interaction mode cannot achieve high precision, and playing deviation can be generated.
Therefore, the technical problem to be solved at present is to eliminate the play deviation generated when the multi-device synchronous audio is played.
Disclosure of Invention
The embodiment of the application provides an audio playing synchronization method and device, so that audio playing among multiple devices is synchronized.
An embodiment of the present application provides an audio playing synchronization method, including:
acquiring a first receiving parameter and a later receiving parameter, wherein the first receiving parameter is obtained by statistics according to the audio data receiving condition of first audio equipment, and the later receiving parameter is obtained by statistics according to the audio data receiving condition of later audio equipment;
and determining an adjusting scheme according to the first receiving parameter and a first preset threshold and/or the later-stage receiving parameter and a later-stage preset threshold, wherein the adjusting scheme is used for adjusting the playing sampling rate of the first audio equipment and/or the later-stage audio equipment.
Optionally, the playing sample rate of the first audio device and/or the later audio device is adjusted according to the same resampling rate in the adjustment scheme.
Optionally, the method further comprises: at a preset time point, adjusting the playing sampling rate of the later-stage audio equipment and/or the first audio equipment according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment;
if the playing sampling rate of the later-stage audio equipment and/or the first audio equipment is adjusted according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment, and the audio data of the later-stage audio equipment and the audio data of the first audio equipment are synchronously played, the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the later-stage audio equipment and the first audio equipment is adjusted back to the playing sampling rate at the preset time point.
Optionally, before the above flow method, initial synchronous playing time of the first audio device and the later audio device is further determined; and the first audio equipment and the later-stage audio equipment start to play audio data at the initial synchronous playing time.
The initial synchronous playing time is determined according to a first transmission delay and a second transmission delay between the first audio equipment and the rear-stage audio equipment; the first transmission delay is transmission delay of a synchronous signal, and the second transmission delay is transmission delay of audio data.
And the first audio equipment and/or the rear-stage audio equipment receive audio data through Bluetooth.
An embodiment of the present application provides an audio playing synchronization method, including:
acquiring a first receiving parameter, wherein the first receiving parameter is obtained by statistics according to the receiving condition of audio data of first audio equipment; wherein the first audio device is wirelessly connected with an audio source device, the first audio device receiving audio data from the audio source device.
And determining an adjusting scheme according to the first receiving parameter and a preset threshold, wherein the adjusting scheme is used for adjusting the playing sampling rate of the first audio equipment.
An embodiment of the present application provides an audio playing synchronization method and apparatus, where the apparatus includes:
the acquisition module is used for acquiring a first receiving parameter and a later receiving parameter, wherein the first receiving parameter is obtained according to the statistics of the audio data receiving condition of the first audio equipment, and the later receiving parameter is obtained according to the statistics of the audio data receiving condition of the later audio equipment.
A determining module, configured to determine an adjustment scheme according to the first receiving parameter and a first preset threshold and/or the subsequent receiving parameter and a subsequent preset threshold, where the adjustment scheme is used to adjust a playing sampling rate of the first audio device and/or the subsequent audio device.
Optionally, the apparatus further comprises: and the adjusting module is used for adjusting the playing sampling rate of the first audio equipment and/or the later-stage audio equipment according to the same resampling rate in the adjusting scheme.
Optionally, the adjusting module is further configured to: after the audio data to be played is sampled and played according to the adjusted playing sampling rate, executing the following steps:
and at a preset time point, adjusting the playing sampling rate of the rear-stage audio equipment and/or the first audio equipment according to the audio data playing condition statistical result of the rear-stage audio equipment and the audio data playing condition statistical result of the first audio equipment.
If the playing sampling rate of the later-stage audio equipment and/or the first audio equipment is adjusted according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment, and the audio data of the later-stage audio equipment and the audio data of the first audio equipment are synchronously played, the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the later-stage audio equipment and the first audio equipment is adjusted back to the playing sampling rate at the preset time point.
Optionally, the first audio device and/or the later audio device receives audio data via bluetooth.
Since the embodiment of the application obtains the first receiving parameter and the later receiving parameter, and determines the adjustment scheme according to the first receiving parameter, the later receiving parameter and the preset threshold, the adjustment scheme is used for adjusting the playing sampling rate of the first audio device and/or the later audio device, and the synchronization of audio playing between the first audio device and the later audio device can be ensured through adjustment.
An embodiment of the present application provides an audio playing synchronization method and apparatus, where the apparatus includes:
the acquisition module is used for acquiring a first receiving parameter, and the first receiving parameter is obtained by statistics according to the audio data receiving condition of the first audio equipment; wherein the first audio device is wirelessly connected with an audio source device, the first audio device receiving audio data from the audio source device.
And the determining module is used for determining an adjusting scheme according to the first receiving parameter and a preset threshold, wherein the adjusting scheme is used for adjusting the playing sampling rate of the first audio equipment.
Drawings
FIG. 1 is a diagram of a system architecture suitable for use with embodiments of the present application;
fig. 2 is a schematic flowchart illustrating an audio playing synchronization method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a second audio playing synchronization method according to an embodiment of the present application;
fig. 4A is a schematic flowchart illustrating a process of adjusting a playback sampling rate by using a first audio device as an execution subject according to an embodiment of the present application;
fig. 4B is a schematic flowchart illustrating a process of adjusting a play sampling rate by using a mobile phone as an execution subject according to an embodiment of the present application;
fig. 5 is a schematic flowchart of adjusting a playing sampling rate according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of one of the audio playback synchronization apparatuses according to the embodiment of the present application;
fig. 7 is a schematic structural diagram of a second audio playback synchronization apparatus according to an embodiment of the present application.
Detailed Description
In the embodiment of the application, the synchronization of the playing of the multiple devices during wireless transmission can be realized according to the collection and adjustment of the audio data of the multiple devices.
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 1 schematically illustrates a system architecture diagram applicable to an embodiment of the present application, where the system architecture diagram includes an audio source device and one or more audio devices, the audio source device may transmit audio data to the audio device, and the audio device may play received frequency domain data and may further transmit the audio data to other audio devices. The audio source device may be a mobile phone, a computer, or the audio source may be from a memory card (e.g., an SD card). The audio device may be a headphone or a sound box. The audio source device can be directly connected with each audio device, and directly sends the audio data to each audio device, or can be connected with part of the audio devices, and the audio data can be transmitted to the next level device of the audio devices through the audio devices. For example, the audio source device sends audio data to audio device 1, audio device 1 in turn sends audio data to audio device 2, and so on. Different audio devices may play different audio tracks or the same audio track. In the embodiment of the present application, for any audio device, for example, a first audio device, a preceding-stage audio device called the first audio device that transmits audio data to the first audio device, and an audio device that receives audio data transmitted by the first audio device is called a subsequent-stage audio device of the first audio device.
The audio source equipment and the audio equipment can be in wireless connection or wired connection, and the audio equipment can be in wireless connection. The wireless connection may include data transmission or connection through a bluetooth function or an infrared function.
Taking the example of the wireless connection as the bluetooth connection, the connection form between the main bodies in the embodiment of the present application includes, but is not limited to, the following scenarios:
scene one: the audio source device is respectively connected with the first audio device and the rear-stage audio device through Bluetooth. For example, the mobile phone is an audio source device, the mobile phone sends audio data to the first audio device through bluetooth, and the mobile phone sends the audio data to the later-stage audio device through bluetooth. If a plurality of rear-stage audio devices exist, the mobile phone sends the audio data to each multi-stage audio device through Bluetooth.
Scene two: the audio source equipment is connected with the first audio equipment through Bluetooth, and the first audio equipment is connected with the rear-stage audio equipment through Bluetooth. For example, the mobile phone is an audio source device, the mobile phone sends audio data to the first audio device through bluetooth, and the first audio device sends the audio data to the later-stage audio device through bluetooth. If a plurality of rear-stage audio equipment exist, the audio data are sent to the rear-stage audio equipment by the front-stage audio equipment through the Bluetooth by analogy.
Scene three: the audio source equipment is in wired connection with the first audio equipment, and the first audio equipment is connected with the rear-stage audio equipment through Bluetooth. For example, the SD card is an audio source, the audio data of the first audio device comes from the SD card plugged in the device, and the first audio device sends the audio data to the subsequent audio device through bluetooth. If a plurality of rear-stage audio equipment exist, the audio data are sent to the rear-stage audio equipment by the front-stage audio equipment through the Bluetooth by analogy.
Scene four: the audio source equipment is connected with the first audio equipment in a wired mode and is connected with the rear-stage audio equipment in a wireless mode. For example, the mobile phone is an audio source device, the mobile phone is connected to an audio input port (line in port) of the first audio device through an audio line, the audio data is transmitted to the first audio device through the audio line, and the mobile phone or the first audio device transmits the audio data to the later-stage audio device through bluetooth.
The following describes an audio playback synchronization method provided in an embodiment of the present application.
In this embodiment of the present application, in order to implement the synchronous playing of the first audio device and the subsequent audio device, the initial synchronous playing time of the first audio device and the subsequent audio device may be determined first, and the first audio device and the subsequent audio device may start to play the audio data at the initial synchronous playing time, so as to achieve the initial playing synchronization.
The initial synchronous playing time of the first audio equipment and the later-stage audio equipment can be determined according to the first transmission time delay and the second transmission time delay between the first audio equipment and the later-stage audio equipment. The first transmission delay is transmission delay of a synchronous signal, and the second transmission delay is transmission delay of audio data.
In an implementation, the first transmission delay may be obtained through a pre-interaction process, that is, before starting to transmit the audio data, a synchronization message (which does not include the audio data) may be interacted between the audio devices to obtain the first transmission delay. For example, the first audio device transmits a synchronization message to the later-stage audio data, including the transmission time stamp t0 of the first audio device; the rear-stage audio equipment receives the message, the receiving time is recorded as t1, and the rear-stage audio equipment returns a synchronization message to the first audio equipment, wherein the synchronization message comprises a sending time stamp t2 of the rear-stage audio equipment; and the first audio equipment receives the synchronization message returned by the subsequent audio equipment, and the receiving time is marked as t3, so that the first audio equipment can determine the first transmission delay according to the time difference between t2 and t 3.
The second transmission delay determination process is similar to the above process, except that the message transmitted between the first audio device and the subsequent audio device is a message containing audio data.
After the first transmission delay and the second transmission delay are determined, the initial synchronous playing time can be determined according to the first transmission delay and the second transmission delay.
In the field of audio signal processing, when an audio signal needs to be sampled, the audio signal is usually acquired according to a specific sampling rate. For example, the sampling rate may be set to 8000 in advance, that is, 8000 sound samples are collected per second. When a sample rate conversion, i.e. resampling, problem is encountered, for example, for an audio signal that has been successfully acquired at a certain sample rate, the sample rate needs to be increased or decreased, and therefore, resampling on the basis of an audio signal that has been successfully acquired at a certain sample rate is needed. Resampling is to process one group of digital signals into another group of digital signals, and can be realized by a software method. When up-sampling, interpolation is needed; when down-sampling, decimation is required. For non-integer resampling ratios (i.e. up-sampling: output sample rate/input sample rate, down-sampling: input sample rate/output sample rate), both interpolation and decimation are required.
An embodiment of the present application provides an audio playing synchronization method, as shown in fig. 2, the method includes:
step 201: the method comprises the steps of obtaining a first receiving parameter and a later receiving parameter, wherein the first receiving parameter is obtained according to the statistics of the audio data receiving condition of first audio equipment, and the later receiving parameter is obtained according to the statistics of the audio data receiving condition of later audio equipment.
Step 202: and determining an adjusting scheme according to the first receiving parameter and a first preset threshold and/or the later-stage receiving parameter and a later-stage preset threshold, wherein the adjusting scheme is used for adjusting the playing sampling rate of the first audio equipment and/or the later-stage audio equipment.
Another embodiment of the present application provides an audio playback synchronization method, when a first audio device is wirelessly connected to an audio source device and the first audio device receives audio data from the audio source device, as shown in fig. 3, the method includes:
step 301: and acquiring a first receiving parameter, wherein the first receiving parameter is obtained according to the statistics of the audio data receiving condition of the first audio equipment.
Step 302: and determining an adjusting scheme according to the first receiving parameter and a preset threshold, wherein the adjusting scheme is used for adjusting the playing sampling rate of the first audio equipment.
For a clearer understanding of the embodiments of the present application, details are provided below with reference to fig. 4A for one of the adjustment flow methods of the playback sampling rate. The flow is described taking the first audio apparatus as an execution subject as an example. The first audio equipment and the later-stage audio equipment are two different audio equipment respectively. The process shown in fig. 4A is applicable to various scenarios described above, for example, the first audio device receives audio data from an audio source and sends the audio data to the subsequent audio device via bluetooth, or the first audio device and the subsequent audio device respectively receive audio data sent by the audio source device via bluetooth.
As shown, the method may include: the first audio device counts first receiving parameters according to the receiving condition of the audio data (step 401), and receives the rear-stage receiving parameters which are counted and fed back by the rear-stage audio device according to the condition of the audio data (step 402). The steps 401 and 402 have no strict timing requirements.
Wherein the first receiving parameter and the later-stage receiving parameter are used for characterizing a relationship between a data amount of the received audio data and a time length for receiving the audio data of the data amount. Specifically, the first receiving parameter and the later-stage receiving parameter are respectively the data volume of the audio data received within a set time length; alternatively, the first reception parameter and the subsequent reception parameter are each a data rate of the received audio data, the data rate being (data amount)/(length of time taken to receive the audio data of the data amount).
In step 403, an adjustment scheme is determined according to the first receiving parameter and a first preset threshold and/or the subsequent receiving parameter and a subsequent preset threshold.
Specifically, the following three methods may be adopted to determine the adjustment scheme according to the first receiving parameter and the first preset threshold and/or the subsequent receiving parameter and the subsequent preset threshold:
the method comprises the following steps: and determining an adjusting scheme according to the comparison result of the first receiving parameter and the first preset threshold and the comparison result of the later-stage receiving parameter and the later-stage preset threshold.
For example, the first receiving parameter is N13, the next receiving parameter is N23, the first preset threshold is N100, and the next preset threshold is N200; if N13 is smaller than N100 and N23 is smaller than N200, the first audio equipment starts a self-resampling module to stretch data to obtain a new playing sampling rate, and the later-stage audio equipment processes the new playing sampling rate in the same way; if N13 is greater than N100 and N23 is greater than N200, the first audio device starts a self-resampling module to perform data compression, a new playing sampling rate is obtained, and the later-stage audio device processes the data in the same way. If the adjustment scheme indicates that no adjustment is required to the playback sample rate of the first audio device (e.g., no adjustment is required to the playback sample rate of the first audio device when N13 is equal to N100), then the first audio device does not need to adjust the playback sample rate; if the adjustment scheme indicates that the playing sampling rate of the later-stage audio device does not need to be adjusted (for example, when N23 is N200, the playing sampling rate of the later-stage audio device does not need to be adjusted), the later-stage audio device does not need to adjust the playing sampling rate; if the adjustment scheme indicates that the playing sampling rates of the first audio device and the later audio device do not need to be adjusted, the playing sampling rates of the first audio device and the later audio device do not need to be adjusted.
Wherein N13 and N23 are data volumes, N100 and N200 are data volume thresholds, respectively, or N13 and N23 are data rates, and N100 and N200 are data rate thresholds, respectively.
The method 2 comprises the following steps: and determining an adjusting scheme according to the comparison result of the first receiving parameter and the first preset threshold.
In the third or fourth scenario of the connection form between the subjects according to the embodiment of the present application, when the audio source device is connected to the subsequent audio device by wire, the subsequent preset threshold may be set to 0. If the first receiving parameter is N13 and the first preset threshold is N100, if N13 is smaller than N100, the first audio equipment starts a self-resampling module to stretch data, and a new playing sampling rate is obtained; if N13 is greater than N100, the first audio equipment starts a self resampling module to perform data compression, and a new playing sampling rate is obtained; if the adjustment scheme indicates that no adjustment is required to the playback sample rate of the first audio device (e.g., no adjustment is required to the playback sample rate of the first audio device when N13 is equal to N100), then the first audio device does not need to adjust the playback sample rate.
The method 3 comprises the following steps: and determining an adjusting scheme according to the comparison result of the rear-stage receiving parameter and the rear-stage preset threshold value.
In the third or fourth scenario of the connection form between the subjects according to the embodiment of the present application, when the audio source device is connected to the first audio device by wire, the first preset threshold may be set to 0. If the rear-stage receiving parameter is N23 and the rear-stage preset threshold is N200, if N23 is smaller than N200, the rear-stage audio equipment starts a resampling module per se to stretch data, and a new playing sampling rate is obtained; if N23 is larger than N200, the back-stage audio equipment starts a resampling module to compress data, and a new playing sampling rate is obtained; if the adjustment scheme indicates that the playback sample rate of the subsequent audio device does not need to be adjusted (e.g., when N23 is equal to N200, the playback sample rate of the subsequent audio device does not need to be adjusted), the subsequent audio device does not need to adjust the playback sample rate.
In the above three methods, the set threshold is related to the system resource or buffer size of the audio device itself.
After the adjustment scheme is determined by step 403, the playback sample rate of the audio data may be adjusted according to the adjustment scheme (step 404). Specifically, the first audio device may adjust its own play sampling rate according to the determined adjustment scheme, and send the adjustment scheme to the subsequent audio device, so that the subsequent audio device adjusts its play sampling rate according to the adjustment scheme. In another case, the later-stage audio device may adjust its own play sampling rate according to the determined adjustment scheme, and send the adjustment scheme to the first audio device, so that the first audio device adjusts its play sampling rate according to the adjustment scheme.
The adjustment scheme determined in step 403 may include a playing sampling rate as a target playing sampling rate, and when the playing sampling rate is adjusted according to the adjustment scheme, the playing sampling rate may be adjusted according to the same target playing sampling rate included in the adjustment scheme. The adjustment of the playing sampling rate according to the target playing sampling rate can be realized in various ways, which is not limited in the embodiment of the present application.
The process shown in fig. 4A can be executed according to a set period, so that the playing synchronization between the audio playing devices can be maintained.
The above flow has been described with the first audio device as the execution subject, and in another example, a device having a calculation processing capability and a wireless communication capability, such as a mobile phone, may be used as the execution subject to perform the play synchronization processing. Fig. 4B illustrates the playback synchronization process by taking a mobile phone as an example. The first audio equipment and the later-stage audio equipment are two different audio equipment respectively. The process shown in fig. 4B is applicable to various scenarios, such as that the first audio device receives audio data from an audio source and sends the audio data to the subsequent audio device via bluetooth, or the first audio device and the subsequent audio device respectively receive audio data sent by the audio source device via bluetooth.
The process may include:
step 410: the mobile phone acquires a first receiving parameter and a later receiving parameter. The first receiving parameter can be obtained by the first audio equipment according to the statistics of the audio data receiving condition of the first audio equipment and sent to the mobile phone, and the later-stage receiving parameter can be obtained by the later-stage audio equipment according to the statistics of the audio data receiving condition of the later-stage audio equipment and sent to the mobile phone.
The meaning of the first receiving parameter and the following receiving parameter and the determining method can be the same as those described in the foregoing embodiments, and are not repeated here.
Step 411: and the mobile phone determines an adjusting scheme according to the first receiving parameter and a first preset threshold and/or the later receiving parameter and a later preset threshold. The method for determining the adjustment scheme can be the same as that described in the previous embodiment, and is not repeated here.
Step 412: and the mobile phone sends the determined adjusting scheme to the first audio equipment and/or the rear-stage audio equipment so that the first audio equipment and/or the rear-stage audio equipment can adjust the playing sampling rate. The method for adjusting the playing sampling rate according to the adjustment scheme by the first audio device and the subsequent audio device may be the same as that described in the foregoing embodiments, and will not be repeated here.
The process shown in fig. 4B can be executed according to a set period, so that the playing synchronization between the audio playing devices can be maintained.
The method provided by the embodiment of the application can ensure the synchronization of audio playing among multiple devices, and reduces the influence on audio data transmission caused by attenuation, instability, interference and the like of wireless signals in wireless transmission.
In order to better understand the method described in the embodiment of the present application, the flow of the method is described by way of example, where the preset threshold of the first audio device is a first preset threshold, and the preset threshold of the later audio device is a later preset threshold. In the process of audio playing, if the first receiving parameter is greater than a first preset threshold value and the later receiving parameter is greater than a later preset threshold value, the first audio equipment starts a resampling module of the first audio equipment to compress audio data to obtain a new playing sampling rate, the new playing sampling rate is transmitted to the later audio equipment, and the later audio equipment adjusts the sampling rate of the later audio equipment according to the sampling rate transmitted by the first audio equipment, namely starts the resampling module of the later audio equipment to compress the audio data. Therefore, the first audio equipment and the later-stage audio equipment play at the same playing sampling rate as a target playing sampling rate, and the effect of synchronous playing is achieved.
After the playing synchronization is performed by adopting the above method, due to different attributes of the audio devices, the phenomenon of playing asynchronization may occur again due to different sources of the crystal, different sources of the clock, and the like. Therefore, the embodiment of the present application further provides the following synchronous playing method on the basis of the above playing synchronization method. The synchronized playback method provided below may be used in combination with the synchronized playback method shown in fig. 4A or fig. 4B, or may be used alone.
Fig. 5 shows a time slot flow of the method for adjusting the play sampling rate according to the embodiment of the present application. Fig. 5 describes the flow of adjusting the playback sampling rate for the execution entity by the post-stage audio device. The first audio equipment and the later-stage audio equipment are two different audio equipment respectively. The process shown in fig. 5 is applicable to various scenarios described above, for example, the first audio device receives audio data from an audio source and sends the audio data to the subsequent audio device via bluetooth, or the first audio device and the subsequent audio device respectively receive audio data sent by the audio source device via bluetooth.
As shown in fig. 5, the process may include:
at a preset time point, the later-stage audio device counts the audio data playing condition of the later-stage audio device (step 501a), and the first audio device counts the audio data playing condition of the first audio device and sends the statistical result to the later-stage audio device (step 501 b).
The statistical result of the audio data playing condition can be represented by the number of the played audio sampling points within a certain time length.
The latter audio device determines a playing sampling rate adjustment scheme according to the statistical result of the latter audio device and the statistical result of the first audio device (step 502).
The subsequent audio device adjusts the playback sample rate of the subsequent audio device according to the playback sample rate adjustment scheme (step 503). In another case, the playing sampling rates of the later-stage audio device and the first audio device both need to be adjusted, and the later-stage audio device may send the adjustment scheme to the first audio device, so that the first audio device adjusts the playing sampling rate according to the adjustment scheme.
For example, after the respective data playing conditions of the first audio device and the later audio device are respectively counted, for example, the number of the played audio sampling points in a certain time length of each audio device is compared, and the number of the sampling points of the later audio device is smaller than the number of the sampling points of the first audio device, then the comparison result shows that the first audio device and the later audio device are not synchronous, that is, the later audio device is slower than the first audio device. The later audio device adjusts the sampling rate of the device itself (the sampling rate is greater than the sampling rate of the first audio device) after calculation, and finally the number of the sampling points of the device itself at a certain time is consistent with that of the first audio device.
If the audio data of the later-stage audio device and the audio data of the first audio device are synchronously played after the adjustment of the playing sampling rate is performed, the adjusted playing sampling rate of the later-stage audio device and the adjusted playing sampling rate of the first audio device are adjusted back to the playing sampling rate at the preset time point (step 504). For example, if only the playing sampling rate of the audio device at the later stage is adjusted in step 503, the playing sampling rate can be recovered in step 504; if only the playing sampling rate of the first audio device is adjusted in step 503, the playing sampling rate of the first audio playing device may be recovered in step 504; if the playback sample rates of the later stage audio device and the first audio device are adjusted in step 403, the playback sample rates of the two audio devices may be restored in step 404.
The process shown in fig. 5 can be executed according to a set period, so as to maintain the playing synchronization between different audio devices.
The above flow is described with a post-stage audio device as an execution subject, and in another example, a device having a calculation processing capability and a wireless communication capability, such as a mobile phone, may be used as an execution subject to perform the play synchronization processing. If the mobile phone is taken as an execution subject, at a preset time point, the mobile phone adjusts the playing sampling rate of the later-stage audio equipment and/or the first audio equipment according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment. If the playing sampling rate of the later-stage audio equipment and/or the first audio equipment is adjusted according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment, and the audio data of the later-stage audio equipment and the audio data of the first audio equipment are synchronously played, the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the later-stage audio equipment and the first audio equipment is adjusted back to the playing sampling rate at the preset time point.
The first audio equipment and the later-stage audio equipment can send the audio data playing condition statistical result to the mobile phone. The handset may instruct the first audio device and/or the later audio device to perform an adjustment or restoration of the playback sample rate.
Based on the same technical concept, the embodiment of the present application further provides an audio playing synchronization apparatus, as shown in fig. 6, which can perform the above method embodiment. The device includes:
an obtaining module 601, configured to obtain a first receiving parameter and a later receiving parameter, where the first receiving parameter is obtained through statistics according to an audio data receiving condition of a first audio device, and the later receiving parameter is obtained through statistics according to an audio data receiving condition of a later audio device;
a determining module 602, configured to determine an adjustment scheme according to the first receiving parameter, the subsequent receiving parameter, and a preset threshold, where the adjustment scheme is used to adjust a playing sampling rate of the first audio device and/or the subsequent audio device.
The determining module 602 is specifically configured to: determining an adjusting scheme according to a comparison result of the first receiving parameter and the first preset threshold value and the post-stage receiving parameter; or
Determining an adjusting scheme according to a comparison result of the first receiving parameter and the first preset threshold and a comparison result of the later receiving parameter and the later preset threshold; or
And determining an adjusting scheme according to the comparison result of the rear-stage receiving parameter and the rear-stage preset threshold value and the first receiving parameter.
The device further comprises: an adjusting module 603, configured to adjust the playing sampling rate of the first audio device and/or the subsequent audio device according to the same resampling rate in the adjusting scheme.
The adjusting module 603 is further configured to: after the audio data to be played is sampled and played according to the adjusted playing sampling rate, executing the following steps:
at a preset time point, adjusting the playing sampling rate of the later-stage audio equipment and/or the first audio equipment according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment;
if the playing sampling rate of the later-stage audio equipment and/or the first audio equipment is adjusted according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment, and the audio data of the later-stage audio equipment and the audio data of the first audio equipment are synchronously played, the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the later-stage audio equipment and the first audio equipment is adjusted back to the playing sampling rate at the preset time point.
And the first audio equipment and/or the rear-stage audio equipment receive audio data through Bluetooth.
Based on the same technical concept, the embodiment of the present application further provides an audio playing synchronization apparatus, as shown in fig. 7, which can perform the above method embodiment. The device includes:
an obtaining module 701, configured to obtain a first receiving parameter, where the first receiving parameter is obtained according to statistics of an audio data receiving condition of a first audio device; wherein the first audio device is wirelessly connected with an audio source device, the first audio device receiving audio data from the audio source device.
A determining module 702, configured to determine an adjustment scheme according to the first receiving parameter and a preset threshold, where the adjustment scheme is used to adjust a playing sampling rate of the first audio device.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (12)

1. An audio playback synchronization method, comprising:
acquiring a first receiving parameter and a later receiving parameter, wherein the first receiving parameter is obtained by statistics according to the audio data receiving condition of first audio equipment, and the later receiving parameter is obtained by statistics according to the audio data receiving condition of later audio equipment; the first audio equipment is wirelessly connected with audio source equipment, and the post-stage audio equipment is wirelessly connected with the first audio equipment or the audio source equipment; the first receiving parameter and the later-stage receiving parameter are used for representing the relationship between the data volume of the received audio data and the time length for receiving the audio data of the data volume;
determining an adjustment scheme according to the first receiving parameter and a first preset threshold and/or the later receiving parameter and a later preset threshold, wherein the adjustment scheme is used for adjusting the playing sampling rate of the first audio equipment and/or the later audio equipment;
determining an adjustment scheme according to the first receiving parameter and a first preset threshold and/or the later receiving parameter and a later preset threshold, wherein the adjustment scheme is implemented by adopting one of the following methods:
and determining an adjustment scheme according to a comparison result of the first receiving parameter and the first preset threshold and a comparison result of the later-stage receiving parameter and the later-stage preset threshold, wherein the first audio device starts a self-resampling module to stretch or compress data to obtain a new playing sampling rate, the first audio device sends the adjustment scheme to the later-stage audio device so that the later-stage audio device processes the data in the same manner, or the later-stage audio device starts the self-resampling module to stretch or compress data to obtain a new playing sampling rate, and the later-stage audio device sends the adjustment scheme to the first audio device so that the first audio device processes the data in the same manner.
2. The method of claim 1, further comprising:
and adjusting the playing sampling rate of the first audio equipment and/or the later-stage audio equipment according to the same resampling rate in the adjusting scheme.
3. The method of any one of claims 1-2, further comprising:
at a preset time point, adjusting the playing sampling rate of the later-stage audio equipment and/or the first audio equipment according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment;
if the playing sampling rate of the later-stage audio equipment and/or the first audio equipment is adjusted according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment, and the audio data of the later-stage audio equipment and the audio data of the first audio equipment are synchronously played, the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the later-stage audio equipment and the first audio equipment is adjusted back to the playing sampling rate at the preset time point.
4. The method of claim 1, further comprising: determining initial synchronous playing time of the first audio equipment and the rear-stage audio equipment;
and the first audio equipment and the later-stage audio equipment start to play audio data at the initial synchronous playing time.
5. The method of claim 4, wherein the initial synchronized playback time is determined based on a first transmission delay and a second transmission delay between the first audio device and the later audio device; the first transmission delay is transmission delay of a synchronous signal, and the second transmission delay is transmission delay of audio data.
6. The method of any of claims 1, 2, 4, 5, wherein the first audio device and/or the later audio device receives audio data via Bluetooth.
7. An audio playback synchronization method, comprising:
acquiring a first receiving parameter, wherein the first receiving parameter is obtained by statistics according to the receiving condition of audio data of first audio equipment; wherein the first audio device is wirelessly connected with an audio source device, the first audio device receiving audio data from the audio source device; the first receiving parameter is used for representing the relationship between the data volume of the received audio data and the time length for receiving the audio data of the data volume;
determining an adjustment scheme according to the first receiving parameter and a preset threshold, wherein the adjustment scheme is used for adjusting the playing sampling rate of the first audio equipment;
the determining an adjustment scheme according to the first receiving parameter and a preset threshold includes: and determining an adjustment scheme according to a comparison result of the first receiving parameter and the preset threshold, wherein the first audio equipment starts a self-resampling module to stretch or compress data to obtain a new playing sampling rate.
8. An audio playback synchronization apparatus, comprising:
the acquisition module is used for acquiring a first receiving parameter and a later receiving parameter, wherein the first receiving parameter is obtained by statistics according to the audio data receiving condition of the first audio equipment, and the later receiving parameter is obtained by statistics according to the audio data receiving condition of the later audio equipment; the first receiving parameter and the later-stage receiving parameter are used for representing the relationship between the data volume of the received audio data and the time length for receiving the audio data of the data volume; the first audio equipment is wirelessly connected with audio source equipment, and the post-stage audio equipment is wirelessly connected with the first audio equipment or the audio source equipment;
a determining module, configured to determine an adjustment scheme according to the first receiving parameter and a first preset threshold and/or the subsequent receiving parameter and a subsequent preset threshold, where the adjustment scheme is used to adjust a playing sampling rate of the first audio device and/or the subsequent audio device;
the determining module is specifically configured to: and determining an adjustment scheme according to a comparison result of the first receiving parameter and the first preset threshold and a comparison result of the later-stage receiving parameter and the later-stage preset threshold, wherein the first audio device starts a self-resampling module to stretch or compress data to obtain a new playing sampling rate, the first audio device sends the adjustment scheme to the later-stage audio device so that the later-stage audio device processes the data in the same manner, or the later-stage audio device starts the self-resampling module to stretch or compress data to obtain a new playing sampling rate, and the later-stage audio device sends the adjustment scheme to the first audio device so that the first audio device processes the data in the same manner.
9. The apparatus of claim 8, further comprising:
and the adjusting module is used for adjusting the playing sampling rate of the first audio equipment and/or the later-stage audio equipment according to the same resampling rate in the adjusting scheme.
10. The apparatus of claim 9, wherein the adjustment module is further to: after the audio data to be played is sampled and played according to the adjusted playing sampling rate, executing the following steps:
at a preset time point, adjusting the playing sampling rate of the later-stage audio equipment and/or the first audio equipment according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment;
if the playing sampling rate of the later-stage audio equipment and/or the first audio equipment is adjusted according to the audio data playing condition statistical result of the later-stage audio equipment and the audio data playing condition statistical result of the first audio equipment, and the audio data of the later-stage audio equipment and the audio data of the first audio equipment are synchronously played, the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the later-stage audio equipment and the first audio equipment is adjusted back to the playing sampling rate at the preset time point.
11. An apparatus as claimed in any one of claims 8 to 9, wherein the first audio device and/or the later audio device receives audio data via bluetooth.
12. An audio playback synchronization apparatus, comprising:
the acquisition module is used for acquiring a first receiving parameter, and the first receiving parameter is obtained by statistics according to the audio data receiving condition of the first audio equipment; wherein the first audio device is wirelessly connected with an audio source device, the first audio device receiving audio data from the audio source device; the first receiving parameter is used for representing the relationship between the data volume of the received audio data and the time length for receiving the audio data of the data volume;
a determining module, configured to determine an adjustment scheme according to the first receiving parameter and a preset threshold, where the adjustment scheme is used to adjust a playing sampling rate of the first audio device;
the determining module is specifically configured to: and determining an adjustment scheme according to the comparison result of the first receiving parameter and the preset threshold, wherein the first audio equipment starts a self-resampling module to stretch or compress data to obtain a new playing sampling rate.
CN201710841085.XA 2017-09-18 2017-09-18 Audio playing synchronization method and device Active CN109521988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710841085.XA CN109521988B (en) 2017-09-18 2017-09-18 Audio playing synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710841085.XA CN109521988B (en) 2017-09-18 2017-09-18 Audio playing synchronization method and device

Publications (2)

Publication Number Publication Date
CN109521988A CN109521988A (en) 2019-03-26
CN109521988B true CN109521988B (en) 2022-04-15

Family

ID=65767739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710841085.XA Active CN109521988B (en) 2017-09-18 2017-09-18 Audio playing synchronization method and device

Country Status (1)

Country Link
CN (1) CN109521988B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636349B (en) * 2019-08-20 2022-01-18 恒玄科技(上海)股份有限公司 Audio synchronous playing method for wireless equipment
CN110708582B (en) * 2019-09-18 2022-01-18 深圳酷派技术有限公司 Synchronous playing method, device, electronic equipment and medium
CN112689109B (en) * 2019-10-17 2023-05-09 成都鼎桥通信技术有限公司 Audio processing method and device of recorder
CN112435678A (en) * 2020-11-17 2021-03-02 广州安凯微电子股份有限公司 Audio playing processing method
CN112631541A (en) * 2020-11-19 2021-04-09 楷知信息科技(上海)有限公司 Method and device for controlling synchronous playing of multiple playing devices, storage medium and control terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320843A (en) * 2014-10-08 2015-01-28 络达科技股份有限公司 Audio synchronization method for Bluetooth sounding devices
CN105448312A (en) * 2014-06-12 2016-03-30 华为技术有限公司 Audio synchronous play method, device and system
CN105812902A (en) * 2016-03-17 2016-07-27 联发科技(新加坡)私人有限公司 Data play method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072564B (en) * 2015-07-30 2019-04-02 Oppo广东移动通信有限公司 A kind of audio frequency playing method and device based on bluetooth connection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105448312A (en) * 2014-06-12 2016-03-30 华为技术有限公司 Audio synchronous play method, device and system
CN104320843A (en) * 2014-10-08 2015-01-28 络达科技股份有限公司 Audio synchronization method for Bluetooth sounding devices
CN105812902A (en) * 2016-03-17 2016-07-27 联发科技(新加坡)私人有限公司 Data play method, device and system

Also Published As

Publication number Publication date
CN109521988A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
CN109521988B (en) Audio playing synchronization method and device
US10809969B2 (en) Systems and methods for audio playback
JP7120997B2 (en) Multi-mode synchronous rendering of audio and video
CN111817811B (en) TWS earphone audio frequency synchronous playing method and system, TWS earphone
CN104320843B (en) Audio synchronization method of Bluetooth sound production device
CN108415685B (en) Wireless Bluetooth headsets realize the method being precisely played simultaneously
CN109525873B (en) Audio playing synchronization method and device
US20180336930A1 (en) Recorded data processing method, terminal device, and editing device
CN109168059B (en) Lip sound synchronization method for respectively playing audio and video on different devices
CN110636600B (en) Audio synchronous playing method for wireless equipment
CN110636349B (en) Audio synchronous playing method for wireless equipment
CN106454635B (en) Method and system for synchronizing data between multi-channel wireless sound boxes
US11089496B2 (en) Obtention of latency information in a wireless audio system
CN112416289B (en) Audio synchronization method, device, equipment and storage medium
EP3868043B1 (en) Wireless audio synchronization
CN109246664B (en) Voice test method and device
CN113613221A (en) TWS master device, TWS slave device, audio device and system
CN116033199A (en) Multi-device audio and video synchronization method and device, electronic device and storage medium
CN113613148B (en) Audio superposition control method and device, audio equipment and system
CN113613125A (en) Audio synchronization control method and device, audio equipment and system
CN103974020B (en) Audio, video data acquisition method and device
US11627546B2 (en) Delaying rendering time for audio computing systems
CN116709094A (en) Audio synchronous playing method, TWS earphone and synchronous playing system
CN113613124A (en) TWS master and slave device, audio device and system
CN116546251A (en) Audio/video synchronization method, device, electronic equipment, medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519085 High-tech Zone, Tangjiawan Town, Zhuhai City, Guangdong Province

Applicant after: ACTIONS TECHNOLOGY Co.,Ltd.

Address before: 519085 High-tech Zone, Tangjiawan Town, Zhuhai City, Guangdong Province

Applicant before: ACTIONS (ZHUHAI) TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant