CN117768993A - Audio synchronization method, audio playing system and storage medium - Google Patents

Audio synchronization method, audio playing system and storage medium Download PDF

Info

Publication number
CN117768993A
CN117768993A CN202311799490.1A CN202311799490A CN117768993A CN 117768993 A CN117768993 A CN 117768993A CN 202311799490 A CN202311799490 A CN 202311799490A CN 117768993 A CN117768993 A CN 117768993A
Authority
CN
China
Prior art keywords
audio
playing
terminal
delay
frame
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.)
Pending
Application number
CN202311799490.1A
Other languages
Chinese (zh)
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.)
Guangdong Baolun Electronics Co ltd
Original Assignee
Guangdong Baolun Electronics 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 Guangdong Baolun Electronics Co ltd filed Critical Guangdong Baolun Electronics Co ltd
Priority to CN202311799490.1A priority Critical patent/CN117768993A/en
Publication of CN117768993A publication Critical patent/CN117768993A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention discloses an audio synchronization method, an audio playing system and a storage medium, which are applied to the audio playing system, wherein the audio playing system comprises at least two audio terminals; the method comprises the following steps: responding to the operation of issuing the playing task to each audio terminal, obtaining the initial time of task starting, the total audio playing duration of the playing task and the playing audio, and calculating the delay data of each audio terminal; comparing delay data of all the audio terminals, and taking the audio terminal with the largest playing delay as a first audio terminal; calculating delay difference values of other audio terminals and the first audio terminal as delay sending duration of each audio terminal; according to the playing task information, calculating the audio time length of each frame of the playing task; according to the audio time length of each frame of the playing task and the time delay sending time length of each audio terminal, the preset frames of the playing audio are sent to the corresponding audio terminals to be played, so that the playing sound delay of the same audio played by the terminals with different execution rules is reduced.

Description

Audio synchronization method, audio playing system and storage medium
Technical Field
The present invention relates to the field of broadcasting technologies, and in particular, to an audio synchronization method, an audio playing system, and a storage medium.
Background
In the prior art, all terminals play the same audio in the same project, so that the situation that whether the difference and the delay of the sound exist can be generally realized; however, if terminals of other items/models are required to be accessed in the item, execution rules between different terminals are different, which may cause a problem of delay in playing sound when all terminals play the same audio.
Disclosure of Invention
The invention provides an audio synchronization method, an audio playing system and a storage medium, which are used for reducing the playing sound delay of playing the same audio by terminals with different execution rules.
The invention provides an audio synchronization method which is applied to an audio playing system, wherein the audio playing system comprises at least two audio terminals;
the method comprises the following steps:
responding to the operation of issuing the playing task to each audio terminal, obtaining the initial time of task starting, the total audio playing time length of the playing task and the playing audio according to the playing task information, and calculating the delay data of each audio terminal; comparing delay data of the audio terminals, and taking the audio terminal with the largest playing delay as a first audio terminal; calculating delay difference values of other audio terminals and the first audio terminal as delay sending duration of each audio terminal;
according to the playing task information, calculating the audio time length of each frame of the playing task; and according to the audio time length of each frame of the playing task and the time delay sending time length of each audio terminal, sending the preset frame of the playing audio to the corresponding audio terminal for playing.
Further, before calculating the delay data of each audio terminal according to the playing task information, the method further includes:
reading audio file information of a playing task, and obtaining audio data and audio formats of the playing task;
recording the initial time of starting the playing task as initial time, and recording the audio data, the audio format and the initial time in the playing task information.
Further, the calculating delay data of each audio terminal specifically includes:
according to the audio data and the audio format of the playing task, calculating the data size of each second of audio of the playing task;
obtaining the time delay required by each audio terminal according to the size of the audio buffer zone of each audio terminal and the data size of each second of audio of the playing task; the delay is the distance from the initial time to the playing time of each audio terminal;
the expression of the delay is:
wherein T is ms For the delay required by the second audio terminal, audbuf is the audio buffer size of the second audio terminal, mediaSize is the data size of audio per second of the playing task.
Further, the calculating the data size of the audio per second of the playing task specifically includes:
if the audio format of the play task is WAV, calculating the expression of the data size of each second of audio of the play task as follows:
wherein SampleRate is the sampling rate of the audio data, and BitDeep is the audio sampling precision of the audio data; numChannel is the audio channel of the audio data;
if the audio format of the play task is MP3 or AAC, the expression for calculating the data size of each second of audio of the play task is:
wherein BitRate is the bit rate of the audio data.
Further, the calculating the delay difference between the other audio terminals and the first audio terminal as the delay sending duration of each audio terminal specifically includes:
the expression of the delay sending duration of each audio terminal is as follows:
Delay i =T 1 -T i
Delay i for the delay transmission time length of the ith audio terminal, T 1 For the delay of the first audio terminal, T i Delay for the ith audio terminal;
further, according to the playing task information, calculating the audio duration of each frame of the playing task, specifically:
if the audio format of the play task is MP3 or AAC, the expression of the audio duration of each frame of the play task is:
if the audio format of the play task is WAV, the expression of the audio duration of each frame of the play task is:
where frame duration is the audio duration per frame, frame size is the audio size per frame, mediaSize is the data size of audio per second, bitRate is the bit rate of the play task.
Further, according to the audio duration of each frame of the playing task and the delay sending duration of each audio terminal, the preset frame of the playing audio is sent to the corresponding audio terminal for playing, specifically:
sequentially placing each frame of playing audio into a memory queue;
starting timing from the initial time, and sending playing audio frames to the first audio terminal frame by frame from the initial time; starting to send playing audio frames to the corresponding audio terminals frame by frame from the delay sending time of each audio terminal;
when the played duration of each audio terminal meets the preset condition, the next frame of played audio frame is obtained from the memory queue and is sent to the corresponding audio terminal, and the sent frame is removed from the memory queue.
Further, when the played duration of each audio terminal meets the preset condition, acquiring a next frame of played audio frame from the memory queue, sending the next frame of played audio frame to the corresponding audio terminal, and removing the sent frame from the memory queue, specifically:
if the current time is greater than the sum of the initial time, the played time length and the delay transmission time length of each audio terminal, transmitting the audio frame played by the next frame to the corresponding audio terminal, and removing the transmitted frame from the memory queue; the current time is counted from the initial time.
Because the audio has the factors of sampling rate, bit depth, sound channel, code rate and the like to influence the size of audio data of each frame, the data size difference of the audio data with the same duration can be very large, so if the audio buffer size difference exists between terminals, the aim of synchronously playing all the audio by adding fixed delay can not be achieved.
In the invention, the difference of the audio buffer size and the playing delay set in various terminals is considered, the corresponding processing time is calculated according to the terminal buffer and the playing delay rule when the audio stream is scheduled, the playing audio is respectively sent to the corresponding audio terminals for playing according to the corresponding processing time, so that the audio synchronous playing of various terminals is achieved, and the playing sound delay of the same audio played by the terminals with different execution rules is reduced.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Correspondingly, the invention also provides an audio playing system, which comprises: a control module and an audio terminal module; the audio terminal module comprises at least two audio terminals; the control module comprises a reading unit and a scheduling unit;
the reading unit is used for responding to the operation of issuing the playing task to each audio terminal, obtaining the initial time of task starting, the total audio playing duration of the playing task and the playing audio according to the playing task information, and calculating the delay data of each audio terminal; comparing delay data of the audio terminals, and taking the audio terminal with the largest playing delay as a first audio terminal; calculating delay difference values of other audio terminals and the first audio terminal as delay sending duration of each audio terminal;
the scheduling unit is used for calculating the audio time length of each frame of the playing task according to the playing task information; and according to the audio time length of each frame of the playing task and the time delay sending time length of each audio terminal, sending the preset frame of the playing audio to the corresponding audio terminal for playing.
Accordingly, the present invention also provides a computer-readable storage medium including a stored computer program; wherein the computer program, when run, controls a device in which the computer readable storage medium resides to perform an audio synchronization method as described in the present disclosure.
Drawings
FIG. 1 is a flow chart of an embodiment of an audio synchronization method provided by the present invention;
fig. 2 is a schematic structural diagram of an embodiment of an audio playing system according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Audio synchronization between audio terminals refers to maintaining the time consistency of audio playback between different terminal devices.
The factors that cause the difference in audio synchronicity between terminals can be divided into several aspects:
1. network delay: network delay is one of the most common influencing factors. During audio streaming, network delays may cause delays in the data packets, thereby affecting the synchronicity of the audio. Network delay is affected by network topology, bandwidth, network congestion, etc.
2. Network jitter: network jitter refers to instability of the data packets during transmission, which may lead to inconsistent arrival times of the audio data. Network jitter may be more pronounced, particularly in wireless networks or unstable network environments.
3. Clock drift: there may be minor drift in the clocks of the different devices, which can cause the clocks between the devices to be unsynchronized, thereby affecting audio synchronicity. The absence of a clock synchronization mechanism may result in a time offset.
4. Buffering and playback delay: audio buffering and playback delays on different terminal devices may be different, which may affect the synchronicity of the audio. The processing speed of the device, the buffering strategy and other factors can have an influence on the synchronism.
5. Codec delay: delays in the audio codec process may also lead to inconsistent audio playback times between different devices. The codec algorithms and hardware performance used on different devices may be different, possibly introducing additional delay.
6. Protocol and synchronization mechanism: the communication protocol and synchronization mechanism used may also have an impact on the audio synchronicity between the terminals. Some protocols and synchronization mechanisms may be more suitable for real-time audio synchronization.
The network delay, network jitter, clock drift, encoding and decoding delay and protocol mechanism are not in the processing range of the invention, and the invention only considers the mechanism for synchronously playing the audio which reaches various terminals by solving the difference of the audio buffer size and the playing delay which are set in various terminals;
because the audio has the factors of sampling rate, bit depth, sound channel, code rate and the like to influence the size of audio data of each frame, the audio data is also 10ms audio data, but the data size difference is very large, so if the audio buffer size difference exists between terminals, the aim of synchronously playing all the audio terminals can not be achieved simply by adding fixed delay.
Example 1
Referring to fig. 1, an audio synchronization method provided by an embodiment of the present invention is applied to an audio playing system, where the audio playing system includes at least two audio terminals; the method comprises the steps of S101-S103:
step S101: responding to the operation of issuing the playing task to each audio terminal, obtaining the initial time of task starting, the total audio playing time length of the playing task and the playing audio according to the playing task information, and calculating the delay data of each audio terminal;
further, before calculating the delay data of each audio terminal according to the playing task information, the method further includes:
reading audio file information of a playing task, and obtaining audio data and audio formats of the playing task;
recording the initial time of starting the playing task as initial time, and recording the audio data, the audio format and the initial time in the playing task information.
Further, the calculating delay data of each audio terminal specifically includes:
according to the audio data and the audio format of the playing task, calculating the data size of each second of audio of the playing task;
obtaining the time delay required by each audio terminal according to the size of the audio buffer zone of each audio terminal and the data size of each second of audio of the playing task; the delay is the distance from the initial time to the playing time of each audio terminal;
the expression of the delay is:
wherein T is ms For the delay required by the second audio terminal, audbuf is the audio buffer size of the second audio terminal, mediaSize is the data size of audio per second of the playing task.
Step S102: comparing delay data of the audio terminals, and taking the audio terminal with the largest playing delay as a first audio terminal; calculating delay difference values of other audio terminals and the first audio terminal as delay sending duration of each audio terminal;
step S103: according to the playing task information, calculating the audio time length of each frame of the playing task; and according to the audio time length of each frame of the playing task and the time delay sending time length of each audio terminal, sending the preset frame of the playing audio to the corresponding audio terminal for playing.
Further, the calculating the data size of the audio per second of the playing task specifically includes:
if the audio format of the play task is WAV, calculating the expression of the data size of each second of audio of the play task as follows:
wherein SampleRate is the sampling rate of the audio data, and BitDeep is the audio sampling precision of the audio data; numChannel is the audio channel of the audio data;
if the audio format of the play task is MP3 or AAC, the expression for calculating the data size of each second of audio of the play task is:
wherein BitRate is the bit rate of the audio data.
Further, the calculating the delay difference between the other audio terminals and the first audio terminal as the delay sending duration of each audio terminal specifically includes:
the expression of the delay sending duration of each audio terminal is as follows:
Delay i =T 1 -T i
Delay i for the delay transmission time length of the ith audio terminal, T 1 For the delay of the first audio terminal, T i Delay for the ith audio terminal;
further, according to the playing task information, calculating the audio duration of each frame of the playing task, specifically:
if the audio format of the play task is MP3 or AAC, the expression of the audio duration of each frame of the play task is:
if the audio format of the play task is WAV, the expression of the audio duration of each frame of the play task is:
where frame duration is the audio duration per frame, frame size is the audio size per frame, mediaSize is the data size of audio per second, bitRate is the bit rate of the play task.
Further, according to the audio duration of each frame of the playing task and the delay sending duration of each audio terminal, the preset frame of the playing audio is sent to the corresponding audio terminal for playing, specifically:
sequentially placing each frame of playing audio into a memory queue;
starting timing from the initial time, and sending playing audio frames to the first audio terminal frame by frame from the initial time; starting to send playing audio frames to the corresponding audio terminals frame by frame from the delay sending time of each audio terminal;
when the played duration of each audio terminal meets the preset condition, the next frame of played audio frame is obtained from the memory queue and is sent to the corresponding audio terminal, and the sent frame is removed from the memory queue.
Further, when the played duration of each audio terminal meets the preset condition, acquiring a next frame of played audio frame from the memory queue, sending the next frame of played audio frame to the corresponding audio terminal, and removing the sent frame from the memory queue, specifically:
if the current time is greater than the sum of the initial time, the played time length and the delay transmission time length of each audio terminal, transmitting the audio frame played by the next frame to the corresponding audio terminal, and removing the transmitted frame from the memory queue; the current time is counted from the initial time.
The embodiment provides a preferred implementation, three types of terminals, namely a terminal a, a terminal b and a terminal c, are selected, and a plurality of audio files are played; the audio files can be mp3 format audio files, and the code rates of the audio files with different mp3 formats are not necessarily the same; the audio file may also be a wav format audio file, and parameters such as sampling rate, channel and bit depth of different wav format audio files are not necessarily the same.
The method for starting the audio file frame reading thread by the control module of the audio playing system comprises the following steps:
reading the audio file information to obtain audio data and audio formats; recording the audio data and the audio format into task information, and recording the initial time TimeStarted of the task start into the task information.
The control module of the audio playing system starts an audio scheduling thread comprising:
acquiring task information, and calculating to obtain the delay T of each terminal according to the task information a 、T b And T c
Obtaining the maximum delay terminal T according to calculation b Terminating with maximum delayTerminal T b As an initial mark point, obtaining the time delay sending duration of the rest terminals:
Delay a =T b -T a
Delay b =T b -T b
Delay c =T b -T c
reading an audio frame pointer and storing the audio frame pointer into an audio queue buffer of each terminal; waiting for a sending thread to send to three types of terminals in a peak shifting mode according to the terminal delay;
if the audio file is MP3, calculating to obtain the audio playing time length of each frame:
if the audio file is WAV, calculating to obtain the audio playing time length of each frame:
current latest time TimeNow;
terminal played time TimePlayed a ,TimePlayed b ,TimePlayed c
if (TimeStarted+Delay+TimePlayed > TimeNow) indicates that a new frame needs to be issued to the terminal;
TimePlayed+=FrameDuraion;
the frames are sent to the terminal and the sent frames are removed from the audio queue buffer.
The implementation of the embodiment of the invention has the following effects:
the invention considers the difference of the audio buffer size and the playing delay which are set in various terminals, calculates corresponding processing time according to the terminal buffer and the playing delay rule when the audio stream is scheduled, and respectively sends the playing audio to the corresponding audio terminals for playing according to the corresponding processing time so as to achieve synchronous playing of the audio of various terminals, thereby reducing the playing sound delay of playing the same audio by the terminals with different execution rules.
Example two
Referring to fig. 2, an audio playing system provided in an embodiment of the present invention includes: a control module 201 and an audio terminal module 202; the audio terminal module comprises at least two audio terminals;
the control module comprises a reading unit and a scheduling unit;
the reading unit is used for responding to the operation of issuing the playing task to each audio terminal, obtaining the initial time of task starting, the total audio playing duration of the playing task and the playing audio according to the playing task information, and calculating the delay data of each audio terminal; comparing delay data of the audio terminals, and taking the audio terminal with the largest playing delay as a first audio terminal; calculating delay difference values of other audio terminals and the first audio terminal as delay sending duration of each audio terminal;
the scheduling unit is used for calculating the audio time length of each frame of the playing task according to the playing task information; and according to the audio time length of each frame of the playing task and the time delay sending time length of each audio terminal, sending the preset frame of the playing audio to the corresponding audio terminal for playing.
The above-described apparatus may implement the audio synchronization method of the above-described method embodiment. The options in the method embodiments described above are also applicable to this embodiment and will not be described in detail here. The rest of the embodiments of the present application may refer to the content of the method embodiments described above, and in this embodiment, no further description is given.
Example III
Correspondingly, the invention further provides a computer readable storage medium, which comprises a stored computer program, wherein the computer program is used for controlling a device where the computer readable storage medium is located to execute the audio synchronization method according to any one of the embodiments.
The computer program may be divided into one or more modules/units, which are stored in the memory and executed by the processor to accomplish the present invention, for example. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program in the terminal device.
The terminal equipment can be computing equipment such as a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The terminal device may include, but is not limited to, a processor, a memory.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is a control center of the terminal device, and which connects various parts of the entire terminal device using various interfaces and lines.
The memory may be used to store the computer program and/or the module, and the processor may implement various functions of the terminal device by running or executing the computer program and/or the module stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
Wherein the terminal device integrated modules/units may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as stand alone products. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.

Claims (10)

1. An audio synchronization method is characterized by being applied to an audio playing system, wherein the audio playing system comprises at least two audio terminals;
the method comprises the following steps:
responding to the operation of issuing the playing task to each audio terminal, obtaining the initial time of task starting, the total audio playing time length of the playing task and the playing audio according to the playing task information, and calculating the delay data of each audio terminal; comparing delay data of the audio terminals, and taking the audio terminal with the largest playing delay as a first audio terminal; calculating delay difference values of other audio terminals and the first audio terminal as delay sending duration of each audio terminal;
according to the playing task information, calculating the audio time length of each frame of the playing task; and according to the audio time length of each frame of the playing task and the time delay sending time length of each audio terminal, sending the preset frame of the playing audio to the corresponding audio terminal for playing.
2. The audio synchronization method of claim 1, wherein before calculating delay data of each of the audio terminals according to the play task information, further comprising:
reading audio file information of a playing task, and obtaining audio data and audio formats of the playing task;
recording the initial time of starting the playing task as initial time, and recording the audio data, the audio format and the initial time in the playing task information.
3. The audio synchronization method according to claim 2, wherein the calculating delay data of each audio terminal is specifically:
according to the audio data and the audio format of the playing task, calculating the data size of each second of audio of the playing task;
obtaining the time delay required by each audio terminal according to the size of the audio buffer zone of each audio terminal and the data size of each second of audio of the playing task; the delay is the distance from the initial time to the playing time of each audio terminal;
the expression of the delay is:
wherein T is ms For the second audio frequencyAnd the delay required by the terminal, audBuff is the audio buffer size of the second audio terminal, and MediaSize is the data size of audio per second of the playing task.
4. An audio synchronization method according to claim 3, wherein the calculating the data size of the audio per second of the playing task is:
if the audio format of the play task is WAV, calculating the expression of the data size of each second of audio of the play task as follows:
wherein SampleRate is the sampling rate of the audio data, and BitDeep is the audio sampling precision of the audio data; numChannel is the audio channel of the audio data;
if the audio format of the play task is MP3 or AAC, the expression for calculating the data size of each second of audio of the play task is:
wherein BitRate is the bit rate of the audio data.
5. The audio synchronization method of claim 1, wherein the calculating the delay difference between the other audio terminals and the first audio terminal as the delay transmission duration of each audio terminal specifically includes:
the expression of the delay sending duration of each audio terminal is as follows:
Delay i =T 1 -T i
Delay i for the delay transmission time length of the ith audio terminal, T 1 For the delay of the first audio terminal, T i Is the delay of the ith audio terminal.
6. The audio synchronization method according to claim 1, wherein the calculating the audio duration of each frame of the playing task according to the playing task information is specifically:
if the audio format of the play task is MP3 or AAC, the expression of the audio duration of each frame of the play task is:
if the audio format of the play task is WAV, the expression of the audio duration of each frame of the play task is:
where frame duration is the audio duration per frame, frame size is the audio size per frame, mediaSize is the data size of audio per second, bitRate is the bit rate of the play task.
7. The audio synchronization method as claimed in claim 6, wherein the sending the preset frame of the playing audio to the corresponding audio terminal for playing according to the audio duration of each frame of the playing task and the delay sending duration of each audio terminal is specifically as follows:
sequentially placing each frame of playing audio into a memory queue;
starting timing from the initial time, and sending playing audio frames to the first audio terminal frame by frame from the initial time; starting to send playing audio frames to the corresponding audio terminals frame by frame from the delay sending time of each audio terminal;
when the played duration of each audio terminal meets the preset condition, the next frame of played audio frame is obtained from the memory queue and is sent to the corresponding audio terminal, and the sent frame is removed from the memory queue.
8. The audio synchronization method of claim 7, wherein when the played duration of each audio terminal meets a preset condition, acquiring a next frame of played audio frame from the memory queue, sending the next frame of played audio frame to the corresponding audio terminal, and removing the sent frame from the memory queue, wherein the method specifically comprises:
if the current time is greater than the sum of the initial time, the played time length and the delay transmission time length of each audio terminal, transmitting the audio frame played by the next frame to the corresponding audio terminal, and removing the transmitted frame from the memory queue; the current time is counted from the initial time.
9. An audio playback system, comprising: a control module and an audio terminal module; the audio terminal module comprises at least two audio terminals; the control module comprises a reading unit and a scheduling unit;
the reading unit is used for responding to the operation of issuing the playing task to each audio terminal, obtaining the initial time of task starting, the total audio playing duration of the playing task and the playing audio according to the playing task information, and calculating the delay data of each audio terminal; comparing delay data of the audio terminals, and taking the audio terminal with the largest playing delay as a first audio terminal; calculating delay difference values of other audio terminals and the first audio terminal as delay sending duration of each audio terminal;
the scheduling unit is used for calculating the audio time length of each frame of the playing task according to the playing task information; and according to the audio time length of each frame of the playing task and the time delay sending time length of each audio terminal, sending the preset frame of the playing audio to the corresponding audio terminal for playing.
10. A computer readable storage medium, wherein the computer readable storage medium comprises a stored computer program; wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform an audio synchronization method according to any one of claims 1 to 8.
CN202311799490.1A 2023-12-25 2023-12-25 Audio synchronization method, audio playing system and storage medium Pending CN117768993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311799490.1A CN117768993A (en) 2023-12-25 2023-12-25 Audio synchronization method, audio playing system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311799490.1A CN117768993A (en) 2023-12-25 2023-12-25 Audio synchronization method, audio playing system and storage medium

Publications (1)

Publication Number Publication Date
CN117768993A true CN117768993A (en) 2024-03-26

Family

ID=90323382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311799490.1A Pending CN117768993A (en) 2023-12-25 2023-12-25 Audio synchronization method, audio playing system and storage medium

Country Status (1)

Country Link
CN (1) CN117768993A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016041445A1 (en) * 2014-09-18 2016-03-24 歌尔声学股份有限公司 Audio synchronous playing method, device and system
WO2017177524A1 (en) * 2016-04-11 2017-10-19 深圳Tcl新技术有限公司 Audio and video playing synchronization method and device
CN107734378A (en) * 2017-10-31 2018-02-23 维沃移动通信有限公司 A kind of audio and video synchronization method, device and mobile terminal
CN109327724A (en) * 2017-08-01 2019-02-12 成都鼎桥通信技术有限公司 Audio and video synchronization playing method and device
CN115484483A (en) * 2022-08-26 2022-12-16 广东万通信息科技有限公司 Streaming media audio and video synchronization method, terminal equipment, control device and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016041445A1 (en) * 2014-09-18 2016-03-24 歌尔声学股份有限公司 Audio synchronous playing method, device and system
WO2017177524A1 (en) * 2016-04-11 2017-10-19 深圳Tcl新技术有限公司 Audio and video playing synchronization method and device
CN109327724A (en) * 2017-08-01 2019-02-12 成都鼎桥通信技术有限公司 Audio and video synchronization playing method and device
CN107734378A (en) * 2017-10-31 2018-02-23 维沃移动通信有限公司 A kind of audio and video synchronization method, device and mobile terminal
CN115484483A (en) * 2022-08-26 2022-12-16 广东万通信息科技有限公司 Streaming media audio and video synchronization method, terminal equipment, control device and medium

Similar Documents

Publication Publication Date Title
CN108079578B (en) Code rate adjusting method and device based on cloud game and storage medium
CN111147907B (en) Method, device and system for synchronously playing multiple intelligent terminals and intelligent terminal
US8762580B2 (en) Common event-based multidevice media playback
JP6640359B2 (en) Wireless audio sync
US6594773B1 (en) Adaptive control of streaming data in a graph
CN107801080A (en) A kind of audio and video synchronization method, device and equipment
US9843489B2 (en) System and method for synchronous media rendering over wireless networks with wireless performance monitoring
US20100034212A1 (en) Methods and apparatus for providing modified timestamps in a communication system
CN111405336B (en) Multi-device synchronous playing method and system, electronic device and storage medium
US11336383B2 (en) Packet scheduling system with desired physical transmission time for packets
CN107277594A (en) A kind of video and audio and barrage synchronous method and device
WO2017107793A1 (en) Data processing method and device
EP2920953A1 (en) Common event-based multidevice media playback
CN113300797B (en) Multi-device self-adaptive audio synchronous playing method and processing terminal
CN103975569A (en) Method and apparatus for arbitration of time-sensitive data transmissions
WO2024087881A1 (en) Clock synchronization method and apparatus, system, device, and storage medium
CN113874850A (en) Synchronization of audio across multiple devices
CN108495177B (en) Audio frequency speed change processing method and device
CN117768993A (en) Audio synchronization method, audio playing system and storage medium
CN109427342A (en) For preventing the voice data processing apparatus and method of voice latency
CN115102931B (en) Method for adaptively adjusting audio delay and electronic equipment
CN111614428B (en) Method and device for improving synchronization precision among multiple clocks
CN114255788B (en) Asynchronous sampling conversion method and conversion device thereof
CN114866490B (en) Named data network congestion control method and terminal
WO2023273601A1 (en) Audio synchronization method, audio playback device, audio source, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination