CN109560913B - Method and device for data time synchronization between Bluetooth audio devices - Google Patents

Method and device for data time synchronization between Bluetooth audio devices Download PDF

Info

Publication number
CN109560913B
CN109560913B CN201811360827.8A CN201811360827A CN109560913B CN 109560913 B CN109560913 B CN 109560913B CN 201811360827 A CN201811360827 A CN 201811360827A CN 109560913 B CN109560913 B CN 109560913B
Authority
CN
China
Prior art keywords
bluetooth
audio data
audio
data
host
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
CN201811360827.8A
Other languages
Chinese (zh)
Other versions
CN109560913A (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.)
Zhuhai Huilian Technology Co ltd
Original Assignee
Zhuhai Huilian 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 Zhuhai Huilian Technology Co ltd filed Critical Zhuhai Huilian Technology Co ltd
Priority to CN201811360827.8A priority Critical patent/CN109560913B/en
Publication of CN109560913A publication Critical patent/CN109560913A/en
Application granted granted Critical
Publication of CN109560913B publication Critical patent/CN109560913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors
    • H04L7/0033Correction by delay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0079Receiver details

Abstract

The invention relates to a method and a device for synchronizing data time between Bluetooth audio equipment, wherein the Bluetooth audio equipment comprises an audio sending device, a Bluetooth host and a Bluetooth auxiliary machine and is used for realizing that: the Bluetooth host receives the audio data sent by the audio sending device, executes decoding and recoding, and sends the audio data and the recorded played points to the Bluetooth auxiliary machine; the Bluetooth auxiliary machine receives the coded audio data, the played points and the data receiving and sending delay time, decodes the audio data to obtain audio data cache, and sends a playing instruction to the Bluetooth main machine; after the Bluetooth host receives the playing instruction for a certain time, the Bluetooth host and the Bluetooth auxiliary machine synchronously play audio data. The invention has the beneficial effects that: the relative time delay between the main ear and the auxiliary ear is reduced to the maximum extent; the clock asynchronization exists between the main ear and the auxiliary ear, and the problem of data rate asynchronization of the auxiliary ear in real time processing is solved; the method does not depend on a Bluetooth clock, directly refers to the playing progress, and maximally reduces the relative delay between the main ear and the auxiliary ear.

Description

Method and device for data time synchronization between Bluetooth audio devices
Technical Field
The invention relates to a method and a device for synchronizing data time between Bluetooth audio devices, and belongs to the field of computers.
Background
The Bluetooth audio frequency is widely applied in the fields of Bluetooth earphones, Bluetooth sound boxes and the like. However, when the bluetooth mobile phone or the bluetooth computer is equal to the bluetooth device, one audio source only establishes one transmission channel, but can transmit the audio data of two sound channels. Therefore, when in use, the Bluetooth device decodes the received audio data into double channels and then plays the audio data through the two playing devices. As shown in particular in figure 1.
At present, as shown in fig. 2, in a new product, two channels are separated into different playing devices, and the bluetooth host receives and processes audio data and transmits the audio data to the bluetooth secondary machine in a wireless bluetooth-in manner.
In the existing scheme, when the bluetooth host and the bluetooth secondary machine perform audio data communication, a played first audio data packet is synchronized, and a main ear and a secondary ear of the synchronization method use a bluetooth clock as a reference clock, define a bluetooth time point when the first data packet is well played, and play the first audio data packet at the same time after the time is up, and play subsequent data later.
The disadvantages of the existing scheme are that: because the time between the main unit and the auxiliary unit is not synchronous:
(1) the main ear and the auxiliary ear can generate new relative delay between the appointment of the synchronization of the first data packet and the arrival of the playing time;
(2) the subsequent data of the main and the auxiliary are played in turn according to the first data, and the time delay between the main and the auxiliary becomes larger along with the time change.
Disclosure of Invention
The invention provides a method and a device for synchronizing data time between Bluetooth audio devices. The invention is used for time synchronization of audio data transmitted between two Bluetooth devices, and ensures that the relative time delay of the audio played by the two Bluetooth devices is very small during playing.
The technical scheme of the invention comprises a method for synchronizing data time between Bluetooth audio equipment, wherein the Bluetooth audio equipment comprises an audio sending device, a Bluetooth host and a Bluetooth auxiliary machine, and the method is characterized in that: s1, the Bluetooth host receives the audio data sent by the audio sending device, decodes and recodes the audio data, records the played points and sends the recoded audio data to the Bluetooth auxiliary machine; s2, the Bluetooth auxiliary machine receives the coded audio data, the played points and the data receiving and sending delay time, further decodes the coded audio data to obtain audio data cache, and sends a playing instruction to the Bluetooth main machine; and S3, after the Bluetooth host receives the playing instruction for a certain time, the Bluetooth host and the Bluetooth auxiliary set synchronously play the audio data.
According to the method for data time synchronization between bluetooth audio devices, step S1 specifically includes: and setting a counter on the Bluetooth host, wherein the counter is used for recording the played points, reading the played points on the current counter when the Bluetooth host sends the decoded audio data, and sending the played points to the Bluetooth auxiliary machine.
The method for data time synchronization between Bluetooth audio devices, wherein the method further comprises: and when the Bluetooth host and the Bluetooth auxiliary machine play new audio data in sequence, resetting the counter.
According to the method for data time synchronization between bluetooth audio devices, step S2 specifically includes: and a counter is arranged on the Bluetooth auxiliary machine, and when the recorded played points sent by the Bluetooth host are received, the Bluetooth auxiliary machine and the Bluetooth host are synchronized to play the points.
According to the method for data time synchronization between bluetooth audio devices, step S3 specifically includes: and after the Bluetooth auxiliary machine sends a playing instruction, the audio data in the cache is read and played after the first preset time, and the Bluetooth main machine plays the audio data after receiving the audio data after the second preset time, wherein the second preset time is the first preset time and the data receiving and sending delay time.
The technical solution of the present invention also includes an apparatus for performing data time synchronization between bluetooth audio devices according to any of the above methods, the apparatus including: the Bluetooth host control unit is used for receiving the audio data sent by the audio sending device by using the Bluetooth host, executing decoding and recoding, and sending the recoded audio data and the recorded played points to the Bluetooth auxiliary machine; the Bluetooth auxiliary machine control unit is used for receiving the encoded audio data, the played points and the data receiving and sending delay time by using the Bluetooth auxiliary machine, further decoding the encoded audio data to obtain audio data cache, and sending a playing instruction to the Bluetooth host machine; and the synchronizing unit is used for synchronously playing the audio data for the Bluetooth host and the Bluetooth auxiliary machine after the Bluetooth host receives the playing instruction for a certain time.
According to the device for data time synchronization between the Bluetooth audio devices, the Bluetooth host and the Bluetooth auxiliary set play with the same code rate, and the number of the audio data represents the playing progress.
According to the device for data time synchronization between the Bluetooth audio devices, the Bluetooth host and the Bluetooth auxiliary machine are two independent Bluetooth supporting devices.
The invention has the beneficial effects that: the relative time delay between the main ear and the auxiliary ear is reduced to the maximum extent; for the problem that clocks are asynchronous between the main ears and the auxiliary ears, the data rate of the auxiliary ears is asynchronous when the auxiliary ears are processed in real time; the method does not depend on a Bluetooth clock, directly refers to the playing progress, and maximally reduces the relative delay between the main ear and the auxiliary ear.
Drawings
FIG. 1 shows a general flow diagram of a method according to the invention;
FIG. 2 is a schematic diagram of data interaction between a Bluetooth master and a Bluetooth slave according to an embodiment of the present invention;
FIG. 3 is a flowchart of a Bluetooth host according to an embodiment of the present invention;
fig. 4 is a flowchart of a bluetooth sub-unit according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention comprises a method and a device for data time synchronization between Bluetooth audio devices, which are applied to Bluetooth audio application products, wherein the products are that a mobile phone transmits audio data to a main Bluetooth device, the main Bluetooth device transmits the audio data to an auxiliary Bluetooth device, and the main device and the auxiliary device play audio simultaneously. The invention is used for time synchronization of audio data transmitted between two Bluetooth devices, and ensures that the relative time delay of the audio played by the two Bluetooth devices is very small during playing. The conception, the specific structure and the technical effects of the present invention will be clearly and completely described in conjunction with the embodiments and the accompanying drawings to fully understand the objects, the schemes and the effects of the present invention.
It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature or indirectly fixed or connected to the other feature. Furthermore, the descriptions of upper, lower, left, right, etc. used in the present disclosure are only relative to the mutual positional relationship of the constituent parts of the present disclosure in the drawings. As used in this disclosure, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any combination of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element of the same type from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the present disclosure. The use of any and all examples, or exemplary language ("e.g.," such as "or the like") provided herein, is intended merely to better illuminate embodiments of the invention and does not pose a limitation on the scope of the invention unless otherwise claimed.
Fig. 1 shows a general flow chart of the method according to the invention. Wherein bluetooth audio equipment includes audio frequency transmitting device, bluetooth host computer and bluetooth auxiliary engine, its characterized in that: s1, the Bluetooth host receives the audio data sent by the audio sending device, decodes and recodes the audio data, records the played points and sends the recoded audio data to the Bluetooth auxiliary machine; s2, the Bluetooth auxiliary machine receives the coded audio data, the played points and the data receiving and sending delay time, further decodes the coded audio data to obtain audio data cache, and sends a playing instruction to the Bluetooth main machine; and S3, after the Bluetooth host receives the playing instruction for a certain time, the Bluetooth host and the Bluetooth auxiliary set synchronously play the audio data.
Fig. 2 is a schematic diagram illustrating data interaction between a bluetooth master and a bluetooth slave according to an embodiment of the present invention. The main and auxiliary earphones are provided with counters for playing points and used for recording the played points. When the main earphone and the auxiliary earphone play a new play, firstly, the counter is cleared by 0;
the audio data of the host is transmitted to the auxiliary machine after being coded, and the playing points of the audio are obtained while the audio data are transmitted and transmitted to the auxiliary machine;
after the auxiliary machine receives the playing points, the playing points in the time delay caused by data receiving and sending are added, namely the points which should be played in the current time of the auxiliary machine. The playing is controlled according to the control, so that the synchronization of the playing between the main machine and the auxiliary machine can be realized;
because the whole process does not need to calculate the Bluetooth time and can be realized by hardware, the uncertainty caused by software control can be avoided, and the minimum relative delay of the main earphone and the auxiliary earphone is realized;
the Bluetooth host and the Bluetooth auxiliary machine are two independent devices supporting Bluetooth.
Fig. 3 is a flowchart of a bluetooth host according to an embodiment of the present invention. Comprises the following steps
S31, audio connection is established between the host computer and the mobile phone as well as between the host computer and the auxiliary computer;
s32, the host receives the audio data of the mobile phone;
s33, decoding the audio data by the host;
s34, the host recodes the decoded audio data;
s35, the host sends the recoded number and the played audio point number to the auxiliary machine in a packaging way;
s36, the host starts playing after waiting for a period of time or when the auxiliary machine buffers data to a certain threshold, wherein the threshold time can be preset;
and S37, playing the audio data under each Bluetooth clock.
Fig. 4 is a flowchart of a bluetooth sub-unit according to an embodiment of the present invention.
Comprises the following steps
S31, establishing data connection between the auxiliary machine and the mobile phone;
s32, the auxiliary machine receives the audio data of the host and the audio points played by the host;
s33, when the synchronous host Bluetooth clock of the auxiliary machine is the same as the data playing time, triggering the playing of the audio;
s34, the slave unit sends the played points and the cached points to the host unit.
It should be recognized that embodiments of the present invention can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, according to the methods and figures described in the detailed description. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, the operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
A computer program can be applied to input data to perform the functions described herein to transform the input data to generate output data that is stored to non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.

Claims (6)

1. A method for data time synchronization between Bluetooth audio equipment, wherein the Bluetooth audio equipment comprises an audio sending device, a Bluetooth host and a Bluetooth auxiliary machine, is characterized in that:
s1, the Bluetooth host receives the audio data sent by the audio sending device, decodes and recodes the audio data, records the played points and sends the recoded audio data to the Bluetooth auxiliary machine; the step S1 specifically includes: setting a counter on the Bluetooth host, wherein the counter is used for recording the number of played points, reading the number of played points on the current counter when the Bluetooth host sends decoded audio data, and sending the number of played points to the Bluetooth auxiliary machine; the method further comprises the following steps: when the Bluetooth host and the Bluetooth auxiliary machine play new audio data in sequence, resetting the counter;
s2, the Bluetooth auxiliary machine receives the coded audio data, the played points and the data receiving and sending delay time, further decodes the coded audio data to obtain audio data cache, and sends receiving conditions or playing instruction information to the Bluetooth main machine;
and S3, after the Bluetooth host receives the playing instruction information or starts to send data for a certain time, the Bluetooth host and the Bluetooth auxiliary machine synchronously play audio data.
2. The method for data time synchronization between bluetooth audio devices according to claim 1, wherein the step S2 specifically includes:
and a counter is arranged on the Bluetooth auxiliary machine, and when the recorded played points sent by the Bluetooth host are received, the Bluetooth auxiliary machine and the Bluetooth host are synchronized to play the points.
3. The method for data time synchronization between bluetooth audio devices according to claim 1, wherein the step S3 specifically includes:
and after the Bluetooth auxiliary machine sends a playing instruction, the audio data in the cache is read and played after a first preset time, and after the Bluetooth main machine receives the audio data, the audio data is played after a second preset time, wherein the second preset time = the first preset time-data receiving and sending delay time.
4. An apparatus for performing time synchronization of data between bluetooth audio devices according to any of the methods of claims 1-3, the apparatus comprising:
the Bluetooth host control unit is used for receiving the audio data sent by the audio sending device by using the Bluetooth host, executing decoding and recoding, and sending the recoded audio data and the recorded played points to the Bluetooth auxiliary machine;
the Bluetooth auxiliary machine control unit is used for receiving the encoded audio data, the played points and the data receiving and sending delay time by using the Bluetooth auxiliary machine, further decoding the encoded audio data to obtain audio data cache, and sending a playing instruction to the Bluetooth host machine;
and the synchronizing unit is used for synchronously playing the audio data for the Bluetooth host and the Bluetooth auxiliary machine after the Bluetooth host receives the playing instruction for a certain time.
5. The apparatus of claim 4, wherein the Bluetooth host and the Bluetooth auxiliary set use the same code rate to play, and the number of audio data indicates the progress of playing.
6. The apparatus of claim 4, wherein the Bluetooth host and the Bluetooth sub-unit are two independent Bluetooth enabled devices.
CN201811360827.8A 2018-11-15 2018-11-15 Method and device for data time synchronization between Bluetooth audio devices Active CN109560913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811360827.8A CN109560913B (en) 2018-11-15 2018-11-15 Method and device for data time synchronization between Bluetooth audio devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811360827.8A CN109560913B (en) 2018-11-15 2018-11-15 Method and device for data time synchronization between Bluetooth audio devices

Publications (2)

Publication Number Publication Date
CN109560913A CN109560913A (en) 2019-04-02
CN109560913B true CN109560913B (en) 2021-08-03

Family

ID=65866319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811360827.8A Active CN109560913B (en) 2018-11-15 2018-11-15 Method and device for data time synchronization between Bluetooth audio devices

Country Status (1)

Country Link
CN (1) CN109560913B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110430561A (en) * 2019-07-30 2019-11-08 上海富芮坤微电子有限公司 A kind of connection method of true wireless headset
CN110753284A (en) * 2019-10-24 2020-02-04 珠海慧联科技有限公司 Wireless earphone communication method and system and wireless earphone
CN113613125A (en) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 Audio synchronization control method and device, audio equipment and system
CN117793874A (en) * 2022-09-22 2024-03-29 联发科技股份有限公司 Audio enhancement method and corresponding device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108111997B (en) * 2017-12-15 2020-12-08 珠海市杰理科技股份有限公司 Bluetooth device audio synchronization method and system

Also Published As

Publication number Publication date
CN109560913A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
CN109560913B (en) Method and device for data time synchronization between Bluetooth audio devices
KR102183413B1 (en) Method and system for presenting content using a plurality of electronic devices
EP3036911B1 (en) Method, terminal, and system for reproducing content
CN108829627B (en) Synchronous control method and system between virtual reality devices
JP2016536710A (en) Desktop cloud-based media control method and device
WO2014085369A1 (en) Methods, apparatuses and computer readable medium for triggering a gesture recognition mode and device pairing and sharing via non-touch gestures
US9936355B2 (en) Information processing apparatus, information processing method, and computer program
WO2017107427A1 (en) Terminal equipment control method, device, and equipment, and non-volatile computer storage medium
CN109918038B (en) Audio playing speed synchronization method and system
CN106717079B (en) Clock synchronization using WIFI beacons
CN112154669A (en) Correlation of video stream frame timestamps based on system clock
US9913033B2 (en) Synchronization of independent output streams
CN106843932B (en) Method and system for upgrading firmware of virtual reality equipment
CN108769815B (en) Video processing method and device
CN108289232B (en) Control method of playing device, terminal device and storage medium
US9819295B2 (en) Time control system and time control method for multiple motors
CN104837046A (en) Multi-media file processing method and device
EP3905725A1 (en) Information processing device, information processing method, and information processing program
US20190386762A1 (en) Date processing system and method
EP3896555B1 (en) Information processing device, information processing system, information processing method, and program
CN113035246B (en) Audio data synchronous processing method and device, computer equipment and storage medium
KR20150056120A (en) Method for controlling audio output and Apparatus supporting the same
US20170223382A1 (en) Method of reducing latency and a video decoder of the same
CN109986552B (en) Robot action control method, intelligent terminal and device with storage function
CN111193570A (en) Method, device, system, medium and electronic equipment for executing instructions

Legal Events

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