CN106454635B - Method and system for synchronizing data between multi-channel wireless sound boxes - Google Patents

Method and system for synchronizing data between multi-channel wireless sound boxes Download PDF

Info

Publication number
CN106454635B
CN106454635B CN201611034167.5A CN201611034167A CN106454635B CN 106454635 B CN106454635 B CN 106454635B CN 201611034167 A CN201611034167 A CN 201611034167A CN 106454635 B CN106454635 B CN 106454635B
Authority
CN
China
Prior art keywords
audio data
difference value
output position
slave
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611034167.5A
Other languages
Chinese (zh)
Other versions
CN106454635A (en
Inventor
江中央
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Priority to CN201611034167.5A priority Critical patent/CN106454635B/en
Priority to PCT/CN2016/112914 priority patent/WO2018090461A1/en
Publication of CN106454635A publication Critical patent/CN106454635A/en
Application granted granted Critical
Publication of CN106454635B publication Critical patent/CN106454635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Landscapes

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

Abstract

The invention discloses a method for synchronizing data among multi-channel wireless sound boxes, which is applied to slave equipment and comprises the following steps: after the connection with the main equipment is successful, sending an audio data request for acquiring a corresponding sound channel to the main equipment; receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment; sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information; and receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value. The invention also discloses a system for synchronizing data among the multi-channel wireless sound boxes. The invention can realize the synchronous output of audio data among different wireless sound channel sound boxes.

Description

Method and system for synchronizing data between multi-channel wireless sound boxes
Technical Field
The invention relates to the field of multi-channel wireless sound boxes, in particular to a method and a system for synchronizing data among multi-channel wireless sound boxes.
Background
With the development of wireless technology, wireless bandwidth is greatly improved, and the transmission quality of wirelessly transmitting a plurality of sound channels is guaranteed. The plurality of sound channels are wirelessly transmitted to the plurality of sound boxes, so that the problem that the wiring among the plurality of sound boxes is complicated can be avoided; the plurality of wireless sound boxes are arranged externally, so that the smart television can be made thinner and lighter, and the experience sound effect can be improved; at present based on wireless audio amplifier such as bluetooth, WIFI, generally export two sound channels or a plurality of sound channels on same audio amplifier, on an audio equipment, to synchronizing between two or a plurality of sound channels, because the time reference of system is the same, consequently can adopt time stamp to synchronize a plurality of sound channels, but if a plurality of sound channels distribute to on a plurality of wireless audio amplifier, because different audio amplifiers can have the error of ms rank on the system time reference at least, if adopt the time to come the wireless audio amplifier of synchronous different sound channels, can't satisfy the synchronous error requirement of us rank between the different sound channels.
Disclosure of Invention
The invention mainly aims to provide a method and a system for synchronizing data among multi-channel wireless sound boxes, and aims to solve the technical problem that us-level synchronization error requirements among different sound channels cannot be met by synchronizing wireless sound boxes with different sound channels by adopting time.
In order to achieve the above object, the present invention provides a method for synchronizing data between multi-channel wireless speakers, which is applied to a slave device, and the method includes the following steps:
after the connection with the main equipment is successful, sending an audio data request for acquiring a corresponding sound channel to the main equipment;
receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment;
sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information;
and receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value.
Optionally, the step of receiving a 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 includes:
judging whether the corresponding audio data difference value is smaller than zero or larger than zero;
if the corresponding audio data difference value is smaller than zero, inserting the corresponding audio data difference value into the current output position of the audio data;
and if the corresponding audio data difference value is larger than zero, deleting the audio data corresponding to the corresponding audio data difference value from the current output position of the audio data.
Optionally, the method comprises:
starting an audio acquisition module to acquire audio data, and numbering the audio data acquired each time;
after establishing connection with the slave equipment requesting connection, sending the audio data of the corresponding sound channel to the slave equipment successfully connected;
when the number of the successfully connected slave devices reaches a preset value, the information of the current output position of the audio data of the slave devices and the corresponding audio data numbers is acquired and sent to the successfully connected slave devices;
acquiring the current output position of audio data sent by connected slave equipment and a corresponding audio data number, and selecting a reference number;
and comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave equipment.
Optionally, the step of selecting a reference number includes:
sequencing the audio data numbers corresponding to the obtained audio data output positions;
and extracting the audio data number of the median in the audio data numbers corresponding to the audio data output positions, and taking the audio data number of the median as a reference number.
Optionally, the step of comparing 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 value, and sending the corresponding audio data difference value to the corresponding slave device includes:
subtracting the reference number from the audio data number of the audio data output position sent by the connected slave equipment to obtain a corresponding audio data difference value;
if the corresponding audio data difference value is larger than zero or smaller than zero, the corresponding audio data difference value is sent to the corresponding slave equipment;
and if the corresponding audio data difference value is equal to zero, ignoring the corresponding audio data difference value.
In addition, to achieve the above object, the present invention further provides a system for synchronizing data between multi-channel wireless speakers, where the system includes a master device and a slave device, and the slave device includes:
the first sending module is used for sending an audio data request for acquiring a corresponding sound channel to the main equipment after the connection with the main equipment is successful;
the first receiving module is used for receiving the audio data of the corresponding sound channel sent by the main equipment and receiving the broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment;
the second sending module is used for sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information;
and the adjusting module is used for receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value.
Optionally, the adjusting module includes:
the judging unit is used for judging whether the corresponding audio data difference value is smaller than zero or larger than zero;
the inserting unit is used for inserting the corresponding audio data difference value into the current output position of the audio data if the corresponding audio data difference value is smaller than zero;
and the deleting unit is used for deleting 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 larger than zero.
Optionally, the master device comprises:
the starting module is used for starting the audio acquisition module to acquire audio data and numbering the audio data acquired each time;
the third sending module is used for sending the audio data of the corresponding sound channel to the slave equipment which is successfully connected after the connection is established with the slave equipment which requests the connection;
the fourth sending module is used for sending the information of the current output position of the audio data of the slave equipment and the corresponding audio data number to the slave equipment which is successfully connected when the number of the slave equipment which is successfully connected reaches a preset value;
the selection module is used for acquiring the current output position of the audio data sent by the connected slave equipment and the corresponding audio data number and selecting a reference number;
and the comparison module is used for comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value and sending the corresponding audio data difference value to the corresponding slave equipment.
Optionally, the selecting module includes:
the sequencing unit is used for sequencing the audio data numbers corresponding to the obtained audio data output positions;
and the extraction unit is used for extracting the audio data number of the median in the audio data numbers corresponding to the audio data output positions and taking the audio data number of the median as a reference number.
Optionally, the comparison module comprises:
the subtracting unit is used for subtracting the audio data number of the audio data output position sent by the connected slave equipment from the reference number to obtain a corresponding audio data difference value;
the sending unit is used for sending the corresponding audio data difference value to the corresponding slave equipment if the corresponding audio data difference value is larger than zero or smaller than zero;
and the ignoring unit is used for ignoring the corresponding audio data difference value if the corresponding audio data difference value is equal to zero.
After the connection with the main equipment is successful, the audio data request for acquiring the corresponding sound channel is sent to the main equipment; receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment; sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information; and receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value. According to the mode, firstly, the connection request is sent to the main equipment, and after the connection with the main equipment is successful, the audio data request for acquiring the corresponding sound channel is sent to the main equipment; then receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment; sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information; and receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value. Therefore, synchronous output with other wireless sound boxes is realized.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for data synchronization between multi-channel wireless speakers according to a first embodiment of the present invention;
fig. 2 is a detailed flowchart of the step of receiving the corresponding audio data difference calculated by the master device according to the current output position of the audio data and the corresponding number in fig. 1, and adjusting the current output position of the audio data according to the corresponding audio data difference;
FIG. 3 is a flowchart illustrating a second embodiment of a method for data synchronization between multi-channel wireless speakers according to the present invention;
FIG. 4 is a detailed flowchart of the step of selecting reference numbers in FIG. 3;
fig. 5 is a detailed flowchart illustrating the steps of comparing 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 value and sending the corresponding audio data difference value to the corresponding slave device in fig. 3;
FIG. 6 is a functional block diagram of a system for data synchronization between multi-channel wireless speakers according to a first embodiment of 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 functional block diagram of a system for data synchronization between multi-channel wireless speakers according to a second embodiment of the present invention;
FIG. 9 is a schematic diagram of a refinement function module of the selection module of FIG. 8;
FIG. 10 is a schematic diagram of a refinement function module of the comparison module in FIG. 8.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be 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 synchronizing data among multi-channel wireless sound boxes, which is applied to slave equipment.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a first embodiment of a method for synchronizing data between multi-channel wireless speakers according to the present invention.
In this embodiment, the method includes:
step S110, after the connection with the master device is successful, sending an audio data request for obtaining a corresponding channel to the master device.
In this embodiment, the slave device is a wireless sound box, and the number of the wireless sound boxes may be two or more; the main device can be an intelligent television or a set top box and the like. In order to ensure that the present embodiment can be normally implemented, each slave device of the master device needs to be connected to a power supply first, and then the master device is turned on. And monitoring the master equipment, and when monitoring the message broadcasting of 'the host is in operation', if the current slave equipment is not connected with the master equipment, sending a request for connecting with the master equipment. And after the connection is successful, sending a request for acquiring the audio data of the channel corresponding to the current slave equipment to the master equipment.
Step S120, receiving the audio data of the corresponding channel sent by the master device, and receiving the broadcast information sent by the master device to obtain the current output position and the corresponding number of the slave device audio data.
After a request for acquiring the audio data of the channel corresponding to the current slave equipment is sent to the master equipment, the audio data of the channel corresponding to the master equipment is received, and the broadcast information which is sent by the master equipment and used for acquiring the current output position and the corresponding number of the slave equipment audio data is received.
And step S130, sending the current output position of the audio data and the corresponding number to the main equipment according to the broadcast information.
And when receiving broadcast information sent by the master equipment for acquiring the current output position and the corresponding number of the audio data of the slave equipment, sending the current output position and the corresponding number of the audio data to the master equipment according to the broadcast information.
Step S140, receiving a corresponding audio data difference value 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 value.
And after the master equipment calculates the current output positions and the corresponding numbers of the audio data sent by the slave equipment, obtaining the audio data difference values of the slave equipment, and sending the audio data difference values to the slave equipment. And the slave equipment receives the audio data difference value and adjusts the current audio data output position according to the audio data difference value. Thereby realizing synchronous data output among the slave devices.
In the embodiment, after the connection with the main device is successful, the audio data request for acquiring the corresponding sound channel is sent to the main device; receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment; sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information; and receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value. According to the mode, firstly, the connection request is sent to the main equipment, and after the connection with the main equipment is successful, the audio data request for acquiring the corresponding sound channel is sent to the main equipment; then receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment; sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information; and receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value. Therefore, synchronous output with other wireless sound boxes is realized.
Further, referring to fig. 2, fig. 2 is a detailed flowchart of the step of receiving the corresponding audio data difference calculated by the master device according to the current output position of the audio data and the corresponding number in fig. 1, and adjusting the current output position of the audio data according to the corresponding audio data difference in fig. 2.
Based on the first embodiment of the method for data synchronization between multi-channel wireless speakers according to the present invention, the step S140 may include:
step S141, judging whether the corresponding audio data difference value is smaller than zero or larger than zero;
step S142, if the corresponding audio data difference value is smaller than zero, inserting the corresponding audio data difference value into the current output position of the audio data;
and step S143, if the corresponding audio data difference value is greater than zero, deleting the audio data corresponding to the corresponding audio data difference value from the current output position of the audio data.
In this embodiment, when receiving a corresponding audio data difference value, first determining whether the corresponding audio data difference value is smaller than zero or larger than zero, and if the corresponding audio data difference value is smaller than zero, it indicates that the playing progress of the current slave device is slower than the reference progress, and it is necessary to add the corresponding audio data difference value to the playing progress of the current slave device, so that the playing progress of the current slave device is consistent with the reference progress. If the corresponding audio data difference is greater than zero, it indicates that the playing progress of the current slave device is slower than the reference progress, and the playing progress of the current slave device needs to be deleted from the corresponding audio data difference, so that the playing progress of the current slave device is consistent with the reference progress.
The embodiment determines whether the corresponding audio data difference is smaller than zero or larger than zero; if the corresponding audio data difference value is smaller than zero, inserting the corresponding audio data difference value into the current output position of the audio data; and if the corresponding audio data difference value is larger than zero, deleting the audio data corresponding to the corresponding audio data difference value from the current output position of the audio data. Through the mode, the audio data buffers from the audio output positions of different sound channels to the audio acquisition position are consistent in size, and therefore synchronization between the wireless sound boxes of different sound channels is achieved.
The invention further provides a method for synchronizing data among the multi-channel wireless sound boxes, which is applied to the main equipment.
Referring to fig. 3, fig. 3 is a flowchart illustrating 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:
step S150, starting an audio acquisition module to acquire audio data, and numbering the audio data acquired each time;
step S160, after the connection is established with the slave device which requests the connection, the audio data of the corresponding sound channel is sent to the slave device which is successfully connected;
step S170, when the number of the successfully connected slave devices reaches a preset value, the information of the current output position of the audio data of the slave device and the corresponding audio data number is acquired and sent to the successfully connected slave devices;
step S180, after acquiring the current output position of the audio data sent by the connected slave equipment and the corresponding audio data number, selecting a reference number;
step S190, comparing the audio data number of the audio data output position sent by the connected slave device with the reference number, obtaining a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave device.
In this embodiment, before the audio acquisition module is started to acquire audio data, after the master device is connected to a power supply and turned on, the slave device may be notified of "the master is on the fly" in a cyclic broadcast manner, and the time interval of the cyclic broadcast is T1. T1 may be set according to a particular audio output. And then starting an audio acquisition module to acquire audio data, and numbering the audio data acquired each time. And unifying the data numbers of different sound channels collected at the same time. And then receiving a connection request of the slave equipment, connecting the slave equipment which sends the connection request, and sending the audio data of the corresponding sound channel after numbering to the slave equipment which is successfully connected. And when the number of the connected slave devices reaches a preset value, transmitting the cyclic broadcast for acquiring the current output position of the audio data of the slave devices and the corresponding audio data numbers to the slave devices. The preset values are more than 2, and the specific values can be set according to the number of slave devices which need to be synchronously output. When the number of connections reaches a preset value, the current output position of each slave device needs to be acquired, so that the audio data of the slave device can be acquired through the loop broadcast, and the audio data of the slave device is transmitted to the slave device which is successfully connected. And selecting the reference number after acquiring the current output position of the audio data sent by the connected slave equipment and the corresponding audio data number. And then comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave equipment.
In the embodiment, the audio data is acquired by starting the audio acquisition module, and the audio data acquired each time is numbered; after establishing connection with the slave equipment requesting connection, sending the audio data of the corresponding sound channel to the slave equipment successfully connected; when the number of the successfully connected slave devices reaches a preset value, the information of the current output position of the audio data of the slave devices and the corresponding audio data numbers is acquired and sent to the successfully connected slave devices; acquiring the current output position of audio data sent by connected slave equipment and a corresponding audio data number, and selecting a reference number; and comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave equipment. By the mode, firstly, the audio acquisition module is started to acquire audio data, and the audio data acquired each time are numbered; then receiving a connection request of the slave equipment, connecting the connection request with the slave equipment which sends the connection request, and sending the audio data of the corresponding sound channel to the slave equipment which is successfully connected; when the number of the successfully connected slave devices reaches a preset value, sending the cyclic broadcast for acquiring the current output position of the audio data of the slave devices and the corresponding audio data numbers to the successfully connected slave devices; after the current output position of the audio data sent by the connected slave equipment and the corresponding audio data number are obtained, a reference number is selected; and comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave equipment. In order to adjust the output position from the device.
Further, referring to fig. 4, fig. 4 is a detailed flowchart of the step of selecting a reference number in fig. 3.
Based on the second embodiment of the method for synchronizing data between multi-channel wireless sound boxes of the present invention, the step S180 may include:
step S181, sequencing the audio data numbers corresponding to the acquired audio data output positions;
step S182, extracting the audio data number of the median in the audio data numbers corresponding to the audio data output positions, and taking the audio data number of the median as a reference number.
In this embodiment, after the audio data numbers corresponding to the obtained audio data output positions are obtained, the audio data numbers corresponding to the obtained audio data output positions are sorted first, then the audio data number of the median in the audio data numbers corresponding to the audio data output positions is extracted, and the audio data number of the median is used as a reference number. So as to achieve data output synchronization of the respective slave devices.
Further, referring to fig. 5, fig. 5 is a detailed flowchart illustrating a step of comparing the audio data number of the audio data output position sent by the connected slave device with the reference number in fig. 3 to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave device.
Based on the second embodiment of the method for synchronizing data between multi-channel wireless speakers according to the present invention, 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 value is larger than zero or smaller than zero, the corresponding audio data difference value is sent to the corresponding slave device;
in step S193, if the corresponding audio data difference is equal to zero, the corresponding audio data difference 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 subtracted from the reference number in sequence to obtain the corresponding audio data difference. If the corresponding audio data difference value is greater than zero or less than zero, it indicates that the corresponding slave device is inconsistent with the output position corresponding to the reference number, and adjustment is required, so that the corresponding audio data difference value needs to be sent to the corresponding slave device. If the corresponding audio data difference value is equal to zero, it indicates that the output position of the corresponding slave device is consistent with that of the device corresponding to the reference number, and no adjustment is needed, so that the corresponding audio data difference value equal to zero can be ignored.
The invention further provides a system for data synchronization among the multi-channel wireless sound boxes, which comprises the master equipment and the slave equipment.
Referring to fig. 6, fig. 6 is a functional module diagram of a system for synchronizing data between multi-channel wireless speakers according to a first embodiment of the present invention.
In this embodiment, the slave device includes:
the first sending module 110 is configured to send an audio data request for obtaining a corresponding channel to the host device after the host device is successfully connected to the host device.
In this embodiment, the slave device is a wireless sound box, and the number of the wireless sound boxes may be two or more; the main device can be an intelligent television or a set top box and the like. In order to ensure that the present embodiment can be normally implemented, each slave device of the master device needs to be connected to a power supply first, and then the master device is turned on. And monitoring the master equipment, and when monitoring the message broadcasting of 'the host is in operation', if the current slave equipment is not connected with the master equipment, sending a request for connecting with the master equipment. And after the connection is successful, sending a request for acquiring the audio data of the channel corresponding to the current slave equipment to the master equipment.
The first receiving module 120 is configured to receive the audio data of the corresponding channel sent by the master device, and receive the broadcast information sent by the master device and used for acquiring the current output position and the corresponding number of the slave device audio data.
After the request for acquiring the audio data of the channel corresponding to the current slave equipment is sent to the master equipment, the audio data of the channel corresponding to the master equipment is received, and the broadcast information for acquiring the current output position and the corresponding number of the audio data of the slave equipment is received.
And a second sending module 130, configured to send the current output position of the audio data and the corresponding number to the master device according to the broadcast information.
And when receiving broadcast information sent by the master equipment for acquiring the current output position and the corresponding number of the audio data of the slave equipment, sending the current output position and the corresponding number of the audio data to the master equipment according to the broadcast information.
The adjusting module 140 is configured to receive a corresponding audio data difference calculated by the master device according to the current output position of the audio data and the corresponding number, and adjust the current output position of the audio data according to the corresponding audio data difference.
And after the master equipment calculates the current output positions and the corresponding numbers of the audio data sent by the slave equipment, obtaining the audio data difference values of the slave equipment, and sending the audio data difference values to the slave equipment. And the slave equipment receives the audio data difference value and adjusts the current audio data output position according to the audio data difference value. Thereby realizing synchronous output among the slave devices.
In the embodiment, after the connection with the main device is successful, the audio data request for acquiring the corresponding sound channel is sent to the main device; receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment; sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information; and receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value. According to the mode, firstly, the connection request is sent to the main equipment, and after the connection with the main equipment is successful, the audio data request for acquiring the corresponding sound channel is sent to the main equipment; then receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment; sending the current output position and the corresponding number of the audio data to the main equipment; and receiving a corresponding audio data difference value calculated by the main equipment through the current audio data output position and the corresponding serial number, and adjusting the current audio data output position according to the corresponding audio data difference value. Therefore, synchronous output with other wireless sound boxes is realized.
Further, referring to fig. 7, fig. 7 is a schematic diagram of a detailed functional module of the adjusting module in fig. 6.
Based on the first embodiment of the system for synchronizing data between multi-channel wireless speakers according to the present invention, the adjusting module 140 may include:
a judging unit 141, configured to judge whether the corresponding audio data difference is smaller than zero or larger than zero;
an inserting unit 142, 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 smaller than zero;
a deleting unit 143, configured to delete the audio data corresponding to the corresponding audio data difference from the current output position of the audio data if the corresponding audio data difference is greater than zero.
In this embodiment, when receiving a corresponding audio data difference value, first determining that the corresponding audio data difference value is smaller than zero or larger than zero, and if the corresponding audio data difference value is smaller than zero, it indicates that the playing progress of the current slave device is slower than the reference progress, and it is necessary to add the corresponding audio data difference value to the playing progress of the current slave device, so that the playing progress of the current slave device is consistent with the reference progress. If the corresponding audio data difference is greater than zero, it indicates that the playing progress of the current slave device is slower than the reference progress, and the playing progress of the current slave device needs to be deleted from the corresponding audio data difference, so that the playing progress of the current slave device is consistent with the reference progress.
The embodiment determines whether the corresponding audio data difference is smaller than zero or larger than zero; if the corresponding audio data difference value is smaller than zero, inserting the corresponding audio data difference value into the current output position of the audio data; and if the corresponding audio data difference value is larger than zero, deleting the audio data corresponding to the corresponding audio data difference value from the current output position of the audio data. Through the mode, the audio data buffers from the audio output positions of different sound channels to the audio acquisition position are consistent in size, and therefore data synchronization between the wireless sound boxes of different sound channels is achieved.
Further, referring to fig. 8, fig. 8 is a functional module diagram of a system for synchronizing data between multi-channel wireless speakers according to a second embodiment of the present invention.
In this embodiment, the master device includes:
the starting module 150 is used for starting the audio acquisition module to acquire audio data and numbering the audio data acquired each time;
a third sending module 160, configured to send the audio data of the corresponding channel to a successfully connected slave device after establishing a connection with the slave device that requests the connection;
the fourth sending module 170, configured to send information of obtaining a current output position of audio data of the slave device and a corresponding audio data number to the successfully connected slave device when the number of the successfully connected slave devices reaches a preset value;
a selecting module 180, configured to obtain a current output position of audio data sent by a connected slave device and a corresponding audio data number, and select a reference number;
the comparing module 190 is configured to compare the audio data number of the audio data output position 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 slave device.
In this embodiment, before the audio acquisition module is started to acquire audio data, after the master device is connected to a power supply and turned on, the slave device may be notified of "the master is on the fly" in a cyclic broadcast manner, and the time interval of the cyclic broadcast is T1. T1 may be set according to a particular audio output. And then starting an audio acquisition module to acquire audio data, and numbering the audio data acquired each time. And unifying the data numbers of different sound channels collected at the same time. And then receiving a connection request of the slave equipment, connecting the slave equipment which sends the connection request, and sending the audio data of the corresponding sound channel after numbering to the slave equipment which is successfully connected. And when the number of the connected slave devices reaches a preset value, transmitting the cyclic broadcast for acquiring the current output position of the audio data of the slave devices and the corresponding audio data numbers to the slave devices. The preset values are more than 2, and the specific values can be set according to the number of slave devices which need to be synchronously output. When the number of connections reaches a preset value, the current output position of each slave device needs to be acquired, so that the audio data of the slave device can be acquired through the loop broadcast, and the audio data of the slave device is transmitted to the slave device which is successfully connected. And selecting the reference number after acquiring the current output position of the audio data sent by the connected slave equipment and the corresponding audio data number. And then comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave equipment.
In the embodiment, the audio data is acquired by starting the audio acquisition module, and the audio data acquired each time is numbered; after establishing connection with the slave equipment requesting connection, sending the audio data of the corresponding sound channel to the slave equipment successfully connected; when the number of the successfully connected slave devices reaches a preset value, the information of the current output position of the audio data of the slave devices and the corresponding audio data numbers is acquired and sent to the successfully connected slave devices; acquiring the current output position of audio data sent by connected slave equipment and a corresponding audio data number, and selecting a reference number; and comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave equipment. By the mode, firstly, the audio acquisition module is started to acquire audio data, and the audio data acquired each time are numbered; then receiving a connection request of the slave equipment, connecting the connection request with the slave equipment which sends the connection request, and sending the audio data of the corresponding sound channel to the slave equipment which is successfully connected; when the number of the successfully connected slave devices reaches a preset value, sending the cyclic broadcast for acquiring the current output position of the audio data of the slave devices and the corresponding audio data numbers to the successfully connected slave devices; after the current output position of the audio data sent by the connected slave equipment and the corresponding audio data number are obtained, a reference number is selected; and comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave equipment. In order to adjust the output position from the device.
Further, referring to fig. 9, fig. 9 is a schematic diagram of a detailed functional module of a selected module in fig. 8.
Based on the second embodiment of the system for synchronizing data between multi-channel wireless speakers according to the present invention, the selecting module 180 may include:
the sorting unit 181 is configured to sort audio data numbers corresponding to the acquired audio data output positions;
an extracting unit 182 for extracting the audio data number of the median among the audio data numbers corresponding to the audio data output positions, and taking the audio data number of the median as a reference number.
In this embodiment, after the audio data numbers corresponding to the obtained audio data output positions are obtained, the audio data numbers corresponding to the obtained audio data output positions are sorted first, then the audio data number of the median in the audio data numbers corresponding to the audio data output positions is extracted, and the audio data number of the median is used as a reference number. So as to achieve data output synchronization of the respective slave devices.
Further, referring to fig. 10, fig. 10 is a schematic diagram of a detailed functional module of the comparison module in fig. 8.
Based on the second embodiment of the system for synchronizing data between multi-channel wireless speakers according to the present invention, the comparing module 190 may include:
a subtracting unit 191 configured to subtract the reference number from the audio data number of the audio data output position sent by the connected slave device, and obtain a corresponding audio data difference;
a sending unit 192, configured to send the corresponding audio data difference value to a corresponding slave device if the corresponding audio data difference value is greater than zero or smaller than zero;
an ignoring unit 193, 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 subtracted from the reference number in sequence to obtain the corresponding audio data difference. If the corresponding audio data difference value is greater than zero or less than zero, it indicates that the corresponding slave device is inconsistent with the output position corresponding to the reference number, and adjustment is required, so that the corresponding audio data difference value needs to be sent to the corresponding slave device. If the corresponding audio data difference value is equal to zero, it indicates that the output position of the corresponding slave device is consistent with that of the device corresponding to the reference number, and no adjustment is needed, so that the corresponding audio data difference value equal to zero can be ignored.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for synchronizing data between multi-channel wireless sound boxes is applied to slave equipment, and is characterized by comprising the following steps:
after the connection with the main equipment is successful, sending an audio data request for acquiring a corresponding sound channel to the main equipment;
receiving audio data of a corresponding sound channel sent by the main equipment, and receiving broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment;
sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information;
and receiving a corresponding audio data difference value obtained by comparing the current output position of the audio data and the corresponding number with the reference number after the reference number is selected by the main equipment, and adjusting the current output position of the audio data according to the corresponding audio data difference value.
2. The method as claimed in claim 1, wherein the step of receiving the audio data difference calculated by the master device according to the current output position of the audio data and the corresponding serial number, and adjusting the current output position of the audio data according to the audio data difference comprises:
judging whether the corresponding audio data difference value is smaller than zero or larger than zero;
if the corresponding audio data difference value is smaller than zero, inserting the corresponding audio data difference value into the current output position of the audio data;
and if the corresponding audio data difference value is larger than zero, deleting the audio data corresponding to the corresponding audio data difference value from the current output position of the audio data.
3. A method for synchronizing data between multi-channel wireless sound boxes is applied to a main device, and is characterized by comprising the following steps:
starting an audio acquisition module to acquire audio data, and numbering the audio data acquired each time;
after establishing connection with the slave equipment requesting connection, sending the audio data of the corresponding sound channel to the slave equipment successfully connected;
when the number of the successfully connected slave devices reaches a preset value, the information of the current output position of the audio data of the slave devices and the corresponding audio data numbers is acquired and sent to the successfully connected slave devices;
acquiring the current output position of audio data sent by connected slave equipment and a corresponding audio data number, and selecting a reference number;
comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value, and sending the corresponding audio data difference value to the corresponding slave equipment;
wherein, the step of selecting the reference number comprises:
sequencing the audio data numbers corresponding to the obtained audio data output positions;
and extracting the audio data number of the median in the audio data numbers corresponding to the audio data output positions, and taking the audio data number of the median as a reference number.
4. The method of claim 3, wherein the comparing the audio data number of the audio data output position transmitted from the connected slave device with the reference number to obtain a corresponding audio data difference value and transmitting the corresponding audio data difference value to the corresponding slave device comprises:
subtracting the reference number from the audio data number of the audio data output position sent by the connected slave equipment to obtain a corresponding audio data difference value;
if the corresponding audio data difference value is larger than zero or smaller than zero, the corresponding audio data difference value is sent to the corresponding slave equipment;
and if the corresponding audio data difference value is equal to zero, ignoring the corresponding audio data difference value.
5. 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:
the first sending module is used for sending an audio data request for acquiring a corresponding sound channel to the main equipment after the connection with the main equipment is successful;
the first receiving module is used for receiving the audio data of the corresponding sound channel sent by the main equipment and receiving the broadcast information which is sent by the main equipment and used for acquiring the current output position and the corresponding number of the audio data of the slave equipment;
the second sending module is used for sending the current output position and the corresponding number of the audio data to the main equipment according to the broadcast information;
and the adjusting module is used for receiving a corresponding audio data difference value obtained by the main equipment through comparison between the current audio data output position and the corresponding number after the reference number is selected and the reference number, and adjusting the current audio data output position according to the corresponding audio data difference value.
6. The system of claim 5, wherein the adjustment module comprises:
the judging unit is used for judging whether the corresponding audio data difference value is smaller than zero or larger than zero;
the inserting unit is used for inserting the corresponding audio data difference value into the current output position of the audio data if the corresponding audio data difference value is smaller than zero;
and the deleting unit is used for deleting 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 larger than zero.
7. A system for data synchronization between multi-channel wireless sound boxes, the system comprises a master device and a slave device, wherein the master device comprises:
the starting module is used for starting the audio acquisition module to acquire audio data and numbering the audio data acquired each time;
the third sending module is used for sending the audio data of the corresponding sound channel to the slave equipment which is successfully connected after the connection is established with the slave equipment which requests the connection;
the fourth sending module is used for sending the information of the current output position of the audio data of the slave equipment and the corresponding audio data number to the slave equipment which is successfully connected when the number of the slave equipment which is successfully connected reaches a preset value;
the selection module is used for acquiring the current output position of the audio data sent by the connected slave equipment and the corresponding audio data number and selecting a reference number;
the comparison module is used for comparing the audio data number of the audio data output position sent by the connected slave equipment with the reference number to obtain a corresponding audio data difference value and sending the corresponding audio data difference value to the corresponding slave equipment;
wherein, the selection module comprises:
the sequencing unit is used for sequencing the audio data numbers corresponding to the obtained audio data output positions;
and the extraction unit is used for extracting the audio data number of the median in the audio data numbers corresponding to the audio data output positions and taking the audio data number of the median as a reference number.
8. The system of claim 7, wherein the comparing module comprises:
the subtracting unit is used for subtracting the audio data number of the audio data output position sent by the connected slave equipment from the reference number to obtain a corresponding audio data difference value;
the sending unit is used for sending the corresponding audio data difference value to the corresponding slave equipment if the corresponding audio data difference value is larger than zero or smaller than zero;
and the ignoring unit is used for ignoring the corresponding audio data difference value if the corresponding audio data difference value is equal to zero.
CN201611034167.5A 2016-11-16 2016-11-16 Method and system for synchronizing data between multi-channel wireless sound boxes Active CN106454635B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611034167.5A CN106454635B (en) 2016-11-16 2016-11-16 Method and system for synchronizing data between multi-channel wireless sound boxes
PCT/CN2016/112914 WO2018090461A1 (en) 2016-11-16 2016-12-29 Method and system for synchronizing data between multichannel wireless speakers

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN106454635A CN106454635A (en) 2017-02-22
CN106454635B true CN106454635B (en) 2020-04-24

Family

ID=58221508

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (5)

* 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
CN113613221B (en) * 2021-04-26 2023-09-08 珠海市杰理科技股份有限公司 TWS master device, TWS slave device, audio device and system

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60121930T2 (en) * 2000-04-08 2007-07-26 Sun Microsystems, Inc., Santa Clara METHOD FOR STREAMING A SINGLE MEDIA TRACK TO SEVERAL CLIENTS
KR100754210B1 (en) * 2006-03-08 2007-09-03 삼성전자주식회사 Method and apparatus for reproducing multi channel sound using cable/wireless device
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
CN102739661B (en) * 2012-06-18 2015-07-15 深圳市云动创想科技有限公司 Method and system for network audio sync output on basis of data statistics
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
CN103338204B (en) * 2013-07-05 2016-12-28 深圳市云动创想科技有限公司 A kind of audio synchronization output method and system
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
CN104333429B (en) * 2014-10-22 2017-06-16 小米科技有限责任公司 Realize the synchronous method and device of clock
CN105992025B (en) * 2015-02-15 2019-09-27 湖南汇德电子有限公司 System time calibration method, audio sync playback method and the device played based on audio sync
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
CN105847926A (en) * 2016-03-31 2016-08-10 乐视控股(北京)有限公司 Multimedia data synchronous playing method and device

Also Published As

Publication number Publication date
WO2018090461A1 (en) 2018-05-24
CN106454635A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106454635B (en) Method and system for synchronizing data between multi-channel wireless sound boxes
CN110741651B (en) Methods, systems, and media for presenting notifications indicating recommended content
CN106331562B (en) Cloud server, control device and audio and video synchronization method
JP2021530927A (en) Establishing and using interpolation-based time mapping with low-rate fingerprinting to help facilitate frame-accuracy content correction
CN108259948B (en) Method and device for playing live broadcast audio and video, computer and storage medium
CN109379613B (en) Audio and video synchronization adjustment method, television, computer readable storage medium and system
KR20170009981A (en) Video remote-commentary synchronization method and system, and terminal device
CN112203106B (en) Live broadcast teaching method and device, computer equipment and storage medium
CN114402572B (en) Using in-band metadata as a basis for accessing reference fingerprints to facilitate content-related actions
CN105684085A (en) Information processing apparatus, method, and program
CN109521988B (en) Audio playing synchronization method and device
CN105282602A (en) Data processing method, apparatus and mobile terminal equipment
RU2013143046A (en) SYSTEM AND METHOD FOR TRANSFER OF IMAGES IN REAL TIME
CN105052163A (en) Reproduction device and data reproduction method
CN104079958B (en) A kind of method of video broadcast synchronous with multichannel audio
CN110324413B (en) Method, device and storage medium for special effect synchronization
CN103517044B (en) Video conference device and the method for lip-sync thereof
KR20180083572A (en) Electronic apparatus and control method thereof
CN104038812A (en) Information push method and device
CN109525873B (en) Audio playing synchronization method and device
US20130051389A1 (en) Apparatus and method for broadcast in system performing inter-device direct communication
CN107277593A (en) With screen video broadcasting method and device
KR101946471B1 (en) Apparatus and method for synchronizing video and audio
US11785405B2 (en) Systems and methods for automatic synchronization of content between a player system and a listener system
US9148648B2 (en) Apparatus and method for providing images in wireless communication system and portable display apparatus and method for displaying images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant