CN109525873B - Audio playing synchronization method and device - Google Patents

Audio playing synchronization method and device Download PDF

Info

Publication number
CN109525873B
CN109525873B CN201710841152.8A CN201710841152A CN109525873B CN 109525873 B CN109525873 B CN 109525873B CN 201710841152 A CN201710841152 A CN 201710841152A CN 109525873 B CN109525873 B CN 109525873B
Authority
CN
China
Prior art keywords
audio
audio equipment
later
playing
stage
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
CN201710841152.8A
Other languages
Chinese (zh)
Other versions
CN109525873A (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 CN201710841152.8A priority Critical patent/CN109525873B/en
Publication of CN109525873A publication Critical patent/CN109525873A/en
Application granted granted Critical
Publication of CN109525873B publication Critical patent/CN109525873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4126The peripheral being portable, e.g. PDAs or mobile phones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video or multiplex stream to a specific local network, e.g. a IEEE 1394 or Bluetooth® network
    • H04N21/43637Adapting the video or multiplex stream to a specific local network, e.g. a IEEE 1394 or Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams

Abstract

The application discloses an audio playing synchronization method and device. In the application, at a preset time point, 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, the playing sampling rate of the later-stage audio equipment and/or the first audio equipment is adjusted; 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.

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:
and 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 executing the method, initial synchronous playing time of the first audio device and the later-stage 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 and apparatus, where the apparatus includes:
the acquisition module is used for acquiring 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 at a preset time point.
And the adjusting module is used for adjusting the playing sampling rate of the later-stage audio equipment and/or the first audio equipment at a preset time point 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 recovery module is used for adjusting the playing sampling rate of the rear-stage audio equipment and/or the first audio equipment after the audio data of the rear-stage audio equipment and the first audio equipment reach synchronous playing 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, and then adjusting the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the rear-stage audio equipment and the first audio equipment back to the playing sampling rate at the preset time point.
Optionally, the apparatus further includes a determining module, specifically configured to: and determining the initial synchronous playing time of the first audio equipment and the later audio equipment. 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.
Optionally, the first audio device and/or the later audio device receives audio data via bluetooth.
In the embodiment of the application, at a preset time point, 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, the playing sampling rate of the later-stage audio equipment and/or the first audio equipment is adjusted; and after the playing sampling rate is adjusted and the audio data of the rear-stage audio equipment and the first audio equipment are synchronously played, adjusting the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the rear-stage audio equipment and the first audio equipment back to the playing sampling rate at the preset time point. The synchronization of audio playing between the first audio equipment and the later-stage audio equipment can be ensured through the adjustment.
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 illustrating a third audio playing synchronization method 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;
fig. 8 is a schematic structural diagram of a third 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 following process shown in fig. 4A 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 that 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 following 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 that 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 process of adjusting the playing sampling rate for the execution main body by the later-stage audio device, so as to achieve the audio playing synchronization. The first audio equipment and the later-stage audio equipment are two different audio equipment respectively. The following process shown in fig. 5 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 that 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.
Based on the same technical concept, the embodiment of the present application further provides an audio playing synchronization apparatus, as shown in fig. 8, which can perform the above method embodiment. The device includes:
the obtaining module 801 is configured to obtain, at a preset time point, an audio data playing condition statistical result of a later-stage audio device and an audio data playing condition statistical result of a first audio device.
The adjusting module 802 is configured to adjust a playing sampling rate of the later-stage audio device and/or the first audio device at a preset time point according to an audio data playing condition statistical result of the later-stage audio device and an audio data playing condition statistical result of the first audio device.
A restoring module 803, configured to adjust the playing sampling rate of the later-stage audio device and/or the first audio device according to the audio data playing condition statistical result of the later-stage audio device and the audio data playing condition statistical result of the first audio device, and then adjust the playing sampling rate of the audio device with the adjusted playing sampling rate of the later-stage audio device and the first audio device back to the playing sampling rate at the preset time point when the audio data of the later-stage audio device and the audio data of the first audio device achieve synchronous playing.
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 (8)

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;
determining an adjustment scheme according to the first receiving parameter and a first preset threshold value and the later receiving parameter and a later preset threshold value to achieve initial synchronous playing, wherein the adjustment scheme is used for adjusting the playing sampling rates of the first audio equipment and the later audio equipment; the first audio equipment and the later-stage audio equipment obtain a new playing sampling rate by performing data stretching or data compression, and the later-stage audio equipment and the first audio equipment are adjusted according to the new playing sampling rate, wherein the new playing sampling rate is a target playing sampling rate;
at a preset time point, according to the number of the played audio sampling points of the rear-stage audio equipment and the number of the played audio sampling points of the first audio equipment, adjusting the playing sampling rate of the rear-stage audio equipment and/or the first audio equipment to enable the audio data of the rear-stage audio equipment and the first audio equipment to be synchronously played again;
after the synchronous playing is carried out again, the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the rear-stage audio equipment and the first audio equipment is adjusted back to the target playing sampling rate;
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.
2. 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.
3. The method of claim 2, 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 subsequent audio device; the first transmission delay is transmission delay of a synchronous signal, and the second transmission delay is transmission delay of audio data.
4. A method as recited in any of claims 1-3, wherein the first audio device and/or the later audio device receive audio data via bluetooth.
5. 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;
determining an adjustment scheme according to the first receiving parameter and a first preset threshold value and the later receiving parameter and a later preset threshold value, wherein the adjustment scheme is used for adjusting the playing sampling rates of the first audio equipment and the later audio equipment; the first audio equipment and the later-stage audio equipment obtain a new playing sampling rate by performing data stretching or data compression, and the later-stage audio equipment and the first audio equipment are adjusted according to the new playing sampling rate, wherein the new playing sampling rate is a target playing sampling rate;
the adjusting module adjusts the playing sampling rate of the rear-stage audio equipment and/or the first audio equipment according to the number of audio sampling points played by the rear-stage audio equipment and the number of audio sampling points played by the first audio equipment at a preset time point so that audio data of the rear-stage audio equipment and the first audio equipment can be synchronously played again;
the recovery module is used for adjusting the playing sampling rate of the audio equipment with the adjusted playing sampling rate in the rear-stage audio equipment and the first audio equipment back to the target playing sampling rate after the audio equipment is synchronously played again;
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.
6. The apparatus as recited in claim 5, further comprising a determination module, said determination module specifically configured to:
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.
7. The apparatus of claim 6, 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.
8. An apparatus as claimed in any one of claims 5 to 7, wherein the first audio device and/or the later audio device receives audio data via Bluetooth.
CN201710841152.8A 2017-09-18 2017-09-18 Audio playing synchronization method and device Active CN109525873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710841152.8A CN109525873B (en) 2017-09-18 2017-09-18 Audio playing synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710841152.8A CN109525873B (en) 2017-09-18 2017-09-18 Audio playing synchronization method and device

Publications (2)

Publication Number Publication Date
CN109525873A CN109525873A (en) 2019-03-26
CN109525873B true CN109525873B (en) 2022-03-15

Family

ID=65768083

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710841152.8A Active CN109525873B (en) 2017-09-18 2017-09-18 Audio playing synchronization method and device

Country Status (1)

Country Link
CN (1) CN109525873B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113012722B (en) 2019-12-19 2022-06-10 腾讯科技(深圳)有限公司 Sampling rate processing method, device, system, storage medium and computer equipment
CN112435678A (en) * 2020-11-17 2021-03-02 广州安凯微电子股份有限公司 Audio playing processing method
CN115223578B (en) * 2022-09-21 2023-07-14 浙江地芯引力科技有限公司 Audio signal synchronization method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104269182A (en) * 2014-09-18 2015-01-07 歌尔声学股份有限公司 Synchronized audio playing method, device and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1593272B1 (en) * 2003-02-14 2017-08-30 Thomson Licensing DTV Automatic synchronization of audio and video based media services of media content
CN104254007B (en) * 2014-09-03 2017-11-03 海信集团有限公司 A kind of audio-frequency processing method and device
WO2016119793A1 (en) * 2015-01-28 2016-08-04 Dynastrom Aps Synchronization in audio playback network independent of system clock
CN105812902B (en) * 2016-03-17 2018-09-04 联发科技(新加坡)私人有限公司 Method, equipment and the system of data playback
CN106373600B (en) * 2016-10-08 2018-03-02 广东欧珀移动通信有限公司 A kind of audio sync player method, device, system and terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104269182A (en) * 2014-09-18 2015-01-07 歌尔声学股份有限公司 Synchronized audio playing method, device and system

Also Published As

Publication number Publication date
CN109525873A (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
CN108415685B (en) Wireless Bluetooth headsets realize the method being precisely played simultaneously
CN111817811B (en) TWS earphone audio frequency synchronous playing method and system, TWS earphone
CN104320843B (en) Audio synchronization method of Bluetooth sound production device
CN109525873B (en) Audio playing synchronization method and device
CN105448312B (en) Audio sync playback method, apparatus and system
US20180336930A1 (en) Recorded data processing method, terminal device, and editing device
CN103581816A (en) Wireless multi-room music system synchronization mechanism based on UPnP protocol
CN109168059B (en) Lip sound synchronization method for respectively playing audio and video on different devices
CN110636600B (en) Audio synchronous playing method for wireless equipment
CN106454635B (en) Method and system for synchronizing data between multi-channel wireless sound boxes
EP3402220A1 (en) Obtention of latency information in a wireless audio system
CN109246664B (en) Voice test method and device
CN104954727A (en) Audio/video synchronization control device and method
EP3868043B1 (en) Wireless audio synchronization
CN103517044A (en) Video conference apparatus and lip synchronization method
CN113613221A (en) TWS master device, TWS slave device, audio device and system
CN106209343B (en) Synchronize the broadcasting of the digital signal sent to multiple movable audio frequency terminals
CN116033199A (en) Multi-device audio and video synchronization method and device, electronic device and storage medium
KR101946471B1 (en) Apparatus and method for synchronizing video and audio
CN105656804B (en) Message processing method and device
CN113613148B (en) Audio superposition control method and device, audio equipment and system
CN113613125A (en) Audio synchronization control method and device, audio equipment and system

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