WO2018090461A1 - Method and system for synchronizing data between multichannel wireless speakers - Google Patents

Method and system for synchronizing data between multichannel wireless speakers 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
Application number
PCT/CN2016/112914
Other languages
French (fr)
Chinese (zh)
Inventor
江中央
Original Assignee
深圳Tcl数字技术有限公司
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 深圳Tcl数字技术有限公司 filed Critical 深圳Tcl数字技术有限公司
Publication of WO2018090461A1 publication Critical patent/WO2018090461A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; 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.

Abstract

Disclosed in the present invention is a method for synchronizing data between multichannel wireless speakers, which may be applied in slave devices. The method comprises: sending a request to a master device for acquisition of audio data of a corresponding sound channel after successfully connecting to the master device; receiving the audio data of the corresponding sound channel sent by the master device, and receiving broadcasting information sent by the master device for acquisition of a current output location of audio data of a slave device and a corresponding serial number; sending the current output location of the audio data and the corresponding serial number to the master device according to the broadcasting information; receiving a difference value of corresponding audio data, which is obtained by the master device by means of calculation of the current output of the audio data location and the corresponding serial number, and adjusting the current output location of the audio data according to the difference value of the corresponding audio data. Further disclosed in the present invention is a system for synchronizing data among multichannel wireless speakers. The present invention achieves the synchronized output of audio data between different wireless sound channel speakers.

Description

多声道无线音箱之间数据同步的方法及系统  Method and system for data synchronization between multi-channel wireless speakers
技术领域Technical field
本发明涉及多声道无线音箱领域,尤其涉及一种多声道无线音箱之间数据同步的方法及系统。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.
背景技术Background technique
随着无线技术的发展,无线带宽大幅度地提高,无线传输多个声道有了传输质量的保证。通过无线传输多个声道到多个音箱, 可以避免多个音箱之间布线繁琐; 多个无线将音箱外置,不仅可以使智能电视做得更轻薄,而且可以提高体验的音效 ;目前基于蓝牙、WIFI等无线音箱,一般是在同一个音箱上面输出两个声道或者多个声道, 在一个音频设备上, 对两个或者多个声道之间进行同步, 由于系统的时间基准是一样的,因此可以采用时戳来对多个声道进行同步, 但是如果多个声道分布到多个无线音箱上,由于不同音箱在系统时间基准上至少会存在ms级别的误差, 如果采用时间来同步不同声道的无线音箱, 将无法满足不同声道之间us级别的同步误差要求。 With the development of wireless technology, wireless bandwidth has been greatly improved, and wireless transmission of multiple channels has guaranteed transmission quality. By 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. Road, 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. However, if multiple channels are distributed to multiple wireless speakers, since there are at least ms-level errors in the system time reference of different speakers, if time is used to synchronize the wireless speakers of different channels, The synchronization error requirement of the us level between different channels will not be met.
发明内容Summary of the invention
本发明的主要目的在于提出一种多声道无线音箱之间数据同步的方法及系统,旨在解决采用时间来同步不同声道的无线音箱, 将无法满足不同声道之间us级别的同步误差要求的技术问题。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.
为实现上述目的,本发明提供的一种多声道无线音箱之间数据同步的方法,应用于从设备,所述方法包括以下步骤:To achieve the above object, 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:
在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;After successfully connecting with the master device, the audio data request for acquiring the corresponding channel is sent to the master device;
接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;Receiving audio data of the corresponding channel sent by the master device, and receiving broadcast information of the current output location of the slave device audio data and the corresponding number sent by the master device;
根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;Transmitting, according to the broadcast information, a current output location of the audio data and a corresponding number to the master device;
接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。Receiving, by the master device, a corresponding audio data difference calculated by using a current output position of the audio data and a corresponding number, and adjusting a current output position of the audio data according to the corresponding audio data difference.
可选地,所述根据所述对应的音频数据差值对音频数据当前输出位置进行调整的步骤包括:Optionally, the step of adjusting the current output position of the audio data according to the corresponding audio data difference value includes:
根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值。And inserting or deleting the corresponding audio data difference value according to the corresponding audio data difference value.
可选地,所述根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值的步骤包括:Optionally, the step of inserting or deleting the corresponding audio data difference value according to the corresponding audio data difference value includes:
判断所述对应的音频数据差值是否小于零或大于零;Determining whether the corresponding audio data difference is less than zero or greater than zero;
若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;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;
所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。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.
可选地,所述方法包括:Optionally, the method includes:
启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;Start the audio collection module to collect audio data, and number the audio data collected each time;
在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;After establishing a connection with the slave device requesting the connection, the audio data of the corresponding channel is sent to the slave device with successful connection;
当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;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 with successful connection;
获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;Obtaining the current output position of the audio data sent by the connected slave device and the corresponding audio data number, and selecting a reference number;
将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。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.
可选地,所述选取参考编号的步骤包括:Optionally, the step of selecting the reference number includes:
对获取到的音频数据输出位置对应的音频数据编号进行排序;Sorting the audio data numbers corresponding to the obtained audio data output positions;
提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。And 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.
可选地,所述启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号的步骤之前还包括:Optionally, the step of starting the audio collection module to perform audio data collection and numbering the collected audio data includes:
将主设备连接电源并开机,并通过循环广播方式通知从设备所述主设备处于运行状态。Connect the master device to the power source and turn it on, and notify the slave device that the master device is running through cyclic broadcast.
可选地,所述将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤包括:Optionally, 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:
将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;And subtracting the audio data number of the audio data output location sent by the connected slave device with the reference number to obtain a corresponding audio data difference value;
若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;And if the corresponding audio data difference is greater than zero or less than zero, sending the corresponding audio data difference to the corresponding slave device;
若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。If the corresponding audio data difference is equal to zero, the corresponding audio data difference value is ignored.
此外,为实现上述目的,本发明还提供一种多声道无线音箱之间数据同步的系统,所述系统包括主设备及从设备,所述从设备包括:In addition, in order to achieve the above object, 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.
可选地所述调整模块还用于:Optionally, the adjustment module is further configured to:
根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值。And inserting or deleting the corresponding audio data difference value according to the corresponding audio data difference value.
可选地,所述调整模块包括:Optionally, 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.
可选地,所述主设备包括:Optionally, 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.
可选地,所述选取模块包括:Optionally, the selecting module includes:
排序单元,用于对获取到的音频数据输出位置对应的音频数据编号进行排序;a sorting unit, configured to sort the audio data numbers corresponding to the obtained audio data output locations;
提取单元,用于提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。And 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.
可选地,所述系统还包括:Optionally, the 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.
可选地,所述比较模块包括:Optionally, 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. In the above manner, the 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.
附图说明DRAWINGS
图1为本发明多声道无线音箱之间数据同步的方法第一实施例的流程示意图;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;
图2为图1中接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整的步骤的细化流程示意图;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. Schematic diagram of the refinement process;
图3为本发明多声道无线音箱之间数据同步的方法第二实施例的流程示意图;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;
图4为图3中选取参考编号的步骤的细化流程示意图;4 is a schematic flow chart showing the steps of selecting a reference number in FIG. 3;
图5为图3中将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤的细化流程示意图;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. Schematic diagram of the refinement process of the steps from the device;
图6为本发明多声道无线音箱之间数据同步的系统第一实施例的功能模块示意图;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;
图7为图6中调整模块的细化功能模块示意图;7 is a schematic diagram of a refinement function module of the adjustment module of FIG. 6;
图8为本发明多声道无线音箱之间数据同步的系统第二实施例的功能模块示意图;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;
图9为图8中选取模块的细化功能模块示意图;9 is a schematic diagram of a refinement function module of the selected module in FIG. 8;
图10为图8中比较模块的细化功能模块示意图。FIG. 10 is a schematic diagram of a refinement function module of the comparison module in FIG. 8. FIG.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明提供一种多声道无线音箱之间数据同步的方法,应用于从设备。The invention provides a method for data synchronization between multi-channel wireless speakers, which is applied to a slave device.
参照图1,图1为本发明多声道无线音箱之间数据同步的方法第一实施例的流程示意图。Referring to FIG. 1, 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.
在本实施例中,该方法包括:In this embodiment, the method includes:
步骤S110,在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备。Step S110: After successfully connecting with the master device, send an audio data request for acquiring the corresponding channel to the master device.
在本实施例中,所述从设备为无线音箱,所述无线音箱的数量可以为两个或者两个以上;所述主设备可以为智能电视或者机顶盒等。为保证本实施例能够正常实施,首先需要将主设备各个从设备连接电源,然后开机。并对主设备进行监测,当监测到”主机在运行中”的消息广播时,若当前从设备没有与主设备进行连接,则发出与主设备进行连接的请求。在连接成功后,将获取当前从设备对应声道的音频数据的请求发送至主设备。In this embodiment, 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. To ensure that the embodiment can be implemented normally, it is first necessary to connect the slave devices of the master device to the power source and then turn on the power. 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.
步骤S120,接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息。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.
在将获取当前从设备对应声道的音频数据的请求发送至主设备之后,接收来自主设备的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息。After transmitting the request for acquiring the audio data of the current channel from the device to the master device, receiving audio data of the corresponding channel from the master device, and receiving the current output position of the slave device audio data sent by the master device and corresponding Numbered broadcast information.
步骤S130,根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备。Step S130: Send the current output position of the audio data and the corresponding number to the master device according to the broadcast information.
在接收到主设备发出的获取从设备音频数据当前输出位置及对应编号的广播信息时,根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备。Upon receiving the broadcast information of the current output position of the slave device audio data and the corresponding number sent by the master device, the current output position and the corresponding number of the audio data are transmitted to the master device according to the broadcast information.
步骤S140,接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。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.
当主设备通过各个从设备发送的音频数据当前输出位置及对应编号进行计算之后,得到各个从设备的音频数据差值,并将所述音频数据差值发送至各个从设备。从设备接收所述音频数据差值,并根据所述音频数据差值对当前音频数据输出位置进行调整。从而实现各个从设备之间的数据同步输出。After 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.
本实施例通过在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;,根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。通过上述方式,首先将连接请求发送至主设备,在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;然后接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。从而实现与其他无线音箱进行同步输出。In this embodiment, after the connection with the master device is successful, 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. In the above manner, the 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.
进一步地,参照图2,图2为图1中接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整的步骤的细化流程示意图。Further, referring to FIG. 2, 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. A detailed flow diagram of the steps of adjusting the current output position.
基于本发明多声道无线音箱之间数据同步的方法第一实施例,所述步骤S140可以包括:The first embodiment of the method for data synchronization between the multi-channel wireless speakers according to the present invention, the step S140 may include:
步骤S141,判断所述对应的音频数据差值是否小于零或大于零;Step S141, determining whether the corresponding audio data difference is less than zero or greater than zero;
步骤S142,若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;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;
步骤S143,所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。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.
在本实施例中,当接收到对应的音频数据差值时,首先判断所述对应的音频数据差值是否小于零或大于零,若所述对应的音频数据差值小于零,则说明当前从设备的播放进度比参考进度慢,则需要将当前从设备的播放进度加上对应的音频数据差值,使得当前从设备的播放进度与参考进度一致。所述对应的音频数据差值大于零,则说明当前从设备的播放进度比参考进度慢,则需要将当前从设备的播放进度删除对应的音频数据差值,使得当前从设备的播放进度与参考进度一致。In this embodiment, 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.
本实施例通过判断所述对应的音频数据差值是否小于零或大于零;若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。通过上述方式,实现不同声道的音频输出位置到音频采集位置的音频数据buffer大小一致,从而实现不同声道的无线音箱之间的同步。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. Through the above manner, the audio data buffers of different channel audio output positions to the audio collection position are consistent in size, thereby realizing synchronization between wireless speakers of different channels.
本发明进一步提供一种多声道无线音箱之间数据同步的方法,应用于主设备。The invention further provides a method for data synchronization between multi-channel wireless speakers, which is applied to a master device.
参照图3,图3为本发明多声道无线音箱之间数据同步的方法第二实施例的流程示意图。Referring to FIG. 3, 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.
在本实施例中,该方法包括:In this embodiment, the method includes:
步骤S150,启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;Step S150, the audio collection module is started to perform audio data collection, and the audio data collected each time is numbered;
步骤S160,在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;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;
步骤S170,当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;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;
步骤S180,获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号;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;
步骤S190,将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。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.
在本实施例中,在启动音频采集模块进行音频数据采集之前,在将主设备连接电源并开机之后,可以通过循环广播方式通知从设备”主机在运行中”, 循环广播的时间间隔为T1。T1可以根据具体的音频输出进行设置。然后启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号。将同一时间采集不同声道的数据编号进行统一。然后接收从设备的连接请求并与发出所述连接请求的从设备连接,将进行编号之后的对应声道的音频数据发送至连接成功的从设备。当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至从设备。所述预设值的取值为2个以上,具体取值可以根据需要进行同步输出的从设备的数量进行设置。当连接的数量到达预设值时,需要获取每个从设备的当前输出位置,因此可以通过将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至连接成功的从设备中。当获取到已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号。然后将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。In this embodiment, 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. Then 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. Then, 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. When the number of successfully connected slave devices reaches a preset value, 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. When the number of connections reaches the preset value, 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. . 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.
本实施例通过启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。通过上述方式,首先启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;然后接收从设备的连接请求并与发出所述连接请求的从设备连接,将对应声道的音频数据发送至连接成功的从设备;当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至连接成功的从设备;获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号;再将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。以便从设备对输出位置进行调整。In this embodiment, 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. In the above manner, 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.
进一步地,参照图4,图4为图3中选取参考编号的步骤的细化流程示意图。Further, referring to FIG. 4, FIG. 4 is a schematic flowchart of the refinement of the steps of selecting the reference number in FIG.
基于本发明多声道无线音箱之间数据同步的方法第二实施例,所述步骤S180可以包括:The second embodiment of the method for data synchronization between the multi-channel wireless speakers according to the present invention, the step S180 may include:
步骤S181,对获取到的音频数据输出位置对应的音频数据编号进行排序;Step S181, sorting the audio data numbers corresponding to the obtained audio data output positions;
步骤S182,提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。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.
在本实施例中,在获取到的音频数据输出位置对应的音频数据编号之后,首先将所述获取到的音频数据输出位置对应的音频数据编号进行排序,然后将所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号提取,并将所述中位数的音频数据编号作为参考编号。以便实现各个从设备的数据输出同步。In this embodiment, after the audio data number corresponding to the acquired audio data output position, 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.
进一步地,参照图5,图5为图3中将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤的细化流程示意图。Further, referring to FIG. 5, 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. A refinement flow diagram of the steps of sending data difference values to corresponding slave devices.
基于本发明多声道无线音箱之间数据同步的方法第二实施例,所述步骤S190可以包括:The second embodiment of the method for data synchronization between the multi-channel wireless speakers according to the present invention, the step S190 may include:
步骤S191,将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;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;
步骤S192,若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;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;
步骤S193,若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。Step S193, if the corresponding audio data difference is equal to zero, the corresponding audio data difference value is ignored.
在本实施例中,在选取参考编号之后,依次将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值。若所述对应的音频数据差值大于零或小于零,则说明所述对应的从设备与参考编号对应的输出位置不一致,需要进行调整,因此需要将所述对应的音频数据差值发送至对应的从设备。若所述对应的音频数据差值等于零,则说明对应的从设备与参考编号对应的设备输出位置一致,不需要进行调整,因此可以忽略所述等于零的对应的音频数据差值。In this embodiment, after the reference number is selected, 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.
参照图6,图6为本发明多声道无线音箱之间数据同步的系统第一实施例的功能模块示意图。Referring to FIG. 6, 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.
在本实施例中,所述从设备包括:In this embodiment, the slave device includes:
第一发送模块110,用于在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备。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.
在本实施例中,所述从设备为无线音箱,所述无线音箱的数量可以为两个或者两个以上;所述主设备可以为智能电视或者机顶盒等。为保证本实施例能够正常实施,首先需要将主设备各个从设备连接电源,然后开机。并对主设备进行监测,当监测到”主机在运行中”的消息广播时,若当前从设备没有与主设备进行连接,则发出与主设备进行连接的请求。在连接成功后,将获取当前从设备对应声道的音频数据的请求发送至主设备。In this embodiment, 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. To ensure that the embodiment can be implemented normally, it is first necessary to connect the slave devices of the master device to the power source and then turn on the power. 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.
第一接收模块120,用于接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息。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.
在将获取当前从设备对应声道的音频数据的请求发送至主设备之后,接收来自主设备的对应声道的音频数据,并接收获取从设备音频数据当前输出位置及对应编号的广播信息。After transmitting the request for acquiring the audio data of the current slave device corresponding channel to the master device, 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.
第二发送模块130,用于根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备。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.
在接收到主设备发出的获取从设备音频数据当前输出位置及对应编号的广播信息时,根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备。Upon receiving the broadcast information of the current output position of the slave device audio data and the corresponding number sent by the master device, the current output position and the corresponding number of the audio data are transmitted to the master device according to the broadcast information.
调整模块140,用于接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。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.
当主设备通过各个从设备发送的音频数据当前输出位置及对应编号进行计算之后,得到各个从设备的音频数据差值,并将所述音频数据差值发送至各个从设备。从设备接收所述音频数据差值,并根据所述音频数据差值对当前音频数据输出位置进行调整。从而实现各个从设备之间的同步输出。After 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.
本实施例通过在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。通过上述方式,首先将连接请求发送至主设备,在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;然后接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;将音频数据当前输出位置及对应编号发送至主设备;接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。从而实现与其他无线音箱进行同步输出。In this embodiment, after the connection with the master device is successful, 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 The audio data difference value, and adjusting the current output position of the audio data according to the corresponding audio data difference value. In the above manner, the 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.
进一步地,参照图7,图7为图6中调整模块的细化功能模块示意图。Further, referring to FIG. 7, FIG. 7 is a schematic diagram of a refinement function module of the adjustment module in FIG. 6.
基于本发明多声道无线音箱之间数据同步的系统第一实施例,所述调整模块140可以包括:Based on the first embodiment of the system for data synchronization between the multi-channel wireless speakers of the present invention, the adjustment module 140 may include:
判断单元141,用于判断所述对应的音频数据差值是否小于零或大于零;The determining unit 141 is configured to determine whether the corresponding audio data difference is less than zero or greater than zero;
插入单元142,用于若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;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;
删除单元143,用于所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。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.
在本实施例中,当接收到对应的音频数据差值时,首先判断所述对应的音频数据差值小于零或大于零,若所述对应的音频数据差值小于零,则说明当前从设备的播放进度比参考进度慢,则需要将当前从设备的播放进度加上对应的音频数据差值,使得当前从设备的播放进度与参考进度一致。所述对应的音频数据差值大于零,则说明当前从设备的播放进度比参考进度慢,则需要将当前从设备的播放进度删除对应的音频数据差值,使得当前从设备的播放进度与参考进度一致。In this embodiment, 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.
本实施例通过判断所述对应的音频数据差值是否小于零或大于零;若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。通过上述方式,实现不同声道的音频输出位置到音频采集位置的音频数据buffer大小一致,从而实现不同声道的无线音箱之间的数据同步。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. Through the above manner, the audio data buffers of the audio output positions of different channels to the audio collection position are consistent in size, thereby realizing data synchronization between the wireless speakers of different channels.
进一步地,参照图8,图8为本发明多声道无线音箱之间数据同步的系统第二实施例的功能模块示意图。Further, referring to FIG. 8, 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.
在本实施例中,所述主设备包括:In this embodiment, the master device includes:
启动模块150,用于启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;The startup module 150 is configured to start an audio collection module for audio data collection, and number the audio data collected each time;
第三发送模块160,用于在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;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;
第四发送模块170,用于当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;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;
选取模块180,用于获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;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;
比较模块190,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。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.
在本实施例中,在启动音频采集模块进行音频数据采集之前,在将主设备连接电源并开机之后,可以通过循环广播方式通知从设备”主机在运行中”, 循环广播的时间间隔为T1。T1可以根据具体的音频输出进行设置。然后启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号。将同一时间采集不同声道的数据编号进行统一。然后接收从设备的连接请求并与发出所述连接请求的从设备连接,将进行编号之后的对应声道的音频数据发送至连接成功的从设备。当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至从设备。所述预设值的取值为2个以上,具体取值可以根据需要进行同步输出的从设备的数量进行设置。当连接的数量到达预设值时,需要获取每个从设备的当前输出位置,因此可以通过将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至连接成功的从设备中。当获取到已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号。然后将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并所述对应的音频数据差值发送至对应的从设备。In this embodiment, 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. Then 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. Then, 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. When the number of successfully connected slave devices reaches a preset value, 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. When the number of connections reaches the preset value, 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. . 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.
本实施例通过启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。通过上述方式,首先启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;然后接收从设备的连接请求并与发出所述连接请求的从设备连接,将对应声道的音频数据发送至连接成功的从设备;当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的循环广播发送至连接成功的从设备;获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号后,选取参考编号;再将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并所述对应的音频数据差值发送至对应的从设备。以便从设备对输出位置进行调整。In this embodiment, 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. In the above manner, 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.
进一步地,参照图9,图9为图8中选取模块的细化功能模块示意图。Further, referring to FIG. 9, FIG. 9 is a schematic diagram of a refinement function module of the selected module in FIG.
基于本发明多声道无线音箱之间数据同步的系统第二实施例,所述选取模块180可以包括:Based on the second embodiment of the system for data synchronization between the multi-channel wireless speakers of the present invention, the selection module 180 may include:
排序单元181,用于对获取到的音频数据输出位置对应的音频数据编号进行排序;a sorting unit 181, configured to sort the audio data numbers corresponding to the obtained audio data output locations;
提取单元182,用于提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。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.
在本实施例中,在获取到的音频数据输出位置对应的音频数据编号之后,首先将所述获取到的音频数据输出位置对应的音频数据编号进行排序,然后将所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号提取,并将所述中位数的音频数据编号作为参考编号。以便实现各个从设备的数据输出同步。In this embodiment, after the audio data number corresponding to the acquired audio data output position, 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.
进一步地,参照图10,图10为图8中比较模块的细化功能模块示意图。Further, referring to FIG. 10, FIG. 10 is a schematic diagram of a refinement function module of the comparison module in FIG.
基于本发明多声道无线音箱之间数据同步的系统第二实施例,所述比较模块190可以包括:Based on the second embodiment of the system for data synchronization between the multi-channel wireless speakers of the present invention, the comparison module 190 can include:
相减单元191,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;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;
发送单元192,用于若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;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;
忽略单元193,用于若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。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.
在本实施例中,在选取参考编号之后,依次将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值。若所述对应的音频数据差值大于零或小于零,则说明所述对应的从设备与参考编号对应的输出位置不一致,需要进行调整,因此需要将所述对应的音频数据差值发送至对应的从设备。若所述对应的音频数据差值等于零,则说明对应的从设备与参考编号对应的设备输出位置一致,不需要进行调整,因此可以忽略所述等于零的对应的音频数据差值。In this embodiment, after the reference number is selected, 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 above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (16)

  1. 一种多声道无线音箱之间数据同步的方法,应用于从设备,其特征在于,所述方法包括以下步骤: A method for data synchronization between multi-channel wireless speakers is applied to a slave device, characterized in that the method comprises the following steps:
    在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;After successfully connecting with the master device, the audio data request for acquiring the corresponding channel is sent to the master device;
    接收所述主设备发送的对应声道的音频数据,并接收所述主设备发送的获取从设备音频数据当前输出位置及对应编号的广播信息;Receiving audio data of the corresponding channel sent by the master device, and receiving broadcast information of the current output location of the slave device audio data and the corresponding number sent by the master device;
    根据所述广播信息将音频数据当前输出位置及对应编号发送至主设备;Transmitting, according to the broadcast information, a current output location of the audio data and a corresponding number to the master device;
    接收所述主设备通过音频数据当前输出位置及对应编号计算得到的对应的音频数据差值,并根据所述对应的音频数据差值对音频数据当前输出位置进行调整。Receiving, by the master device, a corresponding audio data difference calculated by using a current output position of the audio data and a corresponding number, and adjusting a current output position of the audio data according to the corresponding audio data difference.
  2. 如权利要求1所述的多声道无线音箱之间数据同步的方法,其特征在于,所述根据所述对应的音频数据差值对音频数据当前输出位置进行调整的步骤包括:The method of data synchronization between multi-channel wireless speakers according to claim 1, wherein the step of adjusting the current output position of the audio data according to the corresponding audio data difference comprises:
    根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值。And inserting or deleting the corresponding audio data difference value according to the corresponding audio data difference value.
  3. 如权利要求2所述的多声道无线音箱之间数据同步的方法,其特征在于,所述根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值的步骤包括:The method for synchronizing data between multi-channel wireless speakers according to claim 2, wherein said inserting or deleting a corresponding audio data difference value according to said corresponding audio data difference value The steps include:
    判断所述对应的音频数据差值是否小于零或大于零;Determining whether the corresponding audio data difference is less than zero or greater than zero;
    若所述对应的音频数据差值小于零,则将所述对应的音频数据差值插入到音频数据当前输出位置中;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;
    所述对应的音频数据差值大于零,则从音频数据当前输出位置中删除与所述对应的音频数据差值对应的音频数据。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.
  4. 一种多声道无线音箱之间数据同步的方法,应用于主设备,其特征在于,所述方法包括:A method for data synchronization between multi-channel wireless speakers is applied to a master device, and the method includes:
    启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;Start the audio collection module to collect audio data, and number the audio data collected each time;
    在与请求连接的从设备建立连接后,将对应声道的音频数据发送至连接成功的从设备;After establishing a connection with the slave device requesting the connection, the audio data of the corresponding channel is sent to the slave device with successful connection;
    当连接成功的从设备数量达到预设值时,将获取从设备音频数据当前输出位置及对应的音频数据编号的信息发送至连接成功的从设备;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 with successful connection;
    获取已连接的从设备发送的音频数据当前输出位置及对应的音频数据编号,并选取参考编号;Obtaining the current output position of the audio data sent by the connected slave device and the corresponding audio data number, and selecting a reference number;
    将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备。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.
  5. 如权利要求4所述的多声道无线音箱之间数据同步的方法,其特征在于,所述选取参考编号的步骤包括:The method for synchronizing data between multi-channel wireless speakers according to claim 4, wherein the step of selecting a reference number comprises:
    对获取到的音频数据输出位置对应的音频数据编号进行排序;Sorting the audio data numbers corresponding to the obtained audio data output positions;
    提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。And 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.
  6. 如权利要求4所述的多声道无线音箱之间数据同步的方法,其特征在于,所述启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号的步骤之前还包括:The method for synchronizing data between multi-channel wireless speakers according to claim 4, wherein the step of starting the audio collection module to perform audio data collection and numbering each of the collected audio data further comprises:
    将主设备连接电源并开机,并通过循环广播方式通知从设备所述主设备处于运行状态。Connect the master device to the power source and turn it on, and notify the slave device that the master device is running through cyclic broadcast.
  7. 如权利要求4所述的多声道无线音箱之间数据同步的方法,其特征在于,所述将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤包括:The method for synchronizing data between multi-channel wireless speakers according to claim 4, wherein the audio data number of the audio data output position sent by the connected slave device is compared with a reference number to obtain a corresponding And the step of transmitting the corresponding audio data difference value to the corresponding slave device includes:
    将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;And subtracting the audio data number of the audio data output location sent by the connected slave device with the reference number to obtain a corresponding audio data difference value;
    若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;And if the corresponding audio data difference is greater than zero or less than zero, sending the corresponding audio data difference to the corresponding slave device;
    若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。If the corresponding audio data difference is equal to zero, the corresponding audio data difference value is ignored.
  8. 如权利要求5所述的多声道无线音箱之间数据同步的方法,其特征在于,所述将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号进行比较,获得对应的音频数据差值,并将所述对应的音频数据差值发送至对应的从设备的步骤包括:The method for synchronizing data between multi-channel wireless speakers according to claim 5, wherein the audio data number of the audio data output position sent by the connected slave device is compared with a reference number to obtain a corresponding And the step of transmitting the corresponding audio data difference value to the corresponding slave device includes:
    将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;And subtracting the audio data number of the audio data output location sent by the connected slave device with the reference number to obtain a corresponding audio data difference value;
    若所述对应的音频数据差值大于零或小于零,则将所述对应的音频数据差值发送至对应的从设备;And if the corresponding audio data difference is greater than zero or less than zero, sending the corresponding audio data difference to the corresponding slave device;
    若所述对应的音频数据差值等于零,则忽略所述对应的音频数据差值。If the corresponding audio data difference is equal to zero, the corresponding audio data difference value is ignored.
  9. 一种多声道无线音箱之间数据同步的系统,所述系统包括主设备及从设备,其特征在于,所述从设备包括:A system for data synchronization between multi-channel wireless speakers, the system comprising a master device and a slave device, wherein the slave device comprises:
    第一发送模块,用于在与主设备连接成功后,将获取对应声道的音频数据请求发送至主设备;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.
  10. 如权利要求9所述的多声道无线音箱之间数据同步的系统,其特征在于,所述调整模块还用于:The system for synchronizing data between multi-channel wireless speakers according to claim 9, wherein the adjustment module is further configured to:
    根据所述对应的音频数据差值将音频数据当前输出位置插入或删除对应的音频数据差值。And inserting or deleting the corresponding audio data difference value according to the corresponding audio data difference value.
  11. 如权利要求10所述的多声道无线音箱之间数据同步的系统,其特征在于,所述调整模块包括:The system for synchronizing data between multi-channel wireless speakers according to claim 10, wherein the adjustment module comprises:
    判断单元,用于判断所述对应的音频数据差值是否小于零或大于零;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.
  12. 一种多声道无线音箱之间数据同步的系统,所述系统包括主设备及从设备,其特征在于,所述主设备包括:A system for data synchronization between multi-channel wireless speakers, the system comprising a master device and a slave device, wherein the master device comprises:
    启动模块,用于启动音频采集模块进行音频数据采集,并对每次采集的音频数据进行编号;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.
  13. 如权利要求12所述的多声道无线音箱之间数据同步的系统,其特征在于,所述选取模块包括:The system for synchronizing data between multi-channel wireless speakers according to claim 12, wherein the selection module comprises:
    排序单元,用于对获取到的音频数据输出位置对应的音频数据编号进行排序;a sorting unit, configured to sort the audio data numbers corresponding to the obtained audio data output locations;
    提取单元,用于提取所述音频数据输出位置对应的音频数据编号中的中位数的音频数据编号,并将所述中位数的音频数据编号作为参考编号。And 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.
  14. 如权利要求12所述的多声道无线音箱之间数据同步的系统,其特征在于,所述系统还包括:The system of data synchronization between multi-channel wireless speakers of claim 12, wherein the system further comprises:
    通知模块,用于将主设备连接电源并开机,并通过循环广播方式通知从设备所述主设备处于运行状态。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.
  15. 如权利要求12所述的多声道无线音箱之间数据同步的系统,其特征在于,所述比较模块包括:The system for synchronizing data between multi-channel wireless speakers according to claim 12, wherein the comparison module comprises:
    相减单元,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;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.
  16. 如权利要求13所述的多声道无线音箱之间数据同步的系统,其特征在于,所述比较模块包括:The system for synchronizing data between multi-channel wireless speakers according to claim 13, wherein the comparison module comprises:
    相减单元,用于将已连接的从设备发送的音频数据输出位置的音频数据编号与参考编号相减,获得对应的音频数据差值;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.
PCT/CN2016/112914 2016-11-16 2016-12-29 Method and system for synchronizing data between multichannel wireless speakers WO2018090461A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611034167.5 2016-11-16
CN201611034167.5A CN106454635B (en) 2016-11-16 2016-11-16 Method and system for synchronizing data between multi-channel wireless sound boxes

Publications (1)

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

Family

ID=58221508

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/112914 WO2018090461A1 (en) 2016-11-16 2016-12-29 Method and system for synchronizing data between multichannel wireless speakers

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613221A (en) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 TWS master device, TWS slave device, audio device and system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465988B (en) * 2017-08-15 2020-06-30 四川长虹电器股份有限公司 Multi-screen cooperative sound field positioning method based on intelligent sound
CN107734444B (en) * 2017-10-23 2020-02-18 恒玄科技(上海)股份有限公司 Wireless multichannel sound synchronous playing control system and method
KR20210142393A (en) 2020-05-18 2021-11-25 엘지전자 주식회사 Image display apparatus and method thereof
CN112235685B (en) * 2020-09-30 2022-07-15 瑞芯微电子股份有限公司 Sound box networking method and sound box system

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 (en) * 2012-06-18 2012-10-17 李洋 Method and system for network audio sync output on basis of data statistics
CN103338204A (en) * 2013-07-05 2013-10-02 曾德钧 Audio synchronization output method and system
CN104333429A (en) * 2014-10-22 2015-02-04 小米科技有限责任公司 Method and device for realizing clock synchronization
CN105592568A (en) * 2015-12-22 2016-05-18 Tcl通力电子(惠州)有限公司 Audio playing method and system
CN105611381A (en) * 2015-12-29 2016-05-25 深圳市民展科技开发有限公司 Multi-device audio synchronous playing system and method based on wireless network
CN105992025A (en) * 2015-02-15 2016-10-05 深圳市民展科技开发有限公司 Audio synchronous playing-based system time calibration method, audio synchronous playing method and devices

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 (en) * 2010-11-01 2013-11-20 喜讯无限(北京)科技有限责任公司 Realization system and method for split-type multi-channel synchronous play for multimedia file based on wireless transmission technology
CN103514922B (en) * 2012-06-29 2016-05-11 致伸科技股份有限公司 Method, media controller, media player and media server that audio frequency is play
CN103065658B (en) * 2012-12-18 2015-07-08 华为技术有限公司 Control method and device of multi-terminal synchronized playing
CN103581816A (en) * 2013-11-18 2014-02-12 广州市花都区中山大学国光电子与通信研究院 Wireless multi-room music system synchronization mechanism based on UPnP protocol
CN104244399B (en) * 2014-09-15 2018-04-17 歌尔股份有限公司 The method of time synchronization, wireless device and wireless communication system between wireless device
CN105847926A (en) * 2016-03-31 2016-08-10 乐视控股(北京)有限公司 Multimedia data synchronous playing method and device

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 (en) * 2012-06-18 2012-10-17 李洋 Method and system for network audio sync output on basis of data statistics
CN103338204A (en) * 2013-07-05 2013-10-02 曾德钧 Audio synchronization output method and system
CN104333429A (en) * 2014-10-22 2015-02-04 小米科技有限责任公司 Method and device for realizing clock synchronization
CN105992025A (en) * 2015-02-15 2016-10-05 深圳市民展科技开发有限公司 Audio synchronous playing-based system time calibration method, audio synchronous playing method and devices
CN105592568A (en) * 2015-12-22 2016-05-18 Tcl通力电子(惠州)有限公司 Audio playing method and system
CN105611381A (en) * 2015-12-29 2016-05-25 深圳市民展科技开发有限公司 Multi-device audio synchronous playing system and method based on wireless network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613221A (en) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 TWS master device, TWS slave device, audio device and system
CN113613221B (en) * 2021-04-26 2023-09-08 珠海市杰理科技股份有限公司 TWS master device, TWS slave device, audio device and system

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2018090461A1 (en) Method and system for synchronizing data between multichannel wireless speakers
WO2017201899A1 (en) Method and apparatus for connecting to bluetooth device
WO2019114269A1 (en) Method for resuming playing program, television device, and computer readable storage medium
WO2018028135A1 (en) Downlink data information feedback method and relevant device
WO2018233221A1 (en) Multi-window sound output method, television, and computer-readable storage medium
WO2018166224A1 (en) Target tracking display method and apparatus for panoramic video, and storage medium
WO2018032680A1 (en) Method and system for playing audio and video
WO2017107388A1 (en) Hdmi version switching method and display device
WO2020010671A1 (en) Display method and device, television set, and storage medium
WO2019071762A1 (en) Floor positioning method and system, server and computer-readable storage medium
WO2018032679A1 (en) Setting method and device for timed startup and shutoff of television
WO2018223607A1 (en) Television terminal, method for converting hdr image into sdr image, and computer readable storage medium
WO2016107249A1 (en) Channel search method and device for satellite television
WO2019024336A1 (en) Data query method and device, and computer readable storage medium
WO2019071771A1 (en) Wireless signal fingerprint information calibration method, system, server and medium
WO2017045441A1 (en) Smart television-based audio playback method and apparatus
WO2018000856A1 (en) Method implementing sdn overlay network message forwarding, terminal, apparatus, and computer readable storage medium
WO2019051891A1 (en) Schedule-based information pushing method and device, and computer-readable storage medium
WO2017185480A1 (en) Multi-screen interaction connection method, device and system
WO2018094812A1 (en) Method and device for adjusting backlight brightness of liquid crystal display device screen
WO2017024857A1 (en) Audio fingerprint-based program identification method and apparatus
WO2016101240A1 (en) Media data playing method and terminal
WO2019090966A1 (en) Method, receiver, and storage medium for receiving dual channel satellite navigation differential data
WO2017113596A1 (en) Method and system for listen-only control, mobile terminal, and smart television
WO2013166796A1 (en) Method and device for automatically identifying 3d video play mode

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