WO2018090461A1 - 多声道无线音箱之间数据同步的方法及系统 - Google Patents

多声道无线音箱之间数据同步的方法及系统 Download PDF

Info

Publication number
WO2018090461A1
WO2018090461A1 PCT/CN2016/112914 CN2016112914W WO2018090461A1 WO 2018090461 A1 WO2018090461 A1 WO 2018090461A1 CN 2016112914 W CN2016112914 W CN 2016112914W WO 2018090461 A1 WO2018090461 A1 WO 2018090461A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio data
slave device
difference value
data difference
sent
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.)
Ceased
Application number
PCT/CN2016/112914
Other languages
English (en)
French (fr)
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.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Publication of WO2018090461A1 publication Critical patent/WO2018090461A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; ELECTRIC HEARING AIDS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; ELECTRIC HEARING AIDS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups

Definitions

  • the present invention relates to the field of multi-channel wireless speakers, and more particularly to a method and system for data synchronization between multi-channel wireless speakers.
  • wireless bandwidth has been greatly improved, and wireless transmission of multiple channels has guaranteed transmission quality.
  • wirelessly transmitting multiple channels to multiple speakers it is possible to avoid cumbersome wiring between multiple speakers; Multiple wireless speakers will not only make the smart TV lighter and thinner, but also improve the sound of the experience; currently based on Bluetooth, WIFI and other wireless speakers, generally output two channels or multiple sounds on the same speaker.
  • Synchronizing between two or more channels on an audio device since the time base of the system is the same, time stamps can be used to synchronize multiple channels.
  • the main object of the present invention is to provide a method and system for synchronizing data between multi-channel wireless speakers, aiming at solving wireless speakers that use time to synchronize different channels.
  • the technical problem of the synchronization error requirement of the us level between different channels cannot be met.
  • a method for data synchronization between multi-channel wireless speakers provided by the present invention is applied to a slave device, and the method includes the following steps:
  • the audio data request for acquiring the corresponding channel is sent to the master device;
  • the step of adjusting the current output position of the audio data according to the corresponding audio data difference value includes:
  • the step of inserting or deleting the corresponding audio data difference value according to the corresponding audio data difference value includes:
  • the audio data corresponding to the corresponding audio data difference value is deleted from the current output position of the audio data.
  • the method includes:
  • the audio data of the corresponding channel is sent to the slave device with successful connection;
  • the step of selecting the reference number includes:
  • the step of starting the audio collection module to perform audio data collection and numbering the collected audio data includes:
  • the audio data number of the audio data output location sent by the connected slave device is compared with a reference number to obtain a corresponding audio data difference value, and the corresponding audio data difference value is sent to the corresponding
  • the steps from the device include:
  • the present invention also provides a system for data synchronization between multi-channel wireless speakers, the system comprising a master device and a slave device, the slave device comprising:
  • a first sending module configured to send an audio data request for acquiring a corresponding channel to the master device after the connection with the master device is successful
  • a first receiving module configured to receive audio data of a corresponding channel sent by the master device, and receive broadcast information that is sent by the master device to obtain a current output location of the slave device audio data and a corresponding number;
  • a second sending module configured to send, according to the broadcast information, a current output location of the audio data and a corresponding number to the master device;
  • the adjusting module is configured to receive a corresponding audio data difference calculated by the primary device by using a current output position of the audio data and a corresponding number, and adjust the current output position of the audio data according to the corresponding audio data difference.
  • the adjustment module is further configured to:
  • the adjusting module includes:
  • a determining unit configured to determine whether the corresponding audio data difference is less than zero or greater than zero
  • An insertion unit configured to insert the corresponding audio data difference value into a current output position of the audio data if the corresponding audio data difference value is less than zero;
  • a deleting unit configured to delete audio data corresponding to the corresponding audio data difference value from a current output position of the audio data, if the corresponding audio data difference value is greater than zero.
  • the master device includes:
  • the startup module is configured to start an audio collection module for audio data collection, and number the audio data collected each time;
  • a third sending module configured to send audio data of the corresponding channel to the slave device that is successfully connected after establishing a connection with the slave device that requests the connection;
  • the fourth sending module is configured to: when the number of the successfully connected slave devices reaches a preset value, send information about the current output location of the device audio data and the corresponding audio data number to the slave device that is successfully connected;
  • the selection module is configured to obtain a current output position of the audio data sent by the connected slave device and a corresponding audio data number, and select a reference number;
  • a comparison module configured to compare an audio data number of the audio data output location sent by the connected slave device with a reference number, obtain a corresponding audio data difference value, and send the corresponding audio data difference value to the corresponding slave device.
  • the selecting module includes:
  • a sorting unit configured to sort the audio data numbers corresponding to the obtained audio data output locations
  • an extracting unit configured to extract an audio data number of a median of the audio data numbers corresponding to the audio data output position, and use the median audio data number as a reference number.
  • system further includes:
  • the notification module is configured to connect the main device to the power source and turn it on, and notify the slave device that the master device is in a running state by means of a cyclic broadcast.
  • the comparing module includes:
  • a subtracting unit configured to subtract the audio data number of the audio data output location sent by the connected slave device from the reference number, to obtain a corresponding audio data difference value
  • a sending unit configured to send the corresponding audio data difference value to a corresponding slave device if the corresponding audio data difference is greater than zero or less than zero;
  • the ignoring unit is configured to ignore the corresponding audio data difference value if the corresponding audio data difference is equal to zero.
  • the invention transmits an audio data request for acquiring a corresponding channel to the master device after successfully connecting with the master device; receiving audio data of the corresponding channel sent by the master device, and receiving the acquiring slave device sent by the master device.
  • the current output position of the audio data and the broadcast information of the corresponding number; the current output position and the corresponding number of the audio data are sent to the master device according to the broadcast information; and the corresponding calculated by the master device through the current output position of the audio data and the corresponding number is received. Audio data difference, and adjusting the current output position of the audio data according to the corresponding audio data difference.
  • connection request is first sent to the master device, and after the connection with the master device is successful, the audio data request for acquiring the corresponding channel is sent to the master device; and then the audio data of the corresponding channel sent by the master device is received, And receiving broadcast information of the current output location and the corresponding number of the slave device audio data sent by the master device; sending the current output location and the corresponding number of the audio data to the master device according to the broadcast information; and receiving the master device to pass the audio data Corresponding audio data difference calculated by the current output position and the corresponding number, and adjusting the current output position of the audio data according to the corresponding audio data difference.
  • This enables simultaneous output with other wireless speakers.
  • FIG. 1 is a schematic flow chart of a first embodiment of a method for data synchronization between multi-channel wireless speakers according to the present invention
  • FIG. 2 is a step of receiving the corresponding audio data difference calculated by the master device through the current output position of the audio data and the corresponding number, and adjusting the current output position of the audio data according to the corresponding audio data difference.
  • FIG. 3 is a schematic flow chart of a second embodiment of a method for data synchronization between multi-channel wireless speakers according to the present invention.
  • FIG. 4 is a schematic flow chart showing the steps of selecting a reference number in FIG. 3;
  • FIG. 5 is a comparison of the audio data number of the audio data output position sent by the connected slave device in FIG. 3 with the reference number, obtaining a corresponding audio data difference value, and transmitting the corresponding audio data difference value to the corresponding one.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a system for data synchronization between multi-channel wireless speakers according to the present invention
  • FIG. 7 is a schematic diagram of a refinement function module of the adjustment module of FIG. 6;
  • FIG. 8 is a schematic diagram of functional modules of a second embodiment of a system for data synchronization between multi-channel wireless speakers according to the present invention.
  • FIG. 9 is a schematic diagram of a refinement function module of the selected module in FIG. 8;
  • FIG. 10 is a schematic diagram of a refinement function module of the comparison module in FIG. 8.
  • FIG. 10 is a schematic diagram of a refinement function module of the comparison module in FIG. 8.
  • the invention provides a method for data synchronization between multi-channel wireless speakers, which is applied to a slave device.
  • FIG. 1 is a schematic flow chart of a first embodiment of a method for data synchronization between multi-channel wireless speakers according to the present invention.
  • the method includes:
  • Step S110 After successfully connecting with the master device, send an audio data request for acquiring the corresponding channel to the master device.
  • the slave device is a wireless speaker, and the number of the wireless speakers may be two or more; the master device may be a smart TV or a set top box.
  • the master device is monitored. When the message "host is running" is monitored, if the current slave device is not connected to the master device, a request to connect with the master device is issued. After the connection is successful, a request to obtain audio data currently from the corresponding channel of the device is sent to the master device.
  • Step S120 Receive audio data of a corresponding channel sent by the master device, and receive broadcast information of the current output location and corresponding number of the slave device audio data sent by the master device.
  • Step S130 Send the current output position of the audio data and the corresponding number to the master device according to the broadcast information.
  • the current output position and the corresponding number of the audio data are transmitted to the master device according to the broadcast information.
  • Step S140 Receive a corresponding audio data difference value calculated by the primary device by using a current output position of the audio data and a corresponding number, and adjust a current output position of the audio data according to the corresponding audio data difference.
  • the master device calculates the current output position and the corresponding number of the audio data sent by the respective slave devices
  • the audio data difference values of the respective slave devices are obtained, and the audio data difference values are sent to the respective slave devices.
  • the audio data difference value is received from the device, and the current audio data output position is adjusted according to the audio data difference value. Thereby, data synchronization output between the respective slave devices is realized.
  • the audio data request for acquiring the corresponding channel is sent to the master device; the audio data of the corresponding channel sent by the master device is received, and the acquisition received by the master device is received.
  • the current output position of the device audio data and the broadcast information of the corresponding number sending the current output position and the corresponding number of the audio data to the main device according to the broadcast information; and receiving the calculation of the current output position and the corresponding number of the audio data by the main device Corresponding audio data difference value, and adjusting the current output position of the audio data according to the corresponding audio data difference value.
  • connection request is first sent to the master device, and after the connection with the master device is successful, the audio data request for acquiring the corresponding channel is sent to the master device; and then the audio data of the corresponding channel sent by the master device is received, And receiving broadcast information of the current output location and the corresponding number of the slave device audio data sent by the master device; sending the current output location and the corresponding number of the audio data to the master device according to the broadcast information; and receiving the master device to pass the audio data Corresponding audio data difference calculated by the current output position and the corresponding number, and adjusting the current output position of the audio data according to the corresponding audio data difference.
  • This enables simultaneous output with other wireless speakers.
  • FIG. 2 is a corresponding audio data difference calculated by the host device through the current output position of the audio data and the corresponding number, and the audio data is compared according to the corresponding audio data difference.
  • the step S140 may include:
  • Step S141 determining whether the corresponding audio data difference is less than zero or greater than zero;
  • Step S142 if the corresponding audio data difference is less than zero, insert the corresponding audio data difference value into the current output position of the audio data;
  • Step S143 if the corresponding audio data difference is greater than zero, the audio data corresponding to the corresponding audio data difference value is deleted from the current output position of the audio data.
  • the corresponding audio data difference value when the corresponding audio data difference value is received, it is first determined whether the corresponding audio data difference value is less than zero or greater than zero, and if the corresponding audio data difference is less than zero, the current If the playback progress of the device is slower than the reference progress, the playback progress of the current slave device needs to be added to the corresponding audio data difference, so that the current playback progress of the slave device is consistent with the reference progress. If the corresponding audio data difference is greater than zero, it indicates that the current playback progress of the slave device is slower than the reference progress, and the current audio data difference of the current slave device needs to be deleted, so that the current slave device's playback progress and reference are made. The progress is the same.
  • the embodiment determines whether the corresponding audio data difference is less than zero or greater than zero; if the corresponding audio data difference is less than zero, inserting the corresponding audio data difference into the current output position of the audio data. And if the corresponding audio data difference is greater than zero, the audio data corresponding to the corresponding audio data difference value is deleted from the current output position of the audio data.
  • the invention further provides a method for data synchronization between multi-channel wireless speakers, which is applied to a master device.
  • FIG. 3 is a schematic flow chart of a second embodiment of a method for synchronizing data between multi-channel wireless speakers according to the present invention.
  • the method includes:
  • Step S150 the audio collection module is started to perform audio data collection, and the audio data collected each time is numbered;
  • Step S160 after establishing a connection with the slave device that requests the connection, sending the audio data of the corresponding channel to the slave device with successful connection;
  • Step S170 when the number of successfully connected slave devices reaches a preset value, the information about the current output location of the device audio data and the corresponding audio data number is obtained and sent to the slave device with successful connection;
  • Step S180 after obtaining the current output position of the audio data sent by the connected slave device and the corresponding audio data number, selecting a reference number;
  • Step S190 comparing the audio data number of the audio data output location sent by the connected slave device with the reference number, obtaining a corresponding audio data difference value, and transmitting the corresponding audio data difference value to the corresponding slave device.
  • the slave device before the audio collection module is started to perform audio data collection, after the main device is connected to the power source and powered on, the slave device may be notified that the host device is running through a cyclic broadcast manner.
  • the time interval of the loop broadcast is T1.
  • T1 can be set according to the specific audio output.
  • start the audio collection module for audio data acquisition and number the audio data collected each time.
  • the data numbers of different channels are collected at the same time to be unified.
  • the connection request of the slave device is received and connected with the slave device that issued the connection request, and the audio data of the corresponding channel after the numbering is transmitted to the slave device with successful connection.
  • a cyclic broadcast of the current output position of the device audio data and the corresponding audio data number is acquired and sent to the slave device.
  • the value of the preset value is more than two, and the specific value may be set according to the number of slave devices that need to be synchronously output.
  • the current output position of each slave device needs to be acquired, so that the loop broadcast of the current output position of the slave device audio data and the corresponding audio data number can be sent to the slave device with successful connection. .
  • select the reference number After obtaining the current output position of the audio data sent by the connected slave device and the corresponding audio data number, select the reference number. Then, the audio data number of the audio data output location sent by the connected slave device is compared with the reference number to obtain a corresponding audio data difference value, and the corresponding audio data difference value is sent to the corresponding slave device.
  • the audio data collection module is started to perform audio data collection, and the audio data collected each time is numbered; after establishing a connection with the slave device that requests the connection, the audio data of the corresponding channel is sent to the slave device that is successfully connected; When the number of successfully connected slave devices reaches a preset value, information about the current output location of the device audio data and the corresponding audio data number is obtained and sent to the slave device that is successfully connected; and the current output of the audio data sent by the connected slave device is obtained. Position and corresponding audio data number, and select a reference number; compare the audio data number of the audio data output position sent by the connected slave device with the reference number to obtain a corresponding audio data difference, and the corresponding audio The data difference is sent to the corresponding slave device.
  • the audio collection module is first started to perform audio data collection, and the audio data collected each time is numbered; then, the connection request of the slave device is received and connected with the slave device that issues the connection request, and the audio of the corresponding channel is received.
  • the data is sent to the slave device with successful connection; when the number of slave devices that have successfully connected reaches the preset value, the loop broadcast of the current output location of the audio data of the device and the corresponding audio data number is obtained and sent to the slave device with successful connection; After the current output position of the audio data sent by the connected slave device and the corresponding audio data number, the reference number is selected; and the audio data number of the audio data output position sent by the connected slave device is compared with the reference number to obtain the corresponding audio. Data difference value, and the corresponding audio data difference value is sent to the corresponding slave device. In order to adjust the output position from the device.
  • FIG. 4 is a schematic flowchart of the refinement of the steps of selecting the reference number in FIG.
  • the step S180 may include:
  • Step S181 sorting the audio data numbers corresponding to the obtained audio data output positions
  • Step S182 extracting an audio data number of a median of the audio data numbers corresponding to the audio data output position, and using the median audio data number as a reference number.
  • the audio data numbers corresponding to the acquired audio data output positions are first sorted, and then the audio data output positions are corresponding.
  • the median audio data number in the audio data number is extracted, and the median audio data number is used as a reference number. In order to achieve data output synchronization of each slave device.
  • FIG. 5 is a comparison of the audio data number of the audio data output position sent by the connected slave device in FIG. 3 with the reference number to obtain a corresponding audio data difference value, and the corresponding audio is obtained.
  • the step S190 may include:
  • Step S191 subtracting the audio data number of the audio data output position sent by the connected slave device from the reference number to obtain a corresponding audio data difference value
  • Step S192 if the corresponding audio data difference is greater than zero or less than zero, the corresponding audio data difference is sent to the corresponding slave device;
  • Step S193 if the corresponding audio data difference is equal to zero, the corresponding audio data difference value is ignored.
  • the audio data number of the audio data output position sent by the connected slave device is sequentially subtracted from the reference number to obtain a corresponding audio data difference value. If the corresponding audio data difference is greater than zero or less than zero, it indicates that the corresponding slave device has an inconsistent output position corresponding to the reference number, and needs to be adjusted, so the corresponding audio data difference needs to be sent to the corresponding From the device. If the corresponding audio data difference is equal to zero, it indicates that the corresponding slave device has the same output position as the device corresponding to the reference number, and no adjustment is needed, so the corresponding audio data difference equal to zero can be ignored.
  • the invention further provides a system for data synchronization between multi-channel wireless speakers, the system comprising a master device and a slave device.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a system for data synchronization between multi-channel wireless speakers according to the present invention.
  • the slave device includes:
  • the first sending module 110 is configured to send an audio data request for acquiring a corresponding channel to the master device after the connection with the master device is successful.
  • the slave device is a wireless speaker, and the number of the wireless speakers may be two or more; the master device may be a smart TV or a set top box.
  • the master device is monitored. When the message "host is running" is monitored, if the current slave device is not connected to the master device, a request to connect with the master device is issued. After the connection is successful, a request to obtain audio data currently from the corresponding channel of the device is sent to the master device.
  • the first receiving module 120 is configured to receive audio data of a corresponding channel sent by the master device, and receive broadcast information that is sent by the master device to obtain a current output location of the slave device audio data and a corresponding number.
  • the audio data of the corresponding channel from the master device is received, and the broadcast information for acquiring the current output position of the slave device audio data and the corresponding number is received.
  • the second sending module 130 is configured to send the current output location and the corresponding number of the audio data to the master device according to the broadcast information.
  • the current output position and the corresponding number of the audio data are transmitted to the master device according to the broadcast information.
  • the adjustment module 140 is configured to receive a corresponding audio data difference calculated by the primary device by using a current output position of the audio data and a corresponding number, and adjust the current output position of the audio data according to the corresponding audio data difference.
  • the master device calculates the current output position and the corresponding number of the audio data sent by the respective slave devices
  • the audio data difference values of the respective slave devices are obtained, and the audio data difference values are sent to the respective slave devices.
  • the audio data difference value is received from the device, and the current audio data output position is adjusted according to the audio data difference value. Thereby achieving a synchronous output between the respective slave devices.
  • the audio data request for acquiring the corresponding channel is sent to the master device; the audio data of the corresponding channel sent by the master device is received, and the acquisition received by the master device is received.
  • the current output position of the device audio data and the broadcast information of the corresponding number; the current output position and the corresponding number of the audio data are sent to the main device according to the broadcast information; and the corresponding calculation is performed by the main device through the current output position of the audio data and the corresponding number
  • connection request is first sent to the master device, and after the connection with the master device is successful, the audio data request for acquiring the corresponding channel is sent to the master device; and then the audio data of the corresponding channel sent by the master device is received, And receiving the broadcast information of the current output position and the corresponding number of the audio data of the slave device sent by the master device; transmitting the current output location and the corresponding number of the audio data to the master device; receiving the current output location and corresponding information of the master device through the audio data And calculating a corresponding audio data difference value, and adjusting a current output position of the audio data according to the corresponding audio data difference value.
  • This enables simultaneous output with other wireless speakers.
  • FIG. 7 is a schematic diagram of a refinement function module of the adjustment module in FIG. 6.
  • the adjustment module 140 may include:
  • the determining unit 141 is configured to determine whether the corresponding audio data difference is less than zero or greater than zero;
  • the inserting unit 142 is configured to insert the corresponding audio data difference value into the current output position of the audio data if the corresponding audio data difference value is less than zero;
  • the deleting unit 143 is configured to delete the audio data corresponding to the corresponding audio data difference value from the current output position of the audio data, if the corresponding audio data difference value is greater than zero.
  • the corresponding audio data difference value when the corresponding audio data difference value is received, it is first determined that the corresponding audio data difference value is less than zero or greater than zero, and if the corresponding audio data difference is less than zero, the current slave device is The playback progress is slower than the reference progress, and the playback progress of the current slave device needs to be added to the corresponding audio data difference, so that the current playback progress of the slave device is consistent with the reference progress. If the corresponding audio data difference is greater than zero, it indicates that the current playback progress of the slave device is slower than the reference progress, and the current audio data difference of the current slave device needs to be deleted, so that the current slave device's playback progress and reference are made. The progress is the same.
  • the embodiment determines whether the corresponding audio data difference is less than zero or greater than zero; if the corresponding audio data difference is less than zero, inserting the corresponding audio data difference into the current output position of the audio data. And if the corresponding audio data difference is greater than zero, the audio data corresponding to the corresponding audio data difference value is deleted from the current output position of the audio data.
  • FIG. 8 is a schematic diagram of functional modules of a second embodiment of a system for data synchronization between multi-channel wireless speakers according to the present invention.
  • the master device includes:
  • the startup module 150 is configured to start an audio collection module for audio data collection, and number the audio data collected each time;
  • the third sending module 160 is configured to: after establishing a connection with the slave device that requests the connection, send the audio data of the corresponding channel to the slave device that is successfully connected;
  • the fourth sending module 170 is configured to: when the number of the successfully connected slave devices reaches a preset value, send information about the current output location of the device audio data and the corresponding audio data number to the slave device that is successfully connected;
  • the selecting module 180 is configured to obtain a current output position of the audio data sent by the connected slave device and a corresponding audio data number, and select a reference number;
  • the comparison module 190 is configured to compare the audio data number of the audio data output location sent by the connected slave device with the reference number, obtain a corresponding audio data difference value, and send the corresponding audio data difference value to the corresponding From the device.
  • the slave device before the audio collection module is started to perform audio data collection, after the main device is connected to the power source and powered on, the slave device may be notified that the host device is running through a cyclic broadcast manner.
  • the time interval of the loop broadcast is T1.
  • T1 can be set according to the specific audio output.
  • start the audio collection module for audio data acquisition and number the audio data collected each time.
  • the data numbers of different channels are collected at the same time to be unified.
  • the connection request of the slave device is received and connected with the slave device that issued the connection request, and the audio data of the corresponding channel after the numbering is transmitted to the slave device with successful connection.
  • a cyclic broadcast of the current output position of the device audio data and the corresponding audio data number is acquired and sent to the slave device.
  • the value of the preset value is more than two, and the specific value may be set according to the number of slave devices that need to be synchronously output.
  • the current output position of each slave device needs to be acquired, so that the loop broadcast of the current output position of the slave device audio data and the corresponding audio data number can be sent to the slave device with successful connection. .
  • select the reference number After obtaining the current output position of the audio data sent by the connected slave device and the corresponding audio data number, select the reference number. Then, the audio data number of the audio data output location sent by the connected slave device is compared with the reference number to obtain a corresponding audio data difference value, and the corresponding audio data difference value is sent to the corresponding slave device.
  • the audio data collection module is started to perform audio data collection, and the audio data collected each time is numbered; after establishing a connection with the slave device that requests the connection, the audio data of the corresponding channel is sent to the slave device that is successfully connected; When the number of successfully connected slave devices reaches a preset value, information about the current output location of the device audio data and the corresponding audio data number is obtained and sent to the slave device that is successfully connected; and the current output of the audio data sent by the connected slave device is obtained. Position and corresponding audio data number, and select a reference number; compare the audio data number of the audio data output position sent by the connected slave device with the reference number to obtain a corresponding audio data difference, and the corresponding audio The data difference is sent to the corresponding slave device.
  • the audio collection module is first started to perform audio data collection, and the audio data collected each time is numbered; then, the connection request of the slave device is received and connected with the slave device that issues the connection request, and the audio of the corresponding channel is received.
  • the data is sent to the slave device with successful connection; when the number of slave devices that have successfully connected reaches the preset value, the loop broadcast of the current output location of the audio data of the device and the corresponding audio data number is obtained and sent to the slave device with successful connection; After the current output position of the audio data sent by the connected slave device and the corresponding audio data number, the reference number is selected; and the audio data number of the audio data output position sent by the connected slave device is compared with the reference number to obtain the corresponding audio.
  • the data difference value is sent to the corresponding slave device. In order to adjust the output position from the device.
  • FIG. 9 is a schematic diagram of a refinement function module of the selected module in FIG.
  • the selection module 180 may include:
  • a sorting unit 181 configured to sort the audio data numbers corresponding to the obtained audio data output locations
  • the extracting unit 182 is configured to extract an audio data number of a median of the audio data numbers corresponding to the audio data output position, and use the audio data number of the median as a reference number.
  • the audio data numbers corresponding to the acquired audio data output positions are first sorted, and then the audio data output positions are corresponding.
  • the median audio data number in the audio data number is extracted, and the median audio data number is used as a reference number. In order to achieve data output synchronization of each slave device.
  • FIG. 10 is a schematic diagram of a refinement function module of the comparison module in FIG.
  • the comparison module 190 can include:
  • the subtraction unit 191 is configured to subtract the audio data number of the audio data output location sent by the connected slave device from the reference number to obtain a corresponding audio data difference value;
  • the sending unit 192 is configured to: if the corresponding audio data difference is greater than zero or less than zero, send the corresponding audio data difference to the corresponding slave device;
  • the ignoring unit 193 is configured to ignore the corresponding audio data difference value if the corresponding audio data difference value is equal to zero.
  • the audio data number of the audio data output position sent by the connected slave device is sequentially subtracted from the reference number to obtain a corresponding audio data difference value. If the corresponding audio data difference is greater than zero or less than zero, it indicates that the corresponding slave device has an inconsistent output position corresponding to the reference number, and needs to be adjusted, so the corresponding audio data difference needs to be sent to the corresponding From the device. If the corresponding audio data difference is equal to zero, it indicates that the corresponding slave device has the same output position as the device corresponding to the reference number, and no adjustment is needed, so the corresponding audio data difference equal to zero can be ignored.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种多声道无线音箱之间数据同步的方法,应用于从设备,所述方法包括:在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。本发明还公开了一种多声道无线音箱之间数据同步的系统。本发明能够实现不同无线声道音箱之间的音频数据同步输出。

Description

多声道无线音箱之间数据同步的方法及系统
技术领域
本发明涉及多声道无线音箱领域,尤其涉及一种多声道无线音箱之间数据同步的方法及系统。
背景技术
随着无线技术的发展,无线带宽大幅度地提高,无线传输多个声道有了传输质量的保证。通过无线传输多个声道到多个音箱, 可以避免多个音箱之间布线繁琐; 多个无线将音箱外置,不仅可以使智能电视做得更轻薄,而且可以提高体验的音效 ;目前基于蓝牙、WIFI等无线音箱,一般是在同一个音箱上面输出两个声道或者多个声道, 在一个音频设备上, 对两个或者多个声道之间进行同步, 由于系统的时间基准是一样的,因此可以采用时戳来对多个声道进行同步, 但是如果多个声道分布到多个无线音箱上,由于不同音箱在系统时间基准上至少会存在ms级别的误差, 如果采用时间来同步不同声道的无线音箱, 将无法满足不同声道之间us级别的同步误差要求。
发明内容
本发明的主要目的在于提出一种多声道无线音箱之间数据同步的方法及系统,旨在解决采用时间来同步不同声道的无线音箱, 将无法满足不同声道之间us级别的同步误差要求的技术问题。
为实现上述目的,本发明提供的一种多声道无线音箱之间数据同步的方法,应用于从设备,所述方法包括以下步骤:
在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;
接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;
根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;
接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。
可选地,所述根据所述对应的音频数据差值对音频数据当前输出位置进行调整的步骤包括:
根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值。
可选地,所述根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值的步骤包括:
判断所述对应的音频数据差值是否小于零或大于零;
若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;
所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。
可选地,所述方法包括:
启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;
在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;
当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;
获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;
将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。
可选地,所述选取参考编号的步骤包括:
对获取到的音频数据输出位置对应的音频数据编号进行排序;
提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。
可选地,所述启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号的步骤之前还包括:
将主设备连接电源并开机,并通过循环广播方式通知从设备所述主设备处于运行状态。
可选地,所述将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤包括:
将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;
若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;
若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。
此外,为实现上述目的,本发明还提供一种多声道无线音箱之间数据同步的系统,所述系统包括主设备及从设备,所述从设备包括:
第一发送模块,用于在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;
第一接收模块,用于接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;
第二发送模块,用于根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;
调整模块,用于接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。
可选地所述调整模块还用于:
根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值。
可选地,所述调整模块包括:
判断单元,用于判断所述对应的音频数据差值是否小于零或大于零;
插入单元,用于若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;
删除单元,用于所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。
可选地,所述主设备包括:
启动模块,用于启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;
第三发送模块,用于在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;
第四发送模块,用于当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;
选取模块,用于获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;
比较模块,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。
可选地,所述选取模块包括:
排序单元,用于对获取到的音频数据输出位置对应的音频数据编号进行排序;
提取单元,用于提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。
可选地,所述系统还包括:
通知模块,用于将主设备连接电源并开机,并通过循环广播方式通知从设备所述主设备处于运行状态。
可选地,所述比较模块包括:
相减单元,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;
发送单元,用于若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;
忽略单元,用于若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。
本发明通过在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。通过上述方式,首先将连接请求发送至主设备,在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;然后接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。从而实现与其他无线音箱进行同步输出。
附图说明
图1为本发明多声道无线音箱之间数据同步的方法第一实施例的流程示意图;
图2为图1中接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整的步骤的细化流程示意图;
图3为本发明多声道无线音箱之间数据同步的方法第二实施例的流程示意图;
图4为图3中选取参考编号的步骤的细化流程示意图;
图5为图3中将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤的细化流程示意图;
图6为本发明多声道无线音箱之间数据同步的系统第一实施例的功能模块示意图;
图7为图6中调整模块的细化功能模块示意图;
图8为本发明多声道无线音箱之间数据同步的系统第二实施例的功能模块示意图;
图9为图8中选取模块的细化功能模块示意图;
图10为图8中比较模块的细化功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种多声道无线音箱之间数据同步的方法,应用于从设备。
参照图1,图1为本发明多声道无线音箱之间数据同步的方法第一实施例的流程示意图。
在本实施例中,该方法包括:
步骤S110,在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备。
在本实施例中,所述从设备为无线音箱,所述无线音箱的数量可以为两个或者两个以上;所述主设备可以为智能电视或者机顶盒等。为保证本实施例能够正常实施,首先需要将主设备各个从设备连接电源,然后开机。并对主设备进行监测,当监测到”主机在运行中”的消息广播时,若当前从设备没有与主设备进行连接,则发出与主设备进行连接的请求。在连接成功后,将获取当前从设备对应声道的音频数据的请求发送至主设备。
步骤S120,接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息。
在将获取当前从设备对应声道的音频数据的请求发送至主设备之后,接收来自主设备的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息。
步骤S130,根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备。
在接收到主设备发出的获取从设备音频数据当前输出位置及对应编号的广播信息时,根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备。
步骤S140,接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。
当主设备通过各个从设备发送的音频数据当前输出位置及对应编号进行计算之后,得到各个从设备的音频数据差值,并将所述音频数据差值发送至各个从设备。从设备接收所述音频数据差值,并根据所述音频数据差值对当前音频数据输出位置进行调整。从而实现各个从设备之间的数据同步输出。
本实施例通过在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;,根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。通过上述方式,首先将连接请求发送至主设备,在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;然后接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。从而实现与其他无线音箱进行同步输出。
进一步地,参照图2,图2为图1中接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整的步骤的细化流程示意图。
基于本发明多声道无线音箱之间数据同步的方法第一实施例,所述步骤S140可以包括:
步骤S141,判断所述对应的音频数据差值是否小于零或大于零;
步骤S142,若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;
步骤S143,所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。
在本实施例中,当接收到对应的音频数据差值时,首先判断所述对应的音频数据差值是否小于零或大于零,若所述对应的音频数据差值小于零,则说明当前从设备的播放进度比参考进度慢,则需要将当前从设备的播放进度加上对应的音频数据差值,使得当前从设备的播放进度与参考进度一致。所述对应的音频数据差值大于零,则说明当前从设备的播放进度比参考进度慢,则需要将当前从设备的播放进度删除对应的音频数据差值,使得当前从设备的播放进度与参考进度一致。
本实施例通过判断所述对应的音频数据差值是否小于零或大于零;若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。通过上述方式,实现不同声道的音频输出位置到音频采集位置的音频数据buffer大小一致,从而实现不同声道的无线音箱之间的同步。
本发明进一步提供一种多声道无线音箱之间数据同步的方法,应用于主设备。
参照图3,图3为本发明多声道无线音箱之间数据同步的方法第二实施例的流程示意图。
在本实施例中,该方法包括:
步骤S150,启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;
步骤S160,在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;
步骤S170,当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;
步骤S180,获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号;
步骤S190,将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。
在本实施例中,在启动音频采集模块进行音频数据采集之前,在将主设备连接电源并开机之后,可以通过循环广播方式通知从设备”主机在运行中”, 循环广播的时间间隔为T1。T1可以根据具体的音频输出进行设置。然后启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号。将同一时间采集不同声道的数据编号进行统一。然后接收从设备的连接请求并与发出所述连接请求的从设备连接,将进行编号之后的对应声道的音频数据发送至连接成功的从设备。当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至从设备。所述预设值的取值为2个以上,具体取值可以根据需要进行同步输出的从设备的数量进行设置。当连接的数量到达预设值时,需要获取每个从设备的当前输出位置,因此可以通过将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至连接成功的从设备中。当获取到已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号。然后将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。
本实施例通过启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。通过上述方式,首先启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;然后接收从设备的连接请求并与发出所述连接请求的从设备连接,将对应声道的音频数据发送至连接成功的从设备;当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至连接成功的从设备;获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号;再将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。以便从设备对输出位置进行调整。
进一步地,参照图4,图4为图3中选取参考编号的步骤的细化流程示意图。
基于本发明多声道无线音箱之间数据同步的方法第二实施例,所述步骤S180可以包括:
步骤S181,对获取到的音频数据输出位置对应的音频数据编号进行排序;
步骤S182,提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。
在本实施例中,在获取到的音频数据输出位置对应的音频数据编号之后,首先将所述获取到的音频数据输出位置对应的音频数据编号进行排序,然后将所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号提取,并将所述中位数的音频数据编号作为参考编号。以便实现各个从设备的数据输出同步。
进一步地,参照图5,图5为图3中将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤的细化流程示意图。
基于本发明多声道无线音箱之间数据同步的方法第二实施例,所述步骤S190可以包括:
步骤S191,将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;
步骤S192,若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;
步骤S193,若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。
在本实施例中,在选取参考编号之后,依次将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值。若所述对应的音频数据差值大于零或小于零,则说明所述对应的从设备与参考编号对应的输出位置不一致,需要进行调整,因此需要将所述对应的音频数据差值发送至对应的从设备。若所述对应的音频数据差值等于零,则说明对应的从设备与参考编号对应的设备输出位置一致,不需要进行调整,因此可以忽略所述等于零的对应的音频数据差值。
本发明进一步提供一种多声道无线音箱之间数据同步的系统,所述系统包括主设备及从设备。
参照图6,图6为本发明多声道无线音箱之间数据同步的系统第一实施例的功能模块示意图。
在本实施例中,所述从设备包括:
第一发送模块110,用于在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备。
在本实施例中,所述从设备为无线音箱,所述无线音箱的数量可以为两个或者两个以上;所述主设备可以为智能电视或者机顶盒等。为保证本实施例能够正常实施,首先需要将主设备各个从设备连接电源,然后开机。并对主设备进行监测,当监测到”主机在运行中”的消息广播时,若当前从设备没有与主设备进行连接,则发出与主设备进行连接的请求。在连接成功后,将获取当前从设备对应声道的音频数据的请求发送至主设备。
第一接收模块120,用于接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息。
在将获取当前从设备对应声道的音频数据的请求发送至主设备之后,接收来自主设备的对应声道的音频数据,并接收获取从设备音频数据当前输出位置及对应编号的广播信息。
第二发送模块130,用于根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备。
在接收到主设备发出的获取从设备音频数据当前输出位置及对应编号的广播信息时,根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备。
调整模块140,用于接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。
当主设备通过各个从设备发送的音频数据当前输出位置及对应编号进行计算之后,得到各个从设备的音频数据差值,并将所述音频数据差值发送至各个从设备。从设备接收所述音频数据差值,并根据所述音频数据差值对当前音频数据输出位置进行调整。从而实现各个从设备之间的同步输出。
本实施例通过在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。通过上述方式,首先将连接请求发送至主设备,在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;然后接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。从而实现与其他无线音箱进行同步输出。
进一步地,参照图7,图7为图6中调整模块的细化功能模块示意图。
基于本发明多声道无线音箱之间数据同步的系统第一实施例,所述调整模块140可以包括:
判断单元141,用于判断所述对应的音频数据差值是否小于零或大于零;
插入单元142,用于若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;
删除单元143,用于所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。
在本实施例中,当接收到对应的音频数据差值时,首先判断所述对应的音频数据差值小于零或大于零,若所述对应的音频数据差值小于零,则说明当前从设备的播放进度比参考进度慢,则需要将当前从设备的播放进度加上对应的音频数据差值,使得当前从设备的播放进度与参考进度一致。所述对应的音频数据差值大于零,则说明当前从设备的播放进度比参考进度慢,则需要将当前从设备的播放进度删除对应的音频数据差值,使得当前从设备的播放进度与参考进度一致。
本实施例通过判断所述对应的音频数据差值是否小于零或大于零;若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。通过上述方式,实现不同声道的音频输出位置到音频采集位置的音频数据buffer大小一致,从而实现不同声道的无线音箱之间的数据同步。
进一步地,参照图8,图8为本发明多声道无线音箱之间数据同步的系统第二实施例的功能模块示意图。
在本实施例中,所述主设备包括:
启动模块150,用于启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;
第三发送模块160,用于在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;
第四发送模块170,用于当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;
选取模块180,用于获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;
比较模块190,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。
在本实施例中,在启动音频采集模块进行音频数据采集之前,在将主设备连接电源并开机之后,可以通过循环广播方式通知从设备”主机在运行中”, 循环广播的时间间隔为T1。T1可以根据具体的音频输出进行设置。然后启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号。将同一时间采集不同声道的数据编号进行统一。然后接收从设备的连接请求并与发出所述连接请求的从设备连接,将进行编号之后的对应声道的音频数据发送至连接成功的从设备。当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至从设备。所述预设值的取值为2个以上,具体取值可以根据需要进行同步输出的从设备的数量进行设置。当连接的数量到达预设值时,需要获取每个从设备的当前输出位置,因此可以通过将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至连接成功的从设备中。当获取到已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号。然后将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并所述对应的音频数据差值发送至对应的从设备。
本实施例通过启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。通过上述方式,首先启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;然后接收从设备的连接请求并与发出所述连接请求的从设备连接,将对应声道的音频数据发送至连接成功的从设备;当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至连接成功的从设备;获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号;再将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并所述对应的音频数据差值发送至对应的从设备。以便从设备对输出位置进行调整。
进一步地,参照图9,图9为图8中选取模块的细化功能模块示意图。
基于本发明多声道无线音箱之间数据同步的系统第二实施例,所述选取模块180可以包括:
排序单元181,用于对获取到的音频数据输出位置对应的音频数据编号进行排序;
提取单元182,用于提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。
在本实施例中,在获取到的音频数据输出位置对应的音频数据编号之后,首先将所述获取到的音频数据输出位置对应的音频数据编号进行排序,然后将所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号提取,并将所述中位数的音频数据编号作为参考编号。以便实现各个从设备的数据输出同步。
进一步地,参照图10,图10为图8中比较模块的细化功能模块示意图。
基于本发明多声道无线音箱之间数据同步的系统第二实施例,所述比较模块190可以包括:
相减单元191,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;
发送单元192,用于若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;
忽略单元193,用于若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。
在本实施例中,在选取参考编号之后,依次将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值。若所述对应的音频数据差值大于零或小于零,则说明所述对应的从设备与参考编号对应的输出位置不一致,需要进行调整,因此需要将所述对应的音频数据差值发送至对应的从设备。若所述对应的音频数据差值等于零,则说明对应的从设备与参考编号对应的设备输出位置一致,不需要进行调整,因此可以忽略所述等于零的对应的音频数据差值。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (16)

  1. 一种多声道无线音箱之间数据同步的方法,应用于从设备,其特征在于,所述方法包括以下步骤:
    在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;
    接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;
    根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;
    接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。
  2. 如权利要求1所述的多声道无线音箱之间数据同步的方法,其特征在于,所述根据所述对应的音频数据差值对音频数据当前输出位置进行调整的步骤包括:
    根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值。
  3. 如权利要求2所述的多声道无线音箱之间数据同步的方法,其特征在于,所述根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值的步骤包括:
    判断所述对应的音频数据差值是否小于零或大于零;
    若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;
    所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。
  4. 一种多声道无线音箱之间数据同步的方法,应用于主设备,其特征在于,所述方法包括:
    启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;
    在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;
    当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;
    获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;
    将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。
  5. 如权利要求4所述的多声道无线音箱之间数据同步的方法,其特征在于,所述选取参考编号的步骤包括:
    对获取到的音频数据输出位置对应的音频数据编号进行排序;
    提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。
  6. 如权利要求4所述的多声道无线音箱之间数据同步的方法,其特征在于,所述启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号的步骤之前还包括:
    将主设备连接电源并开机,并通过循环广播方式通知从设备所述主设备处于运行状态。
  7. 如权利要求4所述的多声道无线音箱之间数据同步的方法,其特征在于,所述将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤包括:
    将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;
    若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;
    若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。
  8. 如权利要求5所述的多声道无线音箱之间数据同步的方法,其特征在于,所述将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤包括:
    将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;
    若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;
    若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。
  9. 一种多声道无线音箱之间数据同步的系统,所述系统包括主设备及从设备,其特征在于,所述从设备包括:
    第一发送模块,用于在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;
    第一接收模块,用于接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;
    第二发送模块,用于根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;
    调整模块,用于接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。
  10. 如权利要求9所述的多声道无线音箱之间数据同步的系统,其特征在于,所述调整模块还用于:
    根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值。
  11. 如权利要求10所述的多声道无线音箱之间数据同步的系统,其特征在于,所述调整模块包括:
    判断单元,用于判断所述对应的音频数据差值是否小于零或大于零;
    插入单元,用于若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;
    删除单元,用于所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。
  12. 一种多声道无线音箱之间数据同步的系统,所述系统包括主设备及从设备,其特征在于,所述主设备包括:
    启动模块,用于启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;
    第三发送模块,用于在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;
    第四发送模块,用于当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;
    选取模块,用于获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;
    比较模块,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。
  13. 如权利要求12所述的多声道无线音箱之间数据同步的系统,其特征在于,所述选取模块包括:
    排序单元,用于对获取到的音频数据输出位置对应的音频数据编号进行排序;
    提取单元,用于提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。
  14. 如权利要求12所述的多声道无线音箱之间数据同步的系统,其特征在于,所述系统还包括:
    通知模块,用于将主设备连接电源并开机,并通过循环广播方式通知从设备所述主设备处于运行状态。
  15. 如权利要求12所述的多声道无线音箱之间数据同步的系统,其特征在于,所述比较模块包括:
    相减单元,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;
    发送单元,用于若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;
    忽略单元,用于若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。
  16. 如权利要求13所述的多声道无线音箱之间数据同步的系统,其特征在于,所述比较模块包括:
    相减单元,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;
    发送单元,用于若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;
    忽略单元,用于若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。
PCT/CN2016/112914 2016-11-16 2016-12-29 多声道无线音箱之间数据同步的方法及系统 Ceased WO2018090461A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611034167.5 2016-11-16
CN201611034167.5A CN106454635B (zh) 2016-11-16 2016-11-16 多声道无线音箱之间数据同步的方法及系统

Publications (1)

Publication Number Publication Date
WO2018090461A1 true WO2018090461A1 (zh) 2018-05-24

Family

ID=58221508

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/112914 Ceased WO2018090461A1 (zh) 2016-11-16 2016-12-29 多声道无线音箱之间数据同步的方法及系统

Country Status (2)

Country Link
CN (1) CN106454635B (zh)
WO (1) WO2018090461A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613221A (zh) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 Tws主设备、tws从设备、音频设备及系统

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465988B (zh) * 2017-08-15 2020-06-30 四川长虹电器股份有限公司 一种基于智能音响的多屏协同声场定位方法
CN107734444B (zh) * 2017-10-23 2020-02-18 恒玄科技(上海)股份有限公司 一种无线多声道声音同步播放控制系统及方法
KR20210142393A (ko) * 2020-05-18 2021-11-25 엘지전자 주식회사 영상표시장치 및 그의 동작방법
CN112235685B (zh) * 2020-09-30 2022-07-15 瑞芯微电子股份有限公司 一种音箱组网方法及音箱系统
CN114258003A (zh) * 2021-12-22 2022-03-29 英华达(南京)科技有限公司 音频播放控制方法、系统、设备及存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020056126A1 (en) * 2000-04-08 2002-05-09 Geetha Srikantan Streaming a single media track to multiple clients
US20070211907A1 (en) * 2006-03-08 2007-09-13 Samsung Electronics Co., Ltd. Method and apparatus for reproducing multi-channel sound using cable/wireless device
CN102739661A (zh) * 2012-06-18 2012-10-17 李洋 一种基于数据统计的网络音频同步输出的方法及系统
CN103338204A (zh) * 2013-07-05 2013-10-02 曾德钧 一种音频同步输出方法及系统
CN104333429A (zh) * 2014-10-22 2015-02-04 小米科技有限责任公司 实现时钟同步的方法及装置
CN105592568A (zh) * 2015-12-22 2016-05-18 Tcl通力电子(惠州)有限公司 音频播放方法及系统
CN105611381A (zh) * 2015-12-29 2016-05-25 深圳市民展科技开发有限公司 一种基于无线网络的多设备音频同步播放系统及方法
CN105992025A (zh) * 2015-02-15 2016-10-05 深圳市民展科技开发有限公司 基于音频同步播放的系统时间校准方法、音频同步播放方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100124403A1 (en) * 2008-11-18 2010-05-20 Christopher Thornburg Automatic correction of audio/video synchronization
CN102456347B (zh) * 2010-11-01 2013-11-20 喜讯无限(北京)科技有限责任公司 基于无线传输技术的多媒体文件分体式多声道同步播放实现系统及方法
CN103514922B (zh) * 2012-06-29 2016-05-11 致伸科技股份有限公司 音频播放的方法、媒体控制器、媒体播放器及媒体服务器
CN103065658B (zh) * 2012-12-18 2015-07-08 华为技术有限公司 多终端同步播放控制方法及装置
CN103581816A (zh) * 2013-11-18 2014-02-12 广州市花都区中山大学国光电子与通信研究院 基于UPnP协议的无线多房间音乐系统的一种同步机制
CN104244399B (zh) * 2014-09-15 2018-04-17 歌尔股份有限公司 无线设备间时间同步的方法、无线设备和无线通信系统
CN105847926A (zh) * 2016-03-31 2016-08-10 乐视控股(北京)有限公司 一种多媒体数据的同步播放方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020056126A1 (en) * 2000-04-08 2002-05-09 Geetha Srikantan Streaming a single media track to multiple clients
US20070211907A1 (en) * 2006-03-08 2007-09-13 Samsung Electronics Co., Ltd. Method and apparatus for reproducing multi-channel sound using cable/wireless device
CN102739661A (zh) * 2012-06-18 2012-10-17 李洋 一种基于数据统计的网络音频同步输出的方法及系统
CN103338204A (zh) * 2013-07-05 2013-10-02 曾德钧 一种音频同步输出方法及系统
CN104333429A (zh) * 2014-10-22 2015-02-04 小米科技有限责任公司 实现时钟同步的方法及装置
CN105992025A (zh) * 2015-02-15 2016-10-05 深圳市民展科技开发有限公司 基于音频同步播放的系统时间校准方法、音频同步播放方法及装置
CN105592568A (zh) * 2015-12-22 2016-05-18 Tcl通力电子(惠州)有限公司 音频播放方法及系统
CN105611381A (zh) * 2015-12-29 2016-05-25 深圳市民展科技开发有限公司 一种基于无线网络的多设备音频同步播放系统及方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613221A (zh) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 Tws主设备、tws从设备、音频设备及系统
CN113613221B (zh) * 2021-04-26 2023-09-08 珠海市杰理科技股份有限公司 Tws主设备、tws从设备、音频设备及系统

Also Published As

Publication number Publication date
CN106454635B (zh) 2020-04-24
CN106454635A (zh) 2017-02-22

Similar Documents

Publication Publication Date Title
WO2017201899A1 (zh) 连接蓝牙设备的方法及装置
WO2019114269A1 (zh) 一种节目续播方法、电视设备及计算机可读存储介质
WO2018233221A1 (zh) 多窗口声音输出方法、电视机以及计算机可读存储介质
WO2018032680A1 (zh) 音视频播放方法及系统
WO2015007007A1 (zh) 一种adc自动校正的方法及装置
WO2015142016A1 (ko) 컨텐츠의 재생 제어 방법 및 이를 수행하기 위한 컨텐츠 재생 장치
WO2018223607A1 (zh) 电视终端及hdr图像转为sdr的方法和计算机可读存储介质
WO2014186986A1 (zh) 流转发方法、设备及系统
WO2017107388A1 (zh) Hdmi版本切换方法及显示设备
WO2019071762A1 (zh) 楼层位置定位方法、系统、服务器和计算机可读存储介质
WO2019024336A1 (zh) 数据查询方法、装置及计算机可读存储介质
WO2018032679A1 (zh) 电视定时开关机的设置方法和装置
WO2016101702A1 (zh) 节目录制方法和装置
WO2017084302A1 (zh) 显示终端开机播放视频的方法及显示终端
WO2010107269A2 (ko) 멀티 채널 신호의 부호화/복호화 장치 및 방법
WO2019090966A1 (zh) 双通道卫星导航差分数据接收方法、接收机及存储介质
WO2017045441A1 (zh) 基于智能电视的音频播放方法及装置
WO2019051891A1 (zh) 基于日程的信息推送方法、装置和计算机可读存储介质
WO2016107249A1 (zh) 卫星电视搜台的方法和装置
WO2018032688A1 (zh) 一种终端设备播放开机视频的控制方法及装置
WO2016101240A1 (zh) 媒体数据播放的方法及终端
WO2017185480A1 (zh) 多屏互动连接方法、装置及系统
WO2018094812A1 (zh) 调节液晶显示装置屏幕背光亮度的方法及装置
WO2013166796A1 (zh) 自动识别3d视频播放模式的方法和装置
WO2017024857A1 (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: 16921473

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15/10/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16921473

Country of ref document: EP

Kind code of ref document: A1