WO2015000328A1 - 一种音频同步输出方法及系统 - Google Patents

一种音频同步输出方法及系统 Download PDF

Info

Publication number
WO2015000328A1
WO2015000328A1 PCT/CN2014/075796 CN2014075796W WO2015000328A1 WO 2015000328 A1 WO2015000328 A1 WO 2015000328A1 CN 2014075796 W CN2014075796 W CN 2014075796W WO 2015000328 A1 WO2015000328 A1 WO 2015000328A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
audio
synchronization
instruction
playback
Prior art date
Application number
PCT/CN2014/075796
Other languages
English (en)
French (fr)
Inventor
曾德钧
Original Assignee
Zeng Dejun
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 Zeng Dejun filed Critical Zeng Dejun
Publication of WO2015000328A1 publication Critical patent/WO2015000328A1/zh

Links

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/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/4305Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • 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/43615Interfacing a Home Network, e.g. for connecting the client to a plurality of peripherals
    • 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
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44231Monitoring of peripheral device or external card, e.g. to detect processing problems in a handheld device or the failure of an external recording device

Definitions

  • the present invention relates to audio synchronization technology, and more particularly to an audio synchronization output method and system.
  • the audio synchronous output needs to connect a plurality of different playing terminals by using an audio line, and the audio analog signals are synchronously transmitted to different playing terminals (for example, speakers) through the audio lines, and the playing terminal receiving the audio analog signals is synchronized.
  • Output audio since the analog signal is greatly affected by the transmission distance, the signal attenuation caused by the analog signal during the transmission process may cause the audio quality to decrease, and the data transmission through the longer audio line is also Installation and wiring has caused certain difficulties and increased the cost of the system. .
  • the audio file data is directly sent to multiple play terminals, but the transmitted audio file data may not reach each play at the same time due to its own characteristics of data transmission.
  • Terminals in addition, the master clocks of different playback terminals may also be out of sync, and the time errors caused by decoding operations of audio file data by different playback terminals are also different. The above factors cause the audio playback to be out of sync. .
  • It is an object of the invention to provide a The audio synchronous output method and system are designed to solve the problem of signal attenuation of the existing multi-channel synchronous output technology using audio line transmission, and the difficulty in installing and wiring the multi-play terminal system in use, and the audio file data is played differently.
  • the problem that the audio playback caused by the terminal decoding is not synchronized.
  • the invention solves the technical problem thereof, and adopts the technical means: providing an audio synchronization output method, comprising the following steps:
  • the control terminal selects one play terminal from all the play terminals in the local area network as the reference terminal, uses the clock of the reference terminal as the reference time, and sends a synchronization instruction to the reference terminal;
  • the reference terminal downloads audio information indicated by the synchronization instruction from a media server in the local area network, decodes the audio information to generate audio digital information, and sends a plurality of play terminals indicated by the synchronization instruction in the local area network. Transmitting a clock synchronization coordination instruction, the clock synchronization coordination instruction enabling the plurality of playback terminals to send a clock synchronization coordination instruction return value to the reference terminal, and synchronizing clocks of the plurality of playback terminals to the reference time;
  • the reference terminal sends the audio digital information to a playing terminal that feeds back a clock synchronization coordination command return value within a predetermined time to synchronously play the audio digital information on the playing terminal.
  • step S1 comprises the following sub-steps:
  • control terminal sends a request for acquiring status information to all playing terminals in the local area network, where the status information includes a network status and a signal strength;
  • the control terminal selects one play terminal as a reference terminal from all the play terminals in the local area network according to the status information returned by the play terminal, and uses the clock of the reference terminal as a reference time;
  • the control terminal sends a synchronization instruction to the reference terminal.
  • step S3 comprises the following sub-steps:
  • the reference terminal repeatedly sends the clock synchronization coordination instruction to the playing terminal that does not feed back the clock synchronization coordination instruction return value within a predetermined time, and receives a clock synchronization coordination instruction return value fed back by the playing terminal;
  • the reference terminal sends the audio digital information to all playing terminals that feed back the clock synchronization coordination command return value within a predetermined time to synchronously play the audio information on the playing terminal.
  • sub-step S32 includes the next sub-step:
  • the reference terminal marks the audio digital information with a time stamp
  • the reference terminal sends the audio digital information marked with the time stamp to all the playback terminals that feed back the return value of the clock synchronization coordination command within a predetermined time, and sends a data packet of a synchronization reference number size at a time on the playback terminal. Synchronize audio information.
  • step S3 further comprises the substeps:
  • the playback terminal that feeds back the clock synchronization coordination command return value within a predetermined time sets the data packet in the data receiving buffer area, and arranges the data packet according to the time stamp of the data packet;
  • the playback terminal that feeds back the clock synchronization coordination command return value within a predetermined time (130) According to the timestamp, it is judged whether the data packet arrives at the buffering time, and if so, it is played, if otherwise, the supplementary data packet processing is performed and the data packet arriving at the timeout is discarded.
  • the method further comprises the steps of:
  • the reference terminal sends the clock synchronization coordination instruction to the playing terminal that feeds back the clock synchronization coordination command return value within a predetermined time according to the network state at a certain time interval.
  • step S4 comprises the following sub-steps:
  • the reference terminal sends the clock synchronization coordination instruction to the playing terminal that feeds back the clock synchronization coordination command return value within a predetermined time at the first time interval;
  • the reference terminal and all the play terminals that feed back the clock synchronization coordination command return value within a predetermined time increase the data receiving buffer to the same size, and the reference terminal is specified at the second time interval.
  • the playing terminal that feeds back the clock synchronization coordination command return value sends the clock synchronization coordination command, and the first time interval is smaller than the second time interval.
  • An audio synchronization output system including a control terminal connected to a local area network, a media server, and a plurality of play terminals; wherein the control terminal is configured to select one play terminal as a reference terminal from all play terminals in the local area network, Using the clock of the reference terminal as a reference time, and sending a synchronization instruction to the reference terminal; the reference terminal is configured to download the audio information indicated by the synchronization instruction from the media server after receiving the synchronization instruction Decoding the audio information to generate audio digital information, and transmitting a clock synchronization coordination instruction to the plurality of playback terminals indicated by the synchronization instruction in the local area network, and receiving a clock synchronization coordination instruction return value fed back by each playback terminal, The audio digital information is sent to a playback terminal that feeds back a clock synchronization coordination command return value within a predetermined time to synchronously play the audio digital information on the playback terminal.
  • the media server comprises:
  • a first storage module configured to store an audio file
  • a media sharing module configured to manage an audio file stored by the first storage module, and share an audio file in a specified path of the first storage module to the local area network.
  • the playing terminal comprises:
  • a second control module configured to send a clock synchronization coordination instruction to the plurality of play terminals indicated by the synchronization instruction in the local area network when receiving the synchronization instruction; or, when receiving the synchronization coordination instruction, to The playback terminal that sends the synchronization coordination instruction feeds back the clock synchronization coordination instruction return value;
  • a decoding module configured to: when the second control module receives the synchronization instruction, download audio information from a path indicated by the synchronization instruction in the first storage module, and decode the audio information to generate audio digital information;
  • a clock synchronization module configured to: when the second control module receives the clock synchronization coordination instruction, synchronize a local clock with a clock of a playback terminal that sends the clock synchronization coordination instruction;
  • a timestamp marking module configured to: when receiving a clock synchronization coordination command return value fed back by the playing terminal within a predetermined time, send the audio digital signal to a time stamp and then send the feedback to the return value of the feedback clock synchronization coordination command within a predetermined time a terminal, and each time sending a data packet of a synchronization reference number size;
  • a data receiving buffer for receiving time-stamped data packets and buffering the data packets in order of time stamps
  • a playback module for playing packets arriving during the buffer time.
  • the audio synchronization output method and system of the present invention has the following beneficial effects: when the clock synchronization is used, the playback time error between the respective playback terminals is greatly reduced; and since the playback terminal device receives the hardware-recognizable audio digital
  • the signal reduces the time for decoding the source audio file data while ensuring the high quality of the audio; furthermore, the present invention is based on a local area network (wired or wireless) audio synchronous output method, which reduces the use of the audio data line and reduces the use.
  • the difficulty of wiring the multi-play terminal system increases the user experience and reduces system cost.
  • FIG. 1 is a schematic structural diagram of a first embodiment of an audio synchronization output system according to the present invention
  • FIG. 2 is a logic block diagram of a control terminal in the first embodiment of the audio synchronization output system of the present invention
  • FIG. 3 is a logic block diagram of a media server in a first embodiment of the audio synchronization output system of the present invention
  • FIG. 4 is a logic block diagram of a playback terminal in a first embodiment of the audio synchronization output system of the present invention
  • FIG. 5 is a schematic structural diagram of an example of an audio synchronization output system according to the present invention.
  • Figure 6 is a flow chart of the audio synchronous output system shown in Figure 5 for audio synchronization output
  • FIG. 7 is a flowchart of a first embodiment of an audio synchronization output method according to the present invention.
  • FIG. 8 is a flowchart of a second embodiment of an audio synchronization output method according to the present invention.
  • FIG. 1 is a schematic structural view of a first embodiment of an audio synchronous output system 100 of the present invention. As shown in FIG. 1, the system 100 of the present invention is shown in FIG.
  • the control terminal 110 connected to the local area network, the media server 120, and the plurality of playback terminals 130 are included.
  • the local area network can be a wired local area network or a wireless local area network.
  • the control terminal 110 is configured to select one of the play terminals 130 from all the play terminals 130 in the local area network.
  • the clock of the reference terminal is used as the reference time, and a synchronization command is transmitted to the reference terminal.
  • Audio information is indicated in the sync server in the media server 120 a storage path in the medium, and a plurality of playback terminals 130 that need to synchronously output audio information (e.g., the IP address of the playback terminal 130, or everything else can be used to point to the playback terminal 130) Information).
  • the reference terminal is for receiving from the media server 120 after receiving the synchronization command
  • the path indicated by the medium synchronization instruction downloads the audio information, decodes the audio information to generate the audio digital information, and sends a clock synchronization coordination command to the plurality of playback terminals 130 indicated by the synchronization instruction in the local area network, and receives each of the playback terminals.
  • the feedback clock synchronization coordination command returns a value, and the audio digital information is sent to the playback terminal 130 that feeds back the clock synchronization coordination command return value within a predetermined time.
  • the playing terminal 130 that receives the audio digital information synchronously plays the audio digital information.
  • the control terminal 110 includes a first control module 111.
  • the first control module 111 includes appropriate circuitry, logic, and / Or code for obtaining all devices in the local area network by using the search function, sending a request for obtaining status to the searched device, and receiving status information returned by each device, the status information includes network status, signal strength, and device information, and the device information includes the device.
  • First control module 111 The device is classified according to the module information contained in the device. For example, a device including a decoding module and a playback module can be used as a playback terminal, and a device including a media sharing module can be considered as a media server. For devices used as playback terminals, the status information returned will also include the playback status.
  • the first control module 111 selects one of the playback terminals 130 from all of the playback terminals 130 based on the network status and signal strength.
  • the reference terminal the clock of the reference terminal is used as the reference time, and a synchronization command is transmitted to the reference terminal.
  • the first control module 111 may preferentially select the playback terminal 130 whose network status is wired.
  • the network state of the cable-connected playback terminal 130 is generally superior to the wirelessly connected playback terminal 130, and the network state is also more stable.
  • the playback terminal 130 with the best signal strength is selected. As the reference terminal.
  • the playback terminal 130 having the best network state can be selected as the reference terminal, and if there are multiple playback terminals 130 in all the playback terminals 130 at the same time.
  • the network state is the best, and the signal with the strongest signal is selected from the best playing terminal 130 in the network state as the reference terminal.
  • the method of selecting the reference terminal may also be based on the closest playback terminal 130 to the other playback terminal 130 as the reference terminal.
  • control terminal 110 A media sharing module, a decoding module, a storage module, and a playback module may also be included (see FIG. 2, a dashed box portion).
  • First control module 111 It is used to control the media sharing module, the decoding module, the storage module and the playing module to complete the corresponding work.
  • the media sharing module is used to manage file resources stored in the storage module, for example, to save, delete, modify, and query file resources, and to share file resources in the specified path of the storage module to the local area network.
  • the decoding module is configured to receive data and decode the data.
  • the play module is used to play back the decoded data or the data stored in the storage module.
  • the media server 120 includes:
  • a first storage module 121 configured to store an audio file
  • the media sharing module 122 includes appropriate circuitry, logic, and/or code for managing the first storage module 121
  • the stored audio file and the audio file under the path specified by the first storage module 121 are shared to the local area network.
  • the playback terminal 130 includes:
  • the second control module 131 includes appropriate circuitry, logic, and/or code for controlling the playback terminal 130 Each of the modules performs a corresponding operation, and when receiving the synchronization instruction, synchronizes the plurality of playback terminals 130 indicated by the instruction to the local area network. Transmitting a clock synchronization coordination instruction, or feeding back a clock synchronization coordination instruction return value to the playback terminal 130 transmitting the synchronization coordination instruction when receiving the synchronization coordination instruction;
  • Decoding module 132 including appropriate circuitry, logic, and/or code for use in second control module 131 Receiving the synchronization instruction, downloading the audio information from the path indicated by the synchronization instruction in the first storage module 121, and decoding the audio information to generate the audio digital information;
  • a clock synchronization module 133 includes appropriate circuitry, logic, and/or code for use in the second control module 131 When receiving the clock synchronization coordination instruction, synchronizing the local clock with the clock of the playback terminal 130 that transmits the clock synchronization coordination command;
  • the timestamp tagging module 134 includes appropriate circuitry, logic, and/or code for receiving the playback terminal 130 within a specified time.
  • the feedback clock synchronization coordination instruction returns a value
  • the audio digital signal is time stamped and sent to the playback terminal 130 that feeds back the clock synchronization coordination command return value within a predetermined time. And each time a data packet of the synchronization reference size is sent;
  • a data receiving buffer 135, configured to receive the data packet marked with a timestamp, and cache the data packet in the order of the timestamp;
  • the playing module 136 is configured to play the data packet that arrives in the buffering time.
  • the playback terminal 130 as the reference terminal has its time stamping module 134
  • the audio digital signal is time stamped and sent to the playback terminal 130 that feeds back the clock synchronization coordination command return value within a predetermined time, and at the same time, its data receiving buffer 135 also receives its time stamping module.
  • 134 A time-stamped audio digital signal sent.
  • the playback terminal 130 may further include a storage module and a media sharing module (see Figure 4).
  • the portion indicated by the dashed box) is used to store various types of files of the playback terminal 130.
  • the media sharing module includes the appropriate circuitry, logic, and / Or code for managing files stored by the storage module and sharing files under the specified path of the storage module to the local area network.
  • FIG. 5 is a schematic structural diagram of an example of an audio synchronization output system 100 of the present invention, as shown in FIG. 5.
  • the control terminal 110 It can be a smartphone or a computer with control software installed.
  • the media server 120 is a computer with a lot of music files stored thereon.
  • Four playback terminals 130a-130d It can be four speakers (active speakers or passive speakers), and one or more of the 130a-130d can also have a storage function, including a storage module, for example, an SD card Card with some music files on it. Additionally, one or more of 130a-130d may also have a media sharing module.
  • Figure 6 is a flow chart of the system 100 for audio synchronization output shown in Figure 5, combined with Figure 5 and Figure 6, the workflow is:
  • the control terminal 110 selects the speaker with the best network state in the local area network (playing terminal 130d) as the reference terminal through the search function of the first control module; the user passes through the control terminal 110.
  • a synchronization command is issued to allow four speakers 130a-130d to simultaneously play an mp3 song on the computer (media server 120): x.mp3; playback terminal 130d (reference terminal) transmits a clock synchronization coordination command to the other three playback terminals (playing terminals 130a, 130b, 130c) for a predetermined time (for example, 50) Command feedback (clock synchronization coordination command return value) of the three playback terminals 130a, 130b, 130c are obtained in milliseconds, respectively, and the three playback terminals 130a, 130b, 130c is identified as 'audio synchronizable output device', and the three playback terminals 130a, 130b, 130c will synchronize the clock with the reference terminal 130d; the playback terminal 130d (reference terminal) starts downloading x.mp3 from the computer (media server 120), starts decoding at the same time, and marks the decoded digital signal with a timestamp, and sends it to the playing terminal 130a, 130b, 130c as
  • the playback terminal 130d (reference terminal) starts the clock synchronization correction mechanism while transmitting the audio data packet, and judges the playback terminals 130a, 130b, 130c according to the data feedback during the data packet transmission process.
  • Network status if the network status is good, then to the playback terminal 130a, 130b, 130c for 10 seconds (the first time interval, which can be customized, here by way of example)
  • the clock synchronization coordination command is sent, and the playback terminals 130a, 130b, and 130c can perform a synchronization correction soon, thereby making the audio synchronization output more accurate.
  • 1 Minutes second time interval, customizable, here for example
  • the clock synchronization coordination command is sent, and all the playback terminals 130a-130d are sent after the current audio data packet is transmitted and before the next audio data packet is transmitted.
  • the buffer area is uniformly increased to the same size, thereby reducing the current network load and saving the network transmission traffic.
  • the playback terminals 130a-130d start simultaneous playback.
  • FIG. 7 is a flow chart of a first embodiment of an audio synchronization output method according to the present invention, as shown in FIG. 7 As shown, in the present embodiment, the method of the present invention includes the following steps:
  • the control terminal 110 selects a play terminal 130 from all the play terminals 130 in the local area network.
  • a reference terminal the clock of the reference terminal is used as a reference time, and a synchronization command is sent to the reference terminal;
  • the reference terminal from the media server in the local area network 120 Downloading the audio information indicated by the synchronization instruction, decoding the audio information to generate audio digital information, and synchronizing the plurality of playback terminals 130 indicated by the instruction to the local area network
  • Sending a clock synchronization coordination command, the clock synchronization coordination command enables the plurality of playback terminals 130 to send a clock synchronization coordination command return value to the reference terminal, and synchronize the clocks of the plurality of playback terminals 130 to the reference time;
  • the reference terminal sends the audio digital information to the playing terminal 130 that feeds back the clock synchronization coordination command return value within a predetermined time. To play the audio digital information synchronously on the playback terminal 130.
  • step S1 includes the following sub-steps: S11.
  • the control terminal 110 according to the status information returned by the playing terminal 130, from all the playing terminals 130 in the local area network.
  • One of the playback terminals 130 is selected as the reference terminal, and the clock of the reference terminal is used as the reference time.
  • the control terminal 110 transmits a synchronization command to the reference terminal.
  • step S11 the control terminal 110 is controlled.
  • the search function is used to obtain all the devices in the local area network, send the request for obtaining the status to the searched device, and receive the status information returned by each device.
  • the status information includes the network status, the signal strength, and the device information, and the device information includes the module information included in the device. .
  • Control terminal 110 The device is classified according to the module information contained in the device. For example, a device including a decoding module and a playback module can be used as a playback terminal, and a device including a media sharing module can be considered as a media server. For devices used as playback terminals, the status information returned will also include the playback status.
  • step S12 the control terminal 110 selects one of the playback terminals from all of the playback terminals 130 based on the network status and signal strength.
  • 130 As the reference terminal, the clock of the reference terminal is used as the reference time, and a synchronization command is transmitted to the reference terminal.
  • the first control module 111 may preferentially select the playback terminal 130 whose network status is wired.
  • the network state of the cable-connected playback terminal 130 is generally superior to the wirelessly connected playback terminal 130, and the network state is also more stable.
  • the playback terminal 130 with the best signal strength is selected. As the reference terminal.
  • the playback terminal 130 having the best network state can be selected as the reference terminal, and if there are multiple playback terminals 130 in all the playback terminals 130 at the same time.
  • the network state is the best, and the signal with the strongest signal is selected from the best playing terminal 130 in the network state as the reference terminal.
  • the method of selecting the reference terminal may also be based on the closest playback terminal 130 to the other playback terminal 130 as the reference terminal.
  • the reference terminal receives the synchronization command from the media server 120.
  • the specific path downloads the audio information, and decodes the audio information, thereby generating the audio digital information, and at the same time, the reference terminal also synchronizes the plurality of playback terminals 130 indicated by the instruction.
  • the clock synchronization coordination command has two purposes: first, the clock synchronization coordination command causes the playback terminal 130 to be transmitted to the playback terminal 130. A clock synchronization coordination command return value is fed back; second, the playback terminal 130 synchronizes the local clock with the reference time using the clock information parameter carried in the clock synchronization output command.
  • step S3 if the reference terminal receives the playback terminal 130 within a predetermined time.
  • the feedback clock synchronization coordination instruction returns a value, and the playing terminal is determined to be 'audio synchronizable output device', and those playing terminals that fail to feed back the clock synchronization coordination command return value within a predetermined time are determined. (can be timed back or not returned) is identified as 'devices that cannot be output synchronously'.
  • the specified time is generally set to within 50 milliseconds, this condition can be fine-tuned, but will be controlled at 100 Within milliseconds, because the general sound delay is 100 Within milliseconds, the human ear cannot distinguish whether the sound is synchronized, otherwise it will obviously hear the sounds out of sync, forming an overlapping sound.
  • the reference terminal may return to the failed playback terminal 130 in consideration of the dynamic change of the network status.
  • the clock synchronization coordination command is repeatedly transmitted a plurality of times. If the clock synchronization coordination command return value is received within a predetermined time within a predetermined number of times, the playback terminal 130 that has previously failed to return is considered to be 'a device that can be output synchronously by audio'. .
  • the reference terminal marks the audio digital information with a time stamp and sends it to the plurality of 'audio synchronizable output devices' indicated by the synchronization instruction.
  • the synchronization reference number is a synchronization data packet calculated in units of bytes according to the parameters of the played audio information, and the parameters of the played audio information include a sampling rate, a quantization precision, and a playback time length. 1024
  • As a data packet it can guarantee that the data packet is not split under the default setting of the wireless network (this unit can be adjusted according to the wireless setting parameters), which is beneficial to improve the transmission efficiency when transmitting data packets by using the wireless network.
  • step S3 'Audio can synchronously output the device'
  • the data packet After receiving the data packet marked with a timestamp, the data packet is placed in the data receiving buffer area and arranged in the order of the timestamp. Thanks to these 'audio syncable devices'
  • the clock has been adjusted to synchronize with the reference time by the clock synchronization coordination command, so the 'timestamp + buffer time' in the buffer area is not less than 'local clock time'.
  • the data packets (that is, the packets arriving during the buffer time) form an audio sync output (playback) that cannot be distinguished by the human ear.
  • FIG. 8 The flowchart of the second embodiment of the audio synchronization output method of the present invention is different from the first embodiment of the method of the present invention in that the method of the present invention further includes the following steps:
  • the reference terminal feeds back the return value of the return value within a predetermined time according to the network status at a certain time interval.
  • Send clock synchronization coordination instructions .
  • the reference terminal starts the clock synchronization correction mechanism while transmitting the data packet, that is, the data packet is sent according to the feedback of the data packet, and each The network status of the 'audio synchronizable output device'. If the network status is higher than or equal to a threshold, indicating that the network status is good at this time, the device can be synchronized to the audio output at the first time interval (short time interval). ' Send clock synchronization coordination instructions, each 'audio can be synchronized output device' A sync correction can be performed very quickly, which makes the audio sync output more accurate. If the network status is lower than the threshold, it indicates that the network status is not good at this time.
  • the buffer area of the 'Audio synchronizable output device' is uniformly increased to the same size, while the reference terminal is at the second time interval (longer time interval) to the 'Audio synchronizable output device'
  • the clock synchronization coordination command is sent, thereby reducing the current network load and saving the network transmission traffic.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Automation & Control Theory (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明公开了一种音频同步输出方法和系统,系统包括连入局域网的控制终端、媒体服务器和多个播放终端,方法包括:S1、控制终端从局域网中选择一个播放终端作为基准终端,并向基准终端发送同步指令;S2、基准终端从媒体服务器下载指定的音频信息,解码音频信息以生成音频数字信息,并向指定的多个播放终端发送时钟同步协调指令,时钟同步协调指令使能多个播放终端向基准终端发送时钟同步协调指令返回值,并将时钟同步为基准时间;S3、基准终端将音频数字信息发送到在规定时间内反馈时钟同步协调指令返回值的播放终端,以在播放终端上同步播放音频数字信息。降低了各个播放终端之间的播放时间误差,保证了音频的质量。

Description

一种音频同步输出方法及系统 技术领域
本发明涉及音频同步技术,更具体地说,涉及一种音频同步输出方法及系统。
背景技术
现有技术中,音频同步输出需要用音频线将多个不同的播放终端连接起来,音频模拟信号通过音频线同步传输到不同的播放终端(例如,音箱),接收到音频模拟信号的播放终端同步输出音频。在这种音频同步输出方法中,由于模拟信号受传输距离影响较大,模拟信号在传输过程中造成的信号衰减会导致音频质量的下降,另外,通过较长的音频线进行数据传输,也对安装布线造成了一定的难度,且提高了系统的成本 。
为了解决安装布线复杂以及系统成本高的问题,现有技术中,直接将音频文件数据发送到多个播放终端,但是发送的音频文件数据由于其数据传输的自身特性有可能不会同时到达各播放终端,另外,不同播放终端的主时钟也可能不同步,并且,不同播放终端对音频文件数据解码运算所造成的时间误差也不同,综合上述诸因素造成了音频播放的不同步 。
发明内容
本发明的目的在于提供一种 音频同步输出方法和系统,旨在解决现有使用音频线传输多声道同步输出技术的信号衰减问题,以及多播放终端系统在使用时的安装布线难度高的问题,以及音频文件数据在不同播放终端解码时造成的音频播放不同步的问题。
本发明解决其技术问题,采用的技术手段是:提供一种音频同步输出方法,包括以下步骤:
S1 、控制终端从局域网内的所有播放终端中选择一个播放终端作为基准终端,将所述基准终端的时钟作为基准时间,并向所述基准终端发送同步指令;
S2 、所述基准终端从所述局域网中的媒体服务器下载所述同步指令指示的音频信息,解码所述音频信息以生成音频数字信息,并向所述局域网中所述同步指令指示的多个播放终端发送时钟同步协调指令,所述时钟同步协调指令使能所述多个播放终端向所述基准终端发送时钟同步协调指令返回值,并将所述多个播放终端的时钟同步为所述基准时间;
S3 、所述基准终端将所述音频数字信息发送到在规定时间内反馈时钟同步协调指令返回值的播放终端,以在播放终端上同步播放所述音频数字信息。
优选地,步骤 S1 包括以下子步骤:
S11 、所述控制终端向所述局域网内的所有播放终端发送获取状态信息的请求,所述状态信息包括网络状态和信号强度;
S12 、所述控制终端根据播放终端返回的状态信息,从所述局域网内的所有播放终端中选择一个播放终端作为基准终端,将所述基准终端的时钟作为基准时间;
S13 、所述控制终端向所述基准终端发送同步指令。
优选地,步骤 S3 包括以下子步骤:
S31 、所述基准终端向未在规定时间内反馈时钟同步协调指令返回值的播放终端重复发送所述时钟同步协调指令,并接收播放终端反馈的时钟同步协调指令返回值;
S32 、所述基准终端将所述音频数字信息发送到所有在规定时间内反馈时钟同步协调指令返回值的播放终端,以在播放终端上同步播放音频信息。
优选地,子步骤 S32 包括下一级子步骤:
S321 、所述基准终端将所述音频数字信息标记上时间戳;
S322 、所述基准终端将标记上时间戳的音频数字信息发送到所有在规定时间内反馈时钟同步协调指令返回值的播放终端,且每次发送一个同步基准数大小的数据包,以在播放终端上同步播放音频信息。
优选地,步骤 S3 还包括子步骤:
S33 、在规定时间内反馈时钟同步协调指令返回值的播放终端将数据包放在数据接收缓存区内,并按照数据包的时间戳的顺序排列数据包;
S34 、在规定时间内反馈时钟同步协调指令返回值的播放终端( 130 )根据时间戳判断数据包是否在缓冲时间到达,若是则播放,若否则进行补数据包处理并丢弃超时到达的数据包。
优选地,所述方法还包括步骤:
S4 、所述基准终端根据网络状态,以一定的时间间隔向在规定时间内反馈时钟同步协调指令返回值的播放终端发送所述时钟同步协调指令。
优选地,步骤 S4 包括以下子步骤:
S41 、若网络状态高于或等于一阈值,所述基准终端则以第一时间间隔向在规定时间内反馈时钟同步协调指令返回值的播放终端发送所述时钟同步协调指令;
S42 、若网络状态低于所述阈值,基准终端以及所有在规定时间内反馈时钟同步协调指令返回值的播放终端增加数据接收缓存区到同一大小,且所述基准终端以第二时间间隔向在规定时间内反馈时钟同步协调指令返回值的播放终端发送所述时钟同步协调指令,所述第一时间间隔小于所述第二时间间隔。
提供一种音频同步输出系统,包括连入局域网的控制终端、媒体服务器以及多个播放终端;其中,所述控制终端用于从所述局域网内的所有播放终端中选择一个播放终端作为基准终端,将所述基准终端的时钟作为基准时间,并向所述基准终端发送同步指令;所述基准终端用于在接收到所述同步指令后,从所述媒体服务器下载所述同步指令指示的音频信息,解码所述音频信息以生成音频数字信息,以及向所述局域网中所述同步指令指示的多个播放终端发送时钟同步协调指令,并接收各播放终端反馈的时钟同步协调指令返回值,将所述音频数字信息发送到在规定时间内反馈时钟同步协调指令返回值的播放终端,以在播放终端上同步播放所述音频数字信息。
优选地,所述媒体服务器包括:
第一存储模块,用于存储音频文件;
媒体共享模块,用于管理所述第一存储模块存储的音频文件、以及将所述第一存储模块指定路径下的音频文件共享到所述局域网。
优选地,所述播放终端包括:
第二控制模块,用于在接收到所述同步指令时,向所述局域网中所述同步指令指示的多个播放终端发送时钟同步协调指令;或者,在接收到所述同步协调指令时,向发送该同步协调指令的播放终端反馈时钟同步协调指令返回值;
解码模块,用于在所述第二控制模块接收到所述同步指令时,从所述第一存储模块中所述同步指令指示的路径下载音频信息,解码所述音频信息以生成音频数字信息;
时钟同步模块,用于在所述第二控制模块接收到所述时钟同步协调指令时,将本地时钟与发送该时钟同步协调指令的播放终端的时钟同步;
时间戳标记模块,用于在规定时间内接收到播放终端反馈的时钟同步协调指令返回值时,将所述音频数字信号标记时间戳后发送到在规定时间内反馈时钟同步协调指令返回值的播放终端,且每次发送一个同步基准数大小的数据包;
数据接收缓存区,用于接收标记有时间戳的数据包,并按照时间戳的顺序缓存数据包;
播放模块,用于播放在缓冲时间内到达的数据包。
本发明的音频同步输出方法和系统具有以下有益效果:通过时钟同步对时,极大的降低了各个播放终端之间的播放时间误差;又由于播放终端设备收到的是硬件可识别的音频数字信号,减少了对源音频文件数据解码的时间,同时保证了音频的高质量;再者,本发明是基于局域网(有线或者无线)的音频同步输出方法,减少了音频数据线的使用,降低了多播放终端系统的布线难度,从而提高了用户体验,并且降低了系统成本。
附图说明
图 1 为本发明的音频同步输出系统第一实施例的结构示意图;
图 2 为本发明的音频同步输出系统第一实施例中控制终端的逻辑框图;
图 3 为本发明的音频同步输出系统第一实施例中媒体服务器的逻辑框图;
图 4 为本发明的音频同步输出系统第一实施例中播放终端的逻辑框图;
图 5 为本发明的音频同步输出系统一示例的结构示意图;
图 6 为图 5 所示的音频同步输出系统实现音频同步输出的流程图;
图 7 为本发明的音频同步输出方法第一实施例的流程图;
图 8 为本发明的音频同步输出方法第二实施例的流程图。
具体实施方式
以下结合附图和实施例对本发明做进一步的解释说明。
图 1 为本发明的音频同步输出系统 100 第一实施例 的结构示意图,如图 1 所示,本发明的系统 100 包括连入局域网的控制终端 110 、媒体服务器 120 以及多个播放终端 130 。局域网可以是有线局域网,也可以是无线局域网。
其中,控制终端 110 用于从局域网内的所有播放终端 130 中选择一个播放终端 130 作为基准终端,将基准终端的时钟作为基准时间,并向基准终端发送同步指令。同步指令中指示了音频信息在媒体服务器 120 中的存储路径,以及需要同步输出音频信息的多个播放终端 130 (例如,播放终端 130 的 IP 地址,或者其他一切可用于指向播放终端 130 的信息)。
基准终端用于在接收到同步指令后,从媒体服务器 120 中同步指令指示的路径下载音频信息,解码音频信息以生成音频数字信息,以及向局域网中同步指令指示的多个播放终端 130 发送时钟同步协调指令,并接收各播放终端 130 反馈的时钟同步协调指令返回值,将音频数字信息发送到在规定时间内反馈时钟同步协调指令返回值的播放终端 130 。
接收到音频数字信息的播放终端 130 ,同步播放音频数字信息。
参见图 1-4 ,在本发明的系统 100 第一实施例中,控制终端 110 包括第一控制模块 111 。第一控制模块 111 包括适当的电路、逻辑和 / 或代码,用于使用搜索功能获得局域网内所有设备,向搜索到的设备发送获取状态的请求,并接收各设备返回的状态信息,状态信息包括网络状态、信号强度和设备信息,设备信息包括设备所含的模块信息。第一控制模块 111 根据设备所含的模块信息,将设备进行分类,例如,包含解码模块、播放模块的设备可以作为播放终端使用,包含媒体共享模块的设备就认为该设备可作为媒体服务器使用。对于作为播放终端使用的设备,返回的状态信息中还会包含播放状态。
第一控制模块 111 根据网络状态和信号强度从所有播放终端 130 中选择一个播放终端 130 作为基准终端,基准终端的时钟作为基准时间,并向基准终端发送同步指令。第一控制模块 111 可以优先选择网络状态为有线连接的播放终端 130 作为基准终端,有线连接的播放终端 130 的网络状态一般而言要优于无线连接的播放终端 130 ,且网络状态也更稳定,其次,再选择信号强度最好的播放终端 130 为基准终端。也就是说,本发明中,可以选择网络状态最好的播放终端 130 为基准终端,若在所有播放终端 130 中,同时有多个播放终端 130 的网络状态最好,则从网络状态最好的播放终端 130 中选择信号最强的为基准终端。本发明中,不限于从所有播放终端 130 中选择基准终端的方法,例如,还可以基于到其他播放终端 130 距离最近的一播放终端 130 为基准终端。
在本发明的系统 100 的其他实施例中,控制终端 110 还可以包括媒体共享模块、解码模块、存储模块和播放模块(参见图 2 ,虚线框部分)。第一控制模块 111 用于控制媒体共享模块、解码模块、存储模块和播放模块完成相应的工作。媒体共享模块用于管理存储模块中存储的文件资源,例如,对文件资源的保存、删除、修改和查询,还用于将存储模块指定路径下的文件资源共享到局域网。解码模块用于接收数据,并对数据进行解码。播放模块用于对解码后的数据,或者存储模块中存储的数据进行播放。
在本发明的系统 100 第一实施例中,媒体服务器 120 包括:
第一存储模块 121 ,用于存储音频文件;
媒体共享模块 122 ,包括适当的电路、逻辑和 / 或代码,用于管理第一存储模块 121 存储的音频文件、以及将第一存储模块 121 指定路径下的音频文件共享到局域网。
在本发明的系统 100 第一实施例中,播放终端 130 包括:
第二控制模块 131 ,包括适当的电路、逻辑和 / 或代码,用于控制播放终端 130 中的各模块进行相应的工作,其在接收到同步指令时,向局域网中同步指令指示的多个播放终端 130 发送时钟同步协调指令,或者,在接收到同步协调指令时,向发送该同步协调指令的播放终端 130 反馈时钟同步协调指令返回值;
解码模块 132 ,包括适当的电路、逻辑和 / 或代码,用于在第二控制模块 131 接收到同步指令时,从第一存储模块 121 中同步指令指示的路径下载音频信息,解码音频信息以生成音频数字信息;
时钟同步模块 133 ,包括适当的电路、逻辑和 / 或代码,用于在第二控制模块 131 接收到时钟同步协调指令时,将本地时钟与发送该时钟同步协调指令的播放终端 130 的时钟同步;
时间戳标记模块 134 ,包括适当的电路、逻辑和 / 或代码,用于在规定时间内接收到播放终端 130 反馈的时钟同步协调指令返回值时,将所述音频数字信号标记时间戳后发送到在规定时间内反馈时钟同步协调指令返回值的播放终端 130 ,且每次发送一个同步基准数大小的数据包;
数据接收缓存区 135 ,用于接收标记有时间戳的数据包,并按照时间戳的顺序缓存数据包;
播放模块 136 ,用于播放在缓冲时间内到达的数据包。
在该实施例中,作为基准终端的播放终端 130 ,其时间戳标记模块 134 将所述音频数字信号标记时间戳后发送到在规定时间内反馈时钟同步协调指令返回值的播放终端 130 ,同时,其数据接收缓存区 135 也接收 其时间戳标记模块 134 发送的标记了时间戳的音频数字信号。这样,基准终端以及所有在 在规定时间内反馈时钟同步协调指令返回值的播放终端 130 将同步输出音频信息。
在本发明的系统 100 的其他实施例中,播放终端 130 还可以包括存储模块和媒体共享模块(参见图 4 ,虚线框所示部分),存储模块用于存储播放终端 130 的各类文件。媒体共享模块包括适当的电路、逻辑和 / 或代码,用于管理存储模块存储的文件、以及将存储模块指定路径下的文件共享到局域网。
图 5 为本发明的音频同步输出系统 100 一示例的结构示意图,如图 5 所示,在该局域网内有六个设备:一个控制终端 110 ,一台媒体服务器 120 ,四台播放终端 130a-130d 。其中,控制终端 110 可以是安装了控制软件的智能手机或者电脑。媒体服务器 120 为一台电脑,上面存有很多音乐文件。四个播放终端 130a-130d 可以是四个音箱(有源音箱或者无源音箱),并且, 130a-130d 中的一个或者多个还可以具有存储功能,即包括存储模块,例如插有一张 SD 卡,上面存有一些音乐文件。另外, 130a-130d 中的一个或者多个还可以有媒体共享模块。
图 6 为图 5 所示的系统 100 实现音频同步输出的流程图,结合图 5 和图 6 ,工作流程为: 控制终端 110 通过第一控制模块的搜索功能选择了局域网内网络状态最好的音箱(播放终端 130d )作为基准终端;用户通过控制终端 110 发出同步指令,让四个音箱 130a-130d 同步播放电脑(媒体服务器 120 )上的一首 mp3 歌曲: x.mp3 ;播放终端 130d (基准终端)向其他三个播放终端(播放终端 130a 、 130b 、 130c )发送时钟同步协调指令,并在规定时间(例如 50 毫秒)内都分别得到了这三个播放终端 130a 、 130b 、 130c 的命令反馈(时钟同步协调指令返回值),这三个播放终端 130a 、 130b 、 130c 被认定为 ' 音频可同步输出的设备 ' ,同时这三个播放终端 130a 、 130b 、 130c 将与基准终端 130d 同步时钟;播放终端 130d (基准终端)从电脑(媒体服务器 120 )上开始下载 x.mp3 ,同时开始进行解码,并将解码后的数字信号标记上时间戳,发送给播放终端 130a 、 130b 、 130c 作为数据缓存;播放终端 130a 、 130b 、 130c 接收到标记有时间戳的数据包以后,将数据包放在数据接收缓存区内,按照时间戳的顺序排列。如果有些数据包在缓冲时间内没有到达要指定播放终端,那么根据时间戳的顺序进行补数据包的处理,如果得到数据包的时间戳已过时,将进行丢数据包处理。在播放终端 130d (基准终端)发送音频数据包的同时启动时钟同步校正机制,根据数据包发送过程中的数据反馈,判断播放终端 130a 、 130b 、 130c 的网络状态,若网络状态良好,则以 10 秒(第一时间间隔,可自定,此处为举例)为时间间隔向播放终端 130a 、 130b 、 130c 发送时钟同步协调指令,播放终端 130a 、 130b 、 130c 很快就能进行一次同步校正,从而可使音频同步输出的较为精准。若网络状态不好,以 1 分钟(第二时间间隔,可自定,此处为举例)为时间间隔向播放终端 130a 、 130b 、 130c 发送时钟同步协调指令,同时在当前音频数据包发送完之后、下一个音频数据包发送之前将所有播放终端 130a-130d 的缓存区统一增加到相同大小,从而降低了当前网络负载,节约了网络的传输流量。播放终端 130a-130d 开始同时播放。
图 7 为本发明的音频同步输出方法第一实施例的流程图,如图 7 所示,在本实施例中,本发明的方法包括以下步骤:
S1 、控制终端 110 从局域网内的所有播放终端 130 中选择一个播放终端 130 作为基准终端,将基准终端的时钟作为基准时间,并向所述基准终端发送同步指令;
S2 、基准终端从局域网中的媒体服务器 120 下载所述同步指令指示的音频信息,解码音频信息以生成音频数字信息,并向局域网中同步指令指示的多个播放终端 130 发送时钟同步协调指令,时钟同步协调指令使能多个播放终端 130 向基准终端发送时钟同步协调指令返回值,并将多个播放终端 130 的时钟同步为基准时间;
S3 、基准终端将音频数字信息发送到在规定时间内反馈时钟同步协调指令返回值的播放终端 130 ,以在播放终端 130 上同步播放所述音频数字信息。
在本实施例中,步骤 S1 包括以下子步骤: S11 、控制终端 110 向局域网内的所有播放终端 130 发送获取状态信息的请求,状态信息包括网络状态和信号强度; S12 、控制终端 110 根据播放终端 130 返回的状态信息,从局域网内的所有播放终端 130 中选择一个播放终端 130 作为基准终端,将基准终端的时钟作为基准时间; S13 、控制终端 110 向基准终端发送同步指令。
具体地,在步骤 S11 中,控制终端 110 使用搜索功能获得局域网内所有设备,向搜索到的设备发送获取状态的请求,并接收各设备返回的状态信息,状态信息包括网络状态、信号强度和设备信息,设备信息包括设备所含的模块信息。控制终端 110 根据设备所含的模块信息,将设备进行分类,例如,包含解码模块、播放模块的设备可以作为播放终端使用,包含媒体共享模块的设备就认为该设备可作为媒体服务器使用。对于作为播放终端使用的设备,返回的状态信息中还会包含播放状态。
在步骤 S12 中,控制终端 110 根据网络状态和信号强度从所有播放终端 130 中选择一个播放终端 130 作为基准终端,基准终端的时钟作为基准时间,并向基准终端发送同步指令。第一控制模块 111 可以优先选择网络状态为有线连接的播放终端 130 作为基准终端,有线连接的播放终端 130 的网络状态一般而言要优于无线连接的播放终端 130 ,且网络状态也更稳定,其次,再选择信号强度最好的播放终端 130 为基准终端。也就是说,本发明中,可以选择网络状态最好的播放终端 130 为基准终端,若在所有播放终端 130 中,同时有多个播放终端 130 的网络状态最好,则从网络状态最好的播放终端 130 中选择信号最强的为基准终端。本发明中,不限于从所有播放终端 130 中选择基准终端的方法,例如,还可以基于到其他播放终端 130 距离最近的一播放终端 130 为基准终端。
在本实施例中,步骤 S2 中,基准终端在接收到同步指令后,从媒体服务器 120 的特定路径下载的音频信息,并解码音频信息,从而生成音频数字信息,同时,基准终端还会同步指令指示的多个播放终端 130 发送时钟同步协调指令。时钟同步协调指令有两个作用:第一,时钟同步协调指令在发送到播放终端 130 时,会使播放终端 130 反馈一个时钟同步协调指令返回值;第二,播放终端 130 会利用时钟同步输出指令中所带的时钟信息参数将本地时钟与基准时间同步。
在本实施例中,步骤 S3 中,若基准终端在规定时间内接收到播放终端 130 反馈的时钟同步协调指令返回值,则认定该播放终端为 ' 音频可同步输出的设备 ' ,将那些未能在规定时间内反馈时钟同步协调指令返回值的播放终端 130 (可以是超时返回或者没有返回)认定为 ' 不可同步输出的设备 ' 。其中,规定时间一般设定为 50 毫秒以内,该条件可做微调,但会控制在 100 毫秒以内,因为一般声音延迟 100 毫秒以内,人耳无法分辨声音是否同步,否则将明显听出声音不同步,形成重叠声。考虑到网络状态动态改变,基准终端可以向返回失败的播放终端 130 重复发送几次时钟同步协调指令,若在规定次数内、规定时间内接收到时钟同步协调指令返回值,则将之前返回失败的播放终端 130 认为 ' 音频可同步输出的设备 ' 。基准终端将音频数字信息标记上时间戳后发送到同步指令指示的多个 ' 音频可同步输出的设备 ' 作为数据缓存,且每次都发送一个同步基准数大小的数据包。其中,同步基准数是根据播放的音频信息的参数计算得出的一个以字节为单位的同步数据包,播放的音频信息的参数包括采样率、量化精度和播放时间长度,以 1024 个字节作为一个数据包,可以保证在无线网络默认设置下不分割数据包发送(该单位可根据无线设置参数做调整),这样有利于在利用无线网络发送数据包的时候提高发送效率。
在步骤 S3 中, ' 音频可同步输出的设备 ' 接收到标记有时间戳的数据包以后,将数据包放在数据接收缓存区内,按照时间戳的顺序排列。由于这些 ' 音频可同步输出的设备 ' 时钟已通过时钟同步协调指令调整至与基准时间同步,所以按顺序播放缓存区内 ' 时间戳 + 缓冲时间 ' 不小于 ' 本地时钟时间 ' 的数据包(即在缓冲时间内到达的数据包),就可形成人耳无法分辨的音频同步输出(播放)。如果有些数据包在缓冲时间内没有到达指定的 ' 音频可同步输出的设备 ' ,那么 ' 音频可同步输出的设备 ' 根据时间戳的顺序进行补数据包的处理。补数据包可选择两种方式: 1 、补静音数据包; 2 、通过前一个数据包和后一个数据包差值计算出一个替补数据包。如果得到数据包的 ' 时间戳 + 缓冲时间 ' 超过 ' 本地时钟时间 ' ,将该数据包丢弃。
图 8 为本发明的音频同步输出方法第二实施例的流程图,该实施例与本发明的方法第一实施例的区别在于,本发明的方法还包括步骤:
S4 、基准终端根据网络状态,以一定的时间间隔向在规定时间内反馈返回值的播放终端 130 发送时钟同步协调指令。
具体地,基准终端在发送数据包的同时还启动时钟同步校正机制,也就是数据包发送过程中根据数据包的反馈,判断各 ' 音频可同步输出的设备 ' 的网络状态,若网络状态高于或等于一阈值,表明此时网络状态良好,则以第一时间间隔(较短的时间间隔)向 ' 音频可同步输出的设备 ' 发送时钟同步协调指令,各 ' 音频可同步输出的设备 ' 很快就能进行一次同步校正,从而可使音频同步输出更为精准。若网络状态低于该阈值,表明此时网络状态不好,在当前音频数据包发送完之后、下一个音频数据包发送之前,将所有 ' 音频可同步输出的设备 ' 的缓存区统一增加到相同大小,同时基准终端以第二时间间隔(较长的时间间隔)向 ' 音频可同步输出的设备 ' 发送时钟同步协调指令,从而降低了当前网络负载,节约了网络的传输流量。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的权利要求范围之内。

Claims (10)

  1. 一种音频同步输出方法,其特征在于,包括以下步骤:
    S1 、控制终端( 110 )从局域网内的所有播放终端( 130 )中选择一个播放终端( 130 )作为基准终端,将所述基准终端的时钟作为基准时间,并向所述基准终端发送同步指令;
    S2 、所述基准终端 从所述局域网中的媒体服务器( 120 )下载所述同步指令指示的音频信息,解码所述音频信息以生成音频数字信息,并 向所述局域网中所述同步指令指示的多个播放终端( 130 )发送时钟同步协调指令 ,所述时钟同步协调指令使能所述多个播放终端( 130 ) 向所述基准终端发送时钟同步协调指令返回值,并将所述多个播放终端( 130 )的时钟同步为所述基准时间;
    S3 、所述基准终端将所述音频数字信息发送到在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 ),以在播放终端( 130 )上同步播放所述音频数字信息。
  2. 根据权利要求 1 所述的 音频同步输出方法,其特征在于,步骤 S1 包括以下子步骤:
    S11 、所述 控制终端( 110 )向所述局域网内的所有播放终端( 130 )发送获取状态信息的请求,所述状态信息包括网络状态和信号强度;
    S12 、所述控制终端( 110 )根据播放终端( 130 )返回的状态信息, 从所述局域网内的所有播放终端( 130 )中选择一个播放终端( 130 )作为基准终端 , 将所述基准终端的时钟作为基准时间;
    S13 、所述控制终端( 110 )向所述基准终端发送同步指令。
  3. 根据 权利要求 1 所述的 音频同步输出方法,其特征在于,步骤 S3 包括以下子步骤:
    S31 、所述基准终端向未在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 )重复发送所述时钟同步协调指令,并接收播放终端( 130 )反馈的 时钟同步协调指令返回值 ;
    S32 、所述基准终端将所述音频数字信息发送到所有在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 ),以在播放终端( 130 )上同步播放音频信息。
  4. 根据权利要求 3 所述的 音频同步输出方法,其特征在于,子步骤 S32 包括下一级子步骤:
    S321 、 所述基准终端将所述音频数字信息标记上时间戳;
    S322 、所述基准终端将标记上时间戳的音频数字信息发送到所有在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 ),且每次发送一个同步基准数大小的数据包,以在播放终端( 130 )上同步播放音频信息。
  5. 根据权利要求 4 所述的 音频同步输出方法,其特征在于,步骤 S3 还包括子步骤:
    S33 、 在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 )将数据包放在数据接收缓存区( 135 )内,并按照数据包的时间戳的顺序排列数据包;
    S34 、在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 )根据时间戳判断数据包是否在缓冲时间到达,若是则播放,若否则进行补数据包处理并丢弃超时到达的数据包。
  6. 根据权利要求 1 所述的 音频同步输出方法,其特征在于,所述方法还包括步骤:
    S4 、 所述基准终端 根据网络状态,以一定的时间间隔向 在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 )发送所述时钟同步协调指令。
  7. 根据权利要求 6 所述的 音频同步输出方法,其特征在于,步骤 S4 包括以下子步骤:
    S41 、若网络状态高于或等于一阈值,所述基准终端则以第一时间间隔向 在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 )发送所述时钟同步协调指令;
    S42 、若网络状态低于所述阈值,基准终端以及所有在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 )增加数据接收缓存区( 135 )到同一大小,且所述基准终端以第二时间间隔向在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 )发送所述时钟同步协调指令,所述第一时间间隔小于所述第二时间间隔。
  8. 一种音频同步输出系统( 100 ),其特征在于,包括连入局域网的控制终端( 110 )、媒体服务器( 120 )以及多个播放终端( 130 );其中,所述控制终端( 110 )用于从所述 局域网内的所有播放终端( 130 )中选择一个播放终端( 130 )作为基准终端,将所述基准终端的时钟作为基准时间,并向所述基准终端发送同步指令;所述基准终端用于在接收到所述同步指令后, 从所述媒体服务器( 120 )下载所述同步指令指示的音频信息,解码所述音频信息以生成音频数字信息,以及 向所述局域网中所述同步指令指示的多个播放终端( 130 )发送时钟同步协调指令 ,并接收各播放终端( 130 )反馈的时钟同步协调指令返回值,将所述音频数字信息发送到在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 ),以在播放终端( 130 )上同步播放所述音频数字信息。
  9. 根据权利要求 8 所述的音频同步输出系统( 100 ),其特征在于, 所述媒体服务器( 120 )包括:
    第一存储模块( 121 ),用于存储音频文件;
    媒体共享模块( 122 ),用于管理所述第一存储模块( 121 )存储的音频文件、以及将所述第一存储模块( 121 )指定路径下的音频文件共享到所述局域网。
  10. 根据权利要求 9 所述的 音频同步输出系统( 100 ),其特征在于, 所述播放终端( 130 )包括:
    第二控制模块( 131 ),用于在接收到所述同步指令时,向所述局域网中所述同步指令指示的多个播放终端( 130 )发送时钟同步协调指令 ;或者,在接收到所述同步协调指令时, 向发送该同步协调指令的播放终端( 130 )反馈时钟同步协调指令返回值;
    解码模块( 132 ),用于在所述第二控制模块( 131 )接收到所述同步指令时, 从所述第一存储模块( 121 )中所述同步指令指示的路径下载音频信息,解码所述音频信息以生成音频数字信息;
    时钟同步模块( 133 ),用于在所述第二控制模块( 131 )接收到所述时钟同步协调指令时,将本地时钟与发送该时钟同步协调指令的播放终端( 130 )的时钟同步;
    时间戳标记模块( 134 ) ,用于在规定时间内接收到 播放终端( 130 )反馈的时钟同步协调指令返回值时,将所述音频数字信号标记时间戳后 发送到在规定时间内反馈 时钟同步协调指令 返回值的播放终端( 130 ),且每次发送一个同步基准数大小的数据包;
    数据接收缓存区( 135 ),用于接收标记有时间戳的数据包,并按照时间戳的顺序缓存数据包;
    播放模块( 136 ),用于播放在缓冲时间内到达的数据包。
PCT/CN2014/075796 2013-07-05 2014-04-21 一种音频同步输出方法及系统 WO2015000328A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310283414.5 2013-07-05
CN201310283414.5A CN103338204B (zh) 2013-07-05 2013-07-05 一种音频同步输出方法及系统

Publications (1)

Publication Number Publication Date
WO2015000328A1 true WO2015000328A1 (zh) 2015-01-08

Family

ID=49246301

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/075796 WO2015000328A1 (zh) 2013-07-05 2014-04-21 一种音频同步输出方法及系统

Country Status (2)

Country Link
CN (1) CN103338204B (zh)
WO (1) WO2015000328A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3257304A4 (en) * 2015-02-11 2018-11-21 Harman International Industries, Incorporated Mobile device positioning
CN110248213A (zh) * 2018-03-08 2019-09-17 上海分众软件技术有限公司 多机实时同步播放系统
CN112820308A (zh) * 2020-12-30 2021-05-18 北京佳讯飞鸿电气股份有限公司 回声消除方法、装置、设备和介质
CN113691848A (zh) * 2021-07-29 2021-11-23 广州智在云天文化科技有限公司 基于对位反求算法的投影融合系统
CN114401432A (zh) * 2022-01-27 2022-04-26 广州艾美网络科技有限公司 Mv播放方法、播放终端、服务器设备及娱乐设备系统

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338204B (zh) * 2013-07-05 2016-12-28 深圳市云动创想科技有限公司 一种音频同步输出方法及系统
CN104869523B (zh) * 2014-02-26 2018-03-16 北京三星通信技术研究有限公司 虚拟多声道播放音频文件的方法、终端及系统
CN104269182B (zh) 2014-09-18 2017-05-31 歌尔股份有限公司 一种音频同步播放的方法、装置和系统
CN105656616B (zh) * 2014-12-03 2019-02-05 中国移动通信集团公司 多设备间数据同步的方法、装置、发送端及接收端
CN104581599B (zh) * 2014-12-30 2018-11-27 歌尔股份有限公司 一种多个音箱同步播放的方法和系统
CN104618736B (zh) * 2015-01-30 2018-05-01 广东欧珀移动通信有限公司 一种多媒体下载方法及其装置
CN105992040A (zh) * 2015-02-15 2016-10-05 深圳市民展科技开发有限公司 多声道音频数据发送方法、音频数据同步播放方法及装置
CN105992025B (zh) * 2015-02-15 2019-09-27 湖南汇德电子有限公司 基于音频同步播放的系统时间校准方法、音频同步播放方法及装置
CN106211308B (zh) * 2015-05-08 2019-04-23 瑞昱半导体股份有限公司 多媒体同步系统与方法
JP6519336B2 (ja) * 2015-06-16 2019-05-29 ヤマハ株式会社 オーディオ機器および同期再生方法
CN108650594B (zh) * 2015-11-04 2020-12-15 Oppo广东移动通信有限公司 一种音箱管理方法及用户终端、计算机存储介质
CN105337822B (zh) * 2015-11-04 2019-04-16 Oppo广东移动通信有限公司 一种主播放设备的选择方法及相关设备
CN105516777B (zh) * 2015-12-14 2017-10-17 广东欧珀移动通信有限公司 一种媒体流间同步的方法和装置
CN105611381A (zh) * 2015-12-29 2016-05-25 深圳市民展科技开发有限公司 一种基于无线网络的多设备音频同步播放系统及方法
CN107733745A (zh) * 2016-08-10 2018-02-23 上海悟空信息科技有限公司 一种基于wifi协议的音乐同步播放方法及播放系统
CN106411447B (zh) * 2016-10-08 2018-12-11 广东欧珀移动通信有限公司 播放控制方法、装置及终端
CN106454635B (zh) * 2016-11-16 2020-04-24 深圳Tcl数字技术有限公司 多声道无线音箱之间数据同步的方法及系统
CN107479426B (zh) * 2017-09-22 2019-06-04 张洪涛 一种机器人同步表演控制系统及方法
CN108012177A (zh) 2017-12-01 2018-05-08 晨星半导体股份有限公司 音视频播放系统及应用于其上的音频数据的播放方法
CN108449630B (zh) * 2018-04-09 2020-05-22 歌尔股份有限公司 音频同步方法及系统
US11416209B2 (en) 2018-10-15 2022-08-16 Sonos, Inc. Distributed synchronization
CN110248047B (zh) * 2019-06-27 2021-06-15 深圳市拔超科技有限公司 一种视频矩阵的同步切换方法及系统
CN111111163B (zh) * 2019-12-24 2022-08-30 腾讯科技(深圳)有限公司 管理计算资源的方法、设备和电子设备
CN111147907B (zh) * 2019-12-26 2022-05-10 深圳市优必选科技股份有限公司 多智能终端同步播放的方法、装置、系统及智能终端
CN115052236B (zh) * 2022-06-17 2023-07-04 深圳市晨锐嘉塑胶电子科技有限公司 一种数据同步网络音频输出系统及实现方法
CN115225191A (zh) * 2022-07-08 2022-10-21 深圳感臻智能股份有限公司 一种基于局域网的多设备延迟校准的方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127917A (zh) * 2007-09-06 2008-02-20 中兴通讯股份有限公司 一种互联网流媒体格式音视频同步的方法及其系统
WO2012129438A2 (en) * 2011-03-23 2012-09-27 Audible, Inc. Synchronizing digital content
CN102739661A (zh) * 2012-06-18 2012-10-17 李洋 一种基于数据统计的网络音频同步输出的方法及系统
CN103338204A (zh) * 2013-07-05 2013-10-02 曾德钧 一种音频同步输出方法及系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7631119B2 (en) * 2004-06-25 2009-12-08 Apple Inc. Techniques for providing audio for synchronized playback by multiple devices
CN101005589A (zh) * 2006-01-16 2007-07-25 深圳Tcl新技术有限公司 一种使音频视频保持同步的控制方法
CN100518332C (zh) * 2007-01-12 2009-07-22 西安交通大学 一种多路媒体同步呈现控制方法
US9253222B2 (en) * 2007-02-22 2016-02-02 Match.Com. L.L.C. Synchronous delivery of media content in a collaborative environment
CN100562122C (zh) * 2008-03-27 2009-11-18 凌阳科技股份有限公司 一种多媒体文件音视频同步播放的系统及方法
US8144612B2 (en) * 2009-04-15 2012-03-27 Ibiquity Digital Corporation Systems and methods for transmitting media content via digital radio broadcast transmission for synchronized rendering by a receiver
US8692937B2 (en) * 2010-02-25 2014-04-08 Silicon Image, Inc. Video frame synchronization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127917A (zh) * 2007-09-06 2008-02-20 中兴通讯股份有限公司 一种互联网流媒体格式音视频同步的方法及其系统
WO2012129438A2 (en) * 2011-03-23 2012-09-27 Audible, Inc. Synchronizing digital content
CN102739661A (zh) * 2012-06-18 2012-10-17 李洋 一种基于数据统计的网络音频同步输出的方法及系统
CN103338204A (zh) * 2013-07-05 2013-10-02 曾德钧 一种音频同步输出方法及系统

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3257304A4 (en) * 2015-02-11 2018-11-21 Harman International Industries, Incorporated Mobile device positioning
CN110248213A (zh) * 2018-03-08 2019-09-17 上海分众软件技术有限公司 多机实时同步播放系统
CN112820308A (zh) * 2020-12-30 2021-05-18 北京佳讯飞鸿电气股份有限公司 回声消除方法、装置、设备和介质
CN112820308B (zh) * 2020-12-30 2023-10-20 北京佳讯飞鸿电气股份有限公司 回声消除方法、装置、设备和介质
CN113691848A (zh) * 2021-07-29 2021-11-23 广州智在云天文化科技有限公司 基于对位反求算法的投影融合系统
CN114401432A (zh) * 2022-01-27 2022-04-26 广州艾美网络科技有限公司 Mv播放方法、播放终端、服务器设备及娱乐设备系统
CN114401432B (zh) * 2022-01-27 2024-01-26 广州艾美网络科技有限公司 Mv播放方法、播放终端、服务器设备及娱乐设备系统

Also Published As

Publication number Publication date
CN103338204A (zh) 2013-10-02
CN103338204B (zh) 2016-12-28

Similar Documents

Publication Publication Date Title
WO2015000328A1 (zh) 一种音频同步输出方法及系统
CN101731011B (zh) 用于设置接收器延迟时间的方法
JP6640359B2 (ja) ワイヤレスオーディオ同期
US10454604B2 (en) Encoded audio synchronization
US5923902A (en) System for synchronizing a plurality of nodes to concurrently generate output signals by adjusting relative timelags based on a maximum estimated timelag
US8762580B2 (en) Common event-based multidevice media playback
JP5149012B2 (ja) ネットワーク上のマルチチャネルスピーカの同期
US9338208B2 (en) Common event-based multidevice media playback
US8014423B2 (en) Reference time distribution over a network
JP3591493B2 (ja) ネットワークシステム、およびネットワークシステムの同期方法
JP6290915B2 (ja) 共通イベントベースのマルチデバイスメディア再生
US11678005B2 (en) Latency negotiation in a heterogeneous network of synchronized speakers
CN109479176A (zh) 同步音频回放设备
EP3868043B1 (en) Wireless audio synchronization
JP4967945B2 (ja) 端末装置およびデータ配信システム
JP5397495B2 (ja) データ配信システムおよび中継装置
US20080140238A1 (en) Method for Playing and Processing Audio Data of at Least Two Computer Units
CN112333610B (zh) 一种蓝牙tws设备的音频播放方法及装置
JP2014533031A (ja) ネットワーク内の遅延を正確に推定するためのサービス、システムおよび方法
JP5653960B2 (ja) サーバ、データ同期システム
JP2017538242A (ja) 無線データ伝送を用いたオーディオの同期記録
JP3496562B2 (ja) パケット転送装置
JP3444224B2 (ja) パケット転送装置
JP3412550B2 (ja) パケット転送装置
CN115549832A (zh) 一种音频同步方法及音频播放设备、存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14820521

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14820521

Country of ref document: EP

Kind code of ref document: A1