CN109379653B - Audio transmission method and device, electronic equipment and storage medium - Google Patents

Audio transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109379653B
CN109379653B CN201811161378.4A CN201811161378A CN109379653B CN 109379653 B CN109379653 B CN 109379653B CN 201811161378 A CN201811161378 A CN 201811161378A CN 109379653 B CN109379653 B CN 109379653B
Authority
CN
China
Prior art keywords
bluetooth
bluetooth headset
distance
headset
earphone
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
CN201811161378.4A
Other languages
Chinese (zh)
Other versions
CN109379653A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811161378.4A priority Critical patent/CN109379653B/en
Publication of CN109379653A publication Critical patent/CN109379653A/en
Priority to PCT/CN2019/094931 priority patent/WO2020063017A1/en
Application granted granted Critical
Publication of CN109379653B publication Critical patent/CN109379653B/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
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Abstract

The application discloses an audio transmission method and device, electronic equipment and a storage medium, and relates to the technical field of electronic equipment. Wherein, the method comprises the following steps: receiving audio data; judging whether a first Bluetooth headset and a second Bluetooth headset which are simultaneously connected to the electronic equipment are worn by the same user; if so, sending left channel data corresponding to the audio data to a first Bluetooth headset, and sending right channel data corresponding to the audio data to a second Bluetooth headset; and if not, respectively sending stereo data corresponding to the audio data to the first Bluetooth earphone and the second Bluetooth earphone. According to the scheme, the transmission of the audio data can be determined according to the using condition of the user on the earphone, and the user experience is better.

Description

Audio transmission method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of electronic devices, and more particularly, to an audio transmission method and apparatus, an electronic device, and a storage medium.
Background
With the development of electronic equipment technology and wireless connection technology, the technology development of the bluetooth headset is more mature and the application is more and more extensive. Wherein, bluetooth headset passes through bluetooth wireless connection to electronic equipment, alright receive the audio data of electronic equipment transmission and carry out the audio playback, and data transmission between earphone and the electronic equipment no longer relies on wired connection, has greatly improved the convenience of using. However, in the use process of the existing bluetooth headset, the transmitted data cannot be adjusted according to the actual use condition of the headset by a user, and the user experience is influenced.
Disclosure of Invention
In view of the foregoing problems, the present application provides an audio transmission method, an audio transmission apparatus, an electronic device, and a storage medium to solve the foregoing problems.
In a first aspect, an embodiment of the present application provides an audio transmission method applied to an electronic device, where the method includes: receiving audio data; judging whether a first Bluetooth headset and a second Bluetooth headset which are simultaneously connected to the electronic equipment are worn by the same user; if so, sending left channel data corresponding to the audio data to a first Bluetooth headset, and sending right channel data corresponding to the audio data to a second Bluetooth headset; and if not, respectively sending stereo data corresponding to the audio data to the first Bluetooth earphone and the second Bluetooth earphone.
In a second aspect, an embodiment of the present application provides an audio transmission apparatus, which is applied to an electronic device, and the apparatus includes: the audio receiving module is used for receiving audio data; the judgment module is used for judging whether a first Bluetooth headset and a second Bluetooth headset which are connected to the electronic equipment at the same time are worn by the same user or not; the first sending module is used for sending left channel data corresponding to the audio data to the first Bluetooth headset and sending right channel data corresponding to the audio data to the second Bluetooth headset if the first Bluetooth headset and the second Bluetooth headset which are connected to the electronic equipment at the same time are worn by the same user; and the second sending module is used for sending the stereo data corresponding to the audio data to the first Bluetooth headset and the second Bluetooth headset respectively if the first Bluetooth headset and the second Bluetooth headset which are connected to the electronic equipment at the same time are not worn by the same user.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more programs. Wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium, in which program codes are stored, and the program codes can be called by a processor to execute the method as described above.
According to the audio transmission method and device, the electronic equipment and the storage medium, the sending of the audio data is determined according to whether the two Bluetooth earphones connected to the electronic equipment are worn by the same user within the preset threshold range. If a first Bluetooth earphone and a second Bluetooth earphone which are connected to the electronic equipment at the same time are worn by the same user, left channel data corresponding to the audio data are sent to the first Bluetooth earphone, and right channel data corresponding to the audio data are sent to the second Bluetooth earphone. And if the first Bluetooth earphone and the second Bluetooth earphone which are connected to the electronic equipment at the same time are not worn by the same user, respectively sending stereo data corresponding to the audio data to the first Bluetooth earphone and the second Bluetooth earphone. According to the scheme provided by the embodiment of the application, the transmission mode of the audio data can be determined according to the actual use condition of the user on the earphone. When two bluetooth headset are used by different users, two users can hear stereo respectively, and when two bluetooth headset were used by same user, two ears of user can hear the left track one, and the right track is heard to one, produces better stereo sense of hearing and experiences.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating a connection between an electronic device and a bluetooth headset according to an embodiment of the present application;
fig. 2 shows another connection diagram of the electronic device and the bluetooth headset according to the embodiment of the present application;
fig. 3 shows a flowchart of an audio transmission method according to an embodiment of the present application.
Fig. 4 shows a flowchart of an audio transmission method according to another embodiment of the present application.
Fig. 5 shows a schematic diagram of a positional relationship between an electronic device and a bluetooth headset according to an embodiment of the present application.
Fig. 6 is a flowchart illustrating a part of the steps of an audio transmission method according to another embodiment of the present application.
Fig. 7 shows a flowchart of an audio transmission method according to another embodiment of the present application.
Fig. 8 is a functional block diagram of an audio transmission device according to an embodiment of the present application.
Fig. 9 shows a block diagram of an electronic device provided in an embodiment of the present application.
Fig. 10 is a storage unit according to an embodiment of the present application, configured to store or carry program code for implementing an audio transmission method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
With the increase of the types of audio playing devices and the improvement of playing sound effects, more users can select to output audio played by electronic devices such as mobile phones and tablet computers to the audio playing devices for playing. Common audio playing devices include a vehicle-mounted music player, a sound box, an earphone, and the like. Wherein, the earphone comprises a wired earphone or a wireless earphone.
Take an earphone as an example. If the earphone is a wired earphone, the wired earphone is connected with the electronic device through a physical line, and the electronic device transmits audio to the wired earphone through the physical line so that the wired earphone can play the audio conveniently.
In order to release the use of the earphone from the wired condition, the connection between the earphone and the electronic equipment is independent of a physical line, the use convenience of the earphone is improved, and the wireless earphone is produced. The wireless earphone establishes a communication link according to a wireless communication protocol commonly supported by the wireless earphone and the electronic equipment in advance, and then the electronic equipment transmits audio to the wireless earphone through the communication link so that the wireless earphone can play the audio. The wireless communication protocol may include a WLAN protocol, a bluetooth protocol, or a ZigBee protocol, and the application takes a wireless headset connected through the bluetooth protocol in the wireless headset as an example for description.
In the embodiment of the present application, the headset that can establish a bluetooth connection with other devices such as an electronic device through a bluetooth protocol and perform data transmission is defined as a bluetooth headset, such as a TWS (true Wireless stereo) headset and a TWS Plus headset.
An electronic device can be connected with a Bluetooth headset through a Bluetooth protocol, and can also be connected with two Bluetooth headsets in a parallel or serial mode. The parallel connection is, as shown in fig. 1, the electronic device 500 directly and simultaneously performs bluetooth connection with two bluetooth headsets; the serial connection is, as shown in fig. 2, the electronic device 500 is bluetooth connected to one of the bluetooth headsets, and the bluetooth headset connected to the electronic device is bluetooth connected to another bluetooth headset.
When the electronic device 500 is connected with a bluetooth headset and audio playing is performed, sending audio data to the bluetooth headset for playing; when the electronic device 500 is connected to two bluetooth headsets, the audio data can be sent to the two bluetooth headsets simultaneously, so that the two bluetooth headsets can play. When the electronic device 500 is connected to two bluetooth headsets, if the electronic device 500 is connected in parallel, the electronic device 500 may directly and simultaneously send audio data to the two bluetooth headsets; if the two bluetooth headsets are connected in series, the electronic device 500 may send the audio data to be sent to the two bluetooth headsets to the headset connected to the bluetooth headset through the bluetooth, and the headset connected to the bluetooth headset forwards the audio data to be sent to the other bluetooth headset.
In the embodiment of the present application, the electronic device 500 is mainly connected to two bluetooth headsets for example.
Generally, the electronic device 500 is connected to two bluetooth headsets, and if the played audio data includes left channel data and right channel data, the left channel data is sent to one of the bluetooth headsets, and the right channel data is sent to one of the bluetooth headsets. Here, the left channel data and the right channel data may be the same audio data having a phase difference, that is, the sound wave of the sound of the left channel generated from the left channel data and the sound wave of the sound of the right channel generated from the right channel data are sound waves having the same period, frequency, and amplitude, but having a phase difference. When the Bluetooth headset plays audio, one Bluetooth headset plays the sound of the left sound channel, one Bluetooth headset plays the sound of the right sound channel, and the sounds of the two sound channels generally have a certain phase difference and are spread to corresponding ears of people, so that a user can generate good stereo hearing experience.
The inventor has found through research that, in a case where the electronic device 500 can connect two bluetooth headsets, the two bluetooth headsets are not necessarily used by the same user. For example, after two bluetooth headsets are connected to the electronic device 500, two users respectively wear one bluetooth headset to listen to music together. At this time, if one earphone sends left channel data and one earphone sends right channel data, both users can only hear the sound corresponding to one channel, and the sound has no stereoscopic impression, which affects the user experience.
Therefore, the inventor proposes the audio transmission method, apparatus, electronic device 500 and storage medium provided in the embodiments of the present application, and determines whether the audio data sent to the two bluetooth headsets should be monaural data or stereo data by determining whether the two bluetooth headsets are worn by the same user.
The following describes in detail an audio transmission method, an audio transmission apparatus, an electronic device 500, and a storage medium according to embodiments of the present application.
Referring to fig. 3, an embodiment of the present application provides an audio transmission method, in which the audio data sent to two bluetooth headsets is determined by whether the two bluetooth headsets are worn by the same user. Specifically, the method comprises the following steps:
step S110: audio data is received.
And receiving audio data to be played. The audio data may be audio data of various applications, such as music played by a music application, an audio portion of a video application, etc.; other audio frequencies are also possible, such as alarm clocks, ringing, talking and other system tones, etc. The specific received audio data is used as the audio transmitted to the headset through bluetooth, and the specific received audio data is not limited in the embodiment of the present application, and may be all the audio in the electronic device 500, or some audio determined according to the user setting.
Step S120: it is determined whether the first bluetooth headset 710 and the second bluetooth headset 720, which are simultaneously connected to the electronic device 500, are worn by the same user. If yes, go to step S130; if not, go to step S140.
The electronic device 500 may be simultaneously connected to two bluetooth headsets, defined as a first bluetooth headset 710 and a second bluetooth headset 720, respectively. The electronic device 500 may determine the manner in which to send audio to two bluetooth headsets by determining whether the two bluetooth headsets are worn by the same user.
As an implementation manner, in this embodiment, the electronic device 500 may determine whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 connected to the electronic device 500 is within a preset threshold range when audio data is received. That is, the execution of step S120 may follow step S10. The judgment may be performed once when the audio data is received, or may be performed in real time, or may be performed every predetermined time period.
As another implementation manner, in this embodiment, in the case that the electronic device 500 is connected to two bluetooth headsets at the same time, that is, whether the distance between the two bluetooth headsets is within the preset threshold range is determined. That is, whether the audio data is received or not is judged whether the distance between the two bluetooth headsets is within the preset range, and when the audio data is received, the sending mode of the audio data can be determined according to the judgment result. In this embodiment, the determination may be in real time or may be every predetermined time period.
Step S130: and sending left channel data corresponding to the audio data to the first bluetooth headset 710, and sending right channel data corresponding to the audio data to the second bluetooth headset 720.
If two bluetooth headset are worn by same user, then can send left channel data and right channel data to two bluetooth headset respectively, make user's left ear and the right ear that use this bluetooth headset listen to the sound of left sound channel and the sound of right sound channel respectively to form stereophonic sense of hearing experience.
Alternatively, a bluetooth headset worn by the left ear of the two bluetooth headsets may be defined as the first bluetooth headset 710, and a bluetooth headset worn by the right ear may be defined as the second bluetooth headset 720. The left channel data is sent to the first bluetooth headset 710 and the right channel data is sent to the second bluetooth headset 720.
Of course, in the embodiment of the present application, which one of the two bluetooth headsets is the first bluetooth headset 710 and which one of the two bluetooth headsets is the second bluetooth headset 720 is not limited in the embodiment of the present application, and therefore, the left channel data may be sent to any one of the two bluetooth headsets, and the right channel data may be sent to the other one of the two bluetooth headsets.
In which the electronic device 500 transmits audio data to the bluetooth headset, the audio data needs to be encoded into a file that can be transmitted through bluetooth. For example, the transmitted audio data is data in MP3 format, and it needs to go through two decoding and one encoding processes to realize the playing of bluetooth headset. Specifically, the electronic device 500 decompresses the file in the MP3 format into the file in the PCM format, encodes the file in the PCM format into the file in the bluetooth transmittable format, such as the file in the AAC format, the SBC format, the apt-X format, and transmits the file to the bluetooth headset through the bluetooth protocol with the bluetooth headset. The Bluetooth headset decodes the received file into a PCM format file for playing.
Optionally, if the audio data is stereo data, the audio data includes left channel data and right channel data, but the left channel data and the right channel data are mixed together. For example, the audio data is a recording file of a PCM file, assuming that the sampling rate of the audio data is 16K, the recording type is audio format. The data structure of the pcm file is approximately a cross-store of a 2 byte (byte) left channel and a 2 byte right channel, i.e. a 2 byte left channel, a 2 byte right channel, and so on. Therefore, the left channel data and the right channel data can be respectively taken out according to the storage characteristics of the left channel data and the right channel data in the stereo data. The extracted left channel data is then transmitted to the first bluetooth headset 710 and the extracted right channel data is transmitted to the second bluetooth headset 720.
However, if the audio data includes left channel data and right channel data that are separated from each other, the left channel data may be directly transmitted to the first bluetooth headset 710 and the extracted right channel data may be transmitted to the second bluetooth headset 720.
Step S140: and respectively sending stereo data corresponding to the audio data to the first bluetooth headset 710 and the second bluetooth headset 720.
When two bluetooth headsets are not worn by the same user, it may be that the two bluetooth headsets are worn by different users, or that one of the two bluetooth headsets is worn by the user and the other is not worn. In any case, when the two bluetooth headsets are not worn by the same user, if the two bluetooth headsets respectively send different monaural data, the user cannot hear the complete stereo data.
Therefore, in the embodiment of the present application, if the two bluetooth headsets are not worn by the same user, the two bluetooth headsets transmit stereo data corresponding to the audio data, so that the two bluetooth headsets play stereo respectively, and still have good stereoscopic impression.
If the audio data itself is stereo data, the audio data is sent to the first bluetooth headset 710 and the second bluetooth headset 720.
And if the left channel data and the right channel data in the audio data are separated, fusing the left channel data and the right channel data into stereo data and then sending the stereo data to the two Bluetooth earphones. Taking the recording file with the format of pcm file as an example, if the left channel data and the right channel data are separated from each other, stereo data can be obtained by circularly fusing 2 bytes of left channel, 2 bytes of right channel, and the like.
In the embodiment of the application, the audio data is transmitted according to the actual use condition of the earphone by the user. Specifically, when the two bluetooth headsets are worn by the same user, the left channel data and the right channel data are respectively sent to the two bluetooth headsets. And when the two Bluetooth earphones are not worn by the same user, the stereo data is respectively sent to the two Bluetooth earphones. Therefore, no matter the user wears one Bluetooth headset or two Bluetooth headsets, the user hears the sound of the stereo sound, the stereo sound has good stereoscopic impression, and the user experience is improved.
The audio transmission method provided by the embodiment of the application further comprises the step of judging whether the distance between the two Bluetooth earphones is within a preset range or not, and judging whether the two Bluetooth earphones are worn by the same user or not. Specifically, referring to fig. 4, the audio transmission method includes:
step S210: audio data is received.
Step S220: it is determined whether a distance between the first bluetooth headset 710 and the second bluetooth headset 720 simultaneously connected to the electronic device 500 is within a preset threshold range. If yes, go to step S230; if not, go to step S240.
When two bluetooth headsets are worn by the same user, the distance between the two bluetooth headsets is substantially equal to the distance between the ears of the wearer. When the two bluetooth headsets are worn by different users, the distance between the two users is larger or smaller, and the situation that the distance between the two bluetooth headsets is equal to the distance between the two ears of the same user is less. I.e. two bluetooth headsets worn by different users, or one bluetooth headset worn by a user and the other bluetooth headset not worn by the user, the distance between the two bluetooth headsets is usually not equal to the distance between the ears of the same wearer. Accordingly, it is possible to determine whether both the first bluetooth headset 710 and the second bluetooth headset 720 connected to the electronic device 500 are worn by the same user by determining whether the distance between the two headsets is within a preset threshold range. If the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range, it can be determined that the two bluetooth headsets are worn by the same user. If the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is not within the preset threshold range, it can be determined that the users are not wearing the same bluetooth headset.
The preset threshold range is a pre-stored range representing the distance between two ears of a person. The distance between the two ears belonging to the same user is characterized by the preset threshold range.
As an embodiment, the preset threshold range may be obtained through big data statistics and stored in the electronic device 500. Specifically, in this embodiment, distances between ears of a large number of users may be counted, and the distance range may be determined based on the statistical result. The distance range between the maximum distance and the minimum distance in all the statistical results can be used as a preset threshold range; or a distance range formed by the distances with higher occurrence probability in the statistical result can be used as a preset threshold range. Or determining the distance range which can be between the two ears of the human body as the preset threshold range according to the existing human body physiology knowledge.
As an embodiment, the preset threshold range may also be a distance range input by the user, or a distance range determined according to a distance value input by the user. In particular, a user interaural distance input interface may be provided for a user to input the distance between their ears. If the user inputs a distance range, the distance range is stored as a preset threshold range. If the user inputs a distance value, the preset distance may be added or subtracted on the basis of the distance value to form a distance range due to a difference in the measurement error, such as wearing posture of the headset, and the like, where the distance value input by the user is subtracted by 3 cm as a minimum value in a distance range and added by 3 cm as a maximum value in the distance range. The distance range is stored as a preset threshold range.
As an embodiment, the preset fish-roe range may also be obtained by acquiring a face image of the user by the electronic device 500 and then performing calculation through two ear images in the face image. Specifically, the user may be prompted to place a reference object (e.g., a coin) of a known length into the image capturing area for capturing the face image. That is, the obtained face image includes the reference object and the face image. Therefore, the distance between the two ears can be calculated according to the ratio of the distance between the two ears in the face image and the length of the reference object and the actual length of the reference object. After the distance between the two ears is obtained through the face image, a preset distance which may form errors can be added or subtracted on the basis of the distance to form a distance range, and the distance range is used as a preset threshold range.
And judging whether the two Bluetooth earphones are worn by the same user or not according to the preset threshold range and the distance between the two Bluetooth earphones. Specifically, it may be determined whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within a preset threshold range. If the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range, it can be determined that the same user wears the same bluetooth headset; if the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is not within the preset threshold range, it is determined that the users are not wearing the same bluetooth headset.
In the embodiment of the present disclosure, before determining whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range, the distance between the first bluetooth headset 710 and the second bluetooth headset 720 may be obtained.
For one embodiment, the electronic device 500 may obtain the distance between the first bluetooth headset 710 and the second bluetooth headset 720 through a positioning algorithm.
Specifically, the position relationships of the first bluetooth headset 710 and the second bluetooth headset 720 with respect to the electronic device 500 may be obtained through a positioning algorithm. And then, calculating the distance between the first bluetooth headset 710 and the second bluetooth headset 720 according to the position relationship between the electronic device 500 and the first bluetooth headset 710 and the position relationship between the electronic device 500 and the second bluetooth headset 720.
Alternatively, the positioning algorithm may be a positioning algorithm based on the arrival time Of the signal between the bluetooth headset and the electronic device 500, such as toa (time Of arrival); may be a location algorithm based on the time Difference Of arrival Of signals between the bluetooth headset and the electronic device 500, such as tdoa (time Difference Of arrival); may be an algorithm based on the signal arrival angle, such as aoa (angle of arrival), etc., and is not limited in the embodiment of the present application.
The position relationship between the electronic device 500 and the bluetooth headset is obtained according to a positioning algorithm, wherein the position relationship can be represented by a positioning parameter, such as a coordinate parameter. And then calculates the distance between the first bluetooth headset 710 and the second bluetooth headset 720 according to the position relationship. For example, the position relationship between the electronic device 500 and the first and second bluetooth headsets 710 and 720 is represented by coordinates, and then the coordinates of the first and second bluetooth headsets 710 and 720 can be obtained, so that the distance between the first and second bluetooth headsets 710 and 720 can be calculated.
Alternatively, the distances between the two bluetooth headsets and the electronic device 500 may be calculated first. And then, the distance between the two bluetooth headsets is calculated according to the angle relationship between the two bluetooth headsets and the electronic device 500. That is, the electronic device 500 may acquire a distance from the first bluetooth headset 710, defined as a first distance; an angular relationship with the first bluetooth headset 710 is obtained, defined as a first angle. The electronic device 500 may further obtain a distance to the second bluetooth headset 720, defined as a second distance; the angular relationship with the second bluetooth headset 720 is acquired as the second angle. Accordingly, a triangle formed by the electronic device 500, the first bluetooth headset 710 and the second bluetooth headset 720 can be determined according to the first distance, the first angle, the second distance and the second angle, and the distance between the first bluetooth headset 710 and the second bluetooth headset 720 in the triangle is calculated.
The distances from the two bluetooth headsets to the electronic device 500 may also be obtained through a positioning algorithm. The RSSI (Received signal strength Indicator) technique is taken as an example for description. The RSSI value corresponding to a bluetooth signal between the bluetooth headset and the electronic device 500 decreases in proportion to d (the distance between the signal receiving device and the signal transmitting device). The distance between the bluetooth headset and the electronic device 500 may be calculated according to the relationship of the RSSI value varying with the distance and the RSSI value of the signal received by the electronic device 500. The method mainly comprises the step of directly converting a signal strength value received by a node into a distance value through an experience or theoretical model formula of a propagation signal. For example, it is calculated by the formula d ═ 10^ ((abs (rssi) -a)/(10 ×) n), where d is the distance and the unit is m. RSSI is the signal strength value, which is negative. A is the absolute value of the RSSI value at 1 meter from the probe device, which may range between 45-49. n is an environmental attenuation factor requiring test rectification and can range from 3.25 to 4.5.
In addition, the angles of the two bluetooth headsets relative to the electronic device 500 can be obtained according to the received signals. For example, based on AOA (Angle of Arrival) technology, the Arrival direction of the bluetooth headset transmission signal received by the electronic device 500 is acquired, and the relative orientation or Angle between the electronic device 500 and the bluetooth headset is calculated.
As another embodiment, the distance between the first bluetooth headset 710 and the second bluetooth headset 720 may be obtained by sending a distance obtaining instruction to at least one of the two bluetooth headsets by the electronic device 500, so as to instruct the bluetooth headset receiving the distance obtaining instruction to obtain the distance to the other bluetooth headset and feed the distance back to the electronic device 500. The bluetooth headset receiving the distance acquisition instruction acquires the distance between the bluetooth headset and another bluetooth headset, and the acquisition mode may refer to the distance acquisition mode described above, which is not described herein again. The bluetooth headset that acquires the distance according to the distance acquisition instruction returns the distance to the electronic device 500, and the electronic device 500 receives the distance between the first bluetooth headset 710 and the second bluetooth headset 720 that returns in response to the distance acquisition instruction.
For example, the electronic device 500 sends a distance acquisition command to the first bluetooth headset 710, and the first bluetooth headset 710 receives the distance acquisition command and acquires the distance between the first bluetooth headset 710 and the second bluetooth headset 720. The first bluetooth headset 710 returns the acquired distance to the electronic device 500, so that the electronic device 500 acquires the distance between the first bluetooth headset 710 and the second bluetooth headset 720.
Certainly, in the embodiment of the present application, the manner of obtaining the distance between two bluetooth headsets may further include other manners, such as ultrasonic positioning, infrared positioning, wireless high-fidelity positioning, ultra-wideband positioning, Zigbee technology positioning, and the like.
After obtaining the distances between the first bluetooth headset 710 and the second bluetooth headset 720, the electronic device 500 may determine whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within a preset threshold range. That is, it is determined whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is less than or equal to the maximum value of the preset threshold range and greater than or equal to the minimum value of the preset threshold range.
In the embodiment of the present application, the position relationship between two bluetooth headsets and the electronic device 500 can be as shown in fig. 5, where a represents the electronic device 500, B represents one bluetooth headset, and C represents another bluetooth headset. AB denotes the distance between the electronic device 500 and the bluetooth headset B, AC denotes the distance between the electronic device 500 and the bluetooth headset C, and BC denotes the distance between the two bluetooth headsets. AC-AB is smaller than BC according to that the difference between the two sides of the triangle is smaller than the third side, that is, the difference between the distances between the two bluetooth headsets and the electronic device 500 is smaller than the distance value between the two bluetooth headsets. Therefore, if the difference between the distances between the two bluetooth headsets and the electronic device 500 is greater than the maximum value in the preset threshold range, the distance between the two bluetooth headsets should be greater than the maximum value in the preset threshold range, and the distance between the two bluetooth headsets is not within the preset threshold range.
Therefore, in order to save computation time and resources to a certain extent, in the embodiment of the present application, it is determined whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within a preset threshold range, and it may be determined whether the distance difference between the distances between the two bluetooth headsets and the electronic device 500 is greater than the maximum value in the preset threshold range.
Specifically, as shown in fig. 6, the determining process may include:
step S221: the electronic device 500 obtains a first distance from the first bluetooth headset 710 and the electronic device 500 obtains a second distance from the second bluetooth headset 720.
The electronic device 500 obtains a distance to the first bluetooth headset 710 and a distance to the second bluetooth headset 720. The specific acquisition mode is not limited, and reference can be made to the foregoing description. For example, the electronic device 500 may obtain a first distance from the first bluetooth headset 710 according to the signal strength with the first bluetooth headset 710; the electronic device 500 may obtain the second distance from the second bluetooth headset 720 according to the signal strength with the second bluetooth headset 720.
Step S222: and judging whether the difference value between the first distance and the second distance is larger than the maximum value in the preset threshold range. If not, go to step S223; if yes, go to step S226.
The electronic device 500 then determines whether the difference is greater than a maximum value of the preset threshold values. If the difference is greater than the maximum value in the preset threshold range, it can be determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is greater than the maximum value in the preset threshold range. At this time, a determination result of whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range may be obtained, that is, in step S226, it is determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is not within the preset threshold range, and the distance between the first bluetooth headset 710 and the second bluetooth headset 720 may not be calculated according to the parameters such as the angle.
If the difference is not larger than the maximum value in the preset threshold range, the distance between the two earphones is further calculated, and whether the distance is in the preset threshold range or not is judged. Specifically, as shown in step S223 to step S225.
Step S223: a first angle of the first bluetooth headset 710 with respect to the electronic device 500 is obtained, and a second angle of the second bluetooth headset 720 with respect to the electronic device 500 is obtained.
Step S224: the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is calculated in combination with the first distance, the first angle, the second distance, and the second angle.
The distance between the two bluetooth headsets is calculated according to the angle relationship between the electronic device 500 and the two bluetooth headsets, which may specifically refer to the foregoing description and is not repeated herein.
Step S225: and judging whether the distance between the first Bluetooth headset 710 and the second Bluetooth headset 720 is within a preset threshold range.
Step S226: determining that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is not within the preset threshold range.
Step S230: and sending left channel data corresponding to the audio data to the first bluetooth headset 710, and sending right channel data corresponding to the audio data to the second bluetooth headset 720.
Step S240: and respectively sending stereo data corresponding to the audio data to the first bluetooth headset 710 and the second bluetooth headset 720.
In the embodiment of the present application, when two bluetooth headsets are worn by two users respectively, or one headset is worn by one user and the other headset is placed, the distance between the two bluetooth headsets may also be within a preset threshold range by the activity of the user, so that a misjudgment that the two bluetooth headsets are worn by two users originally but are judged to be worn by the same user may occur.
And the user's activity does not generally last the distance between the two bluetooth headsets within a preset threshold range. Therefore, optionally, in the embodiment of the present application, in the determination process, under the condition that it is determined for the first time that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range, the manner of sending the audio data to the two bluetooth headsets is not changed. Within a preset time length, if the judgment result still keeps that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within a preset threshold range, the left channel data corresponding to the audio data is sent to the first bluetooth headset 710, and the right channel data corresponding to the audio data is sent to the second bluetooth headset 720.
The first determination may be that, in the previous determination, the determination result is that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is not within the preset threshold range, and the determination result is that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range, and the determination result is used as the first determination. That is, when it is determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range for the first time, the stereo data corresponding to the audio data is transmitted to the first bluetooth headset 710 and the second bluetooth headset 720, respectively. In a preset time period, the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is kept within a preset threshold range, and then the stereo data corresponding to the audio data is respectively sent to the first bluetooth headset 710 and the second bluetooth headset 720.
In this embodiment, by determining whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 simultaneously connected to the electronic device 500 is within a preset threshold range, it is determined whether the first bluetooth headset 710 and the second bluetooth headset 720 simultaneously connected to the electronic device 500 are worn by the same user. When the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range, it is determined that the first bluetooth headset 710 and the second bluetooth headset 720 are worn by the same user, the first bluetooth headset 710 transmits left channel data corresponding to the audio data, and transmits right channel data corresponding to the audio data to the second bluetooth headset 720. When the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is not within the preset threshold range, it is determined that the first bluetooth headset 710 and the second bluetooth headset 720 are not worn by the same user, and stereo data corresponding to the audio data is respectively sent to the first bluetooth headset 710 and the second bluetooth headset 720.
In this embodiment, it can be further determined whether the two bluetooth headsets are worn by the same user according to the fact that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 connected to the electronic device 500 at the same time is kept unchanged. Specifically, referring to fig. 7, the method includes:
step S310: receiving audio data;
step S320: it is determined whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 remains the same. If yes, go to step S330; if not, go to step S340.
When two bluetooth headsets are not worn by the same user, the distance between the two bluetooth headsets typically changes due to the user's activity. When the two Bluetooth earphones are worn by the same user, the two Bluetooth earphones are positioned at two ears of the user, and the distance between the two Bluetooth earphones is usually unchanged because the distance between the two ears of the user is unchanged. Therefore, in the embodiment of the present application, it is possible to determine whether the first bluetooth headset 710 and the second bluetooth headset 720 simultaneously connected to the electronic device 500 are worn by the same user by determining whether the distance between the two bluetooth headsets changes. If the distance between the two Bluetooth earphones changes, the two Bluetooth earphones are judged not to be worn by the same user. If the distance between the two Bluetooth earphones is kept unchanged, the two Bluetooth earphones are judged to be worn by the same user.
Specifically, the distance between the first bluetooth headset 710 and the second bluetooth headset 720 may be calculated. The calculation may be in real time or every predetermined time period.
In one embodiment, after the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is obtained, it is determined whether the distance is the same as the distance obtained by the previous calculation. If the two signals are the same, it may be determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 remains unchanged; if not, it can be determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is changed.
In order to reduce the influence of the measurement error on the determination result, in the embodiment of the present application, the distances may not be exactly the same, and a preset error may be allowed. The specific value of the allowed preset error is not limited in the embodiment of the present application, such as 0.5 cm.
Optionally, in this embodiment of the application, the distance between the first bluetooth headset 710 and the second bluetooth headset 720 calculated within the first preset time may be stored. In order to reduce the problem that the two earphones are not worn by the same user, but the user is gradually moving, so that the distance between the two earphones is gradually changed, and the two earphones are judged to be worn by the same user by mistake. In this embodiment of the present application, when the distance between the first bluetooth headset 710 and the second bluetooth headset 720 obtained by the current calculation and the distance obtained last time have an error value smaller than a preset error, each error corresponding to each distance between the distance obtained by the current calculation and each other distance obtained within a preset time is determined, and if the error greater than or equal to the preset number is greater than the preset error, it is determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 changes.
As another embodiment, the average value of the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is calculated every second preset time or a preset number of times. And judging whether the average value obtained this time is the same as the average value obtained last time. If the two signals are the same, it may be determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 remains unchanged; if not, it can be determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is changed. Of course, in this embodiment, the same between the average values of the distances is not limited to the exact same, and a certain error may be allowed.
Step S330: and sending left channel data corresponding to the audio data to the first bluetooth headset 710, and sending right channel data corresponding to the audio data to the second bluetooth headset 720.
Step S340: and respectively sending stereo data corresponding to the audio data to the first bluetooth headset 710 and the second bluetooth headset 720.
In the embodiment of the application, whether the Bluetooth headset is worn by the same user is judged according to whether the distance between the Bluetooth headsets changes. Therefore, what kind of audio data is sent to the two Bluetooth earphones can be determined according to the judgment result of whether the same user wears the earphones, the data transmitted can be adjusted according to the actual use condition of the user on the earphones, and the user experience is improved.
In the embodiments of the present application, the same or similar steps in each embodiment may be referred to each other, and are not described in detail in the embodiments of the present application.
The embodiment of the present application further provides an audio transmission apparatus 400, which is applied to the electronic device 500. Referring to fig. 8, the apparatus 400 includes an audio receiving module 410 for receiving audio data. The determining module 420 is configured to determine whether the first bluetooth headset 710 and the second bluetooth headset 720 connected to the electronic device 500 are worn by the same user. The first sending module 430 is configured to send left channel data corresponding to the audio data to the first bluetooth headset 710 and send right channel data corresponding to the audio data to the second bluetooth headset 720 if the first bluetooth headset 710 and the second bluetooth headset 720 that are connected to the electronic device 500 are worn by the same user at the same time. The second sending module 440 is configured to send stereo data corresponding to the audio data to the first bluetooth headset 710 and the second bluetooth headset 720 of the electronic device 500, respectively, if the first bluetooth headset 710 and the second bluetooth headset 720 are not worn by the same user.
Optionally, the determining module 420 may be configured to determine whether the first bluetooth headset 710 and the second bluetooth headset 720 that are simultaneously connected to the electronic device 500 are worn by the same user by determining whether a distance between the first bluetooth headset 710 and the second bluetooth headset 720 that are simultaneously connected to the electronic device 500 is within a preset threshold range. Wherein the preset threshold range is a pre-stored range representing a distance between two ears of a person. If the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within the preset threshold range, it can be determined that the same user wears the same bluetooth headset. If the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is not within the preset threshold range, it may be determined that the users are not wearing the same bluetooth headset.
Optionally, the apparatus 400 may further include a distance obtaining module, configured to obtain a distance between the first bluetooth headset 710 and the second bluetooth headset 720.
Optionally, the distance obtaining module may include a position relation obtaining unit, configured to obtain, through a positioning algorithm, position relations of the first bluetooth headset 710 and the second bluetooth headset 720 with respect to the electronic device 500, respectively. A first calculating unit, configured to calculate a distance between the first bluetooth headset 710 and the second bluetooth headset 720 according to a position relationship between the electronic device 500 and the first bluetooth headset 710 and a position relationship between the electronic device 500 and the second bluetooth headset 720.
Optionally, in this embodiment of the application, the distance obtaining module may further include a distance obtaining unit, configured to obtain a first distance between the electronic device 500 and the first bluetooth headset 710 according to the signal strength between the electronic device and the first bluetooth headset 710, and obtain a second distance between the electronic device 500 and the second bluetooth headset 720 according to the signal strength between the electronic device and the second bluetooth headset 720.
The determining module may further include a difference determining unit configured to determine whether a difference between the first distance and the second distance is greater than a maximum value in the preset threshold range. If the result of the difference determination unit is yes, it is determined that the distance between the first bluetooth headset 710 and the second bluetooth headset 720 is not within the preset threshold range.
The distance obtaining module may further include an angle obtaining unit and a second calculating unit, and if the determination result of the difference determining unit is negative, the angle obtaining unit is configured to obtain a first angle of the first bluetooth headset 710 relative to the electronic device 500, and obtain a second angle of the second bluetooth headset 720 relative to the electronic device 500. The second calculating unit is configured to calculate a distance between the first bluetooth headset 710 and the second bluetooth headset 720 by combining the first distance, the first angle, the second distance, and the second angle.
The determining module may further include a distance determining unit, configured to determine whether a distance between the first bluetooth headset 710 and the second bluetooth headset 720 is within a preset threshold range.
Optionally, in this embodiment of the application, the distance obtaining module may further include an instruction sending unit and a receiving unit. The instruction sending unit is configured to send a distance obtaining instruction to at least one of the two bluetooth headsets, so as to instruct the bluetooth headset receiving the distance obtaining instruction to obtain a distance to another bluetooth headset and feed the distance back to the electronic device 500. The receiving unit is used for receiving the distance between the first bluetooth headset 710 and the second bluetooth headset 720 returned in response to the distance acquisition instruction.
Optionally, in this embodiment of the application, the determining module 420 may further determine whether the first bluetooth headset 710 and the second bluetooth headset 720 connected to the electronic device 500 are worn by the same user by determining whether the distance between the first bluetooth headset 710 and the second bluetooth headset 720 remains unchanged. If the judgment result is yes, the user is judged to wear the garment; if the judgment result is negative, the user is judged not to wear the clothes.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Another embodiment of the present application further provides an electronic device 500, where the electronic device 500 may be an electronic device capable of running an application, such as a smart phone, a tablet computer, and a music playing device. Referring to fig. 9, the electronic device 500 includes one or more processors 510 (only one of which is shown), a memory 520, and one or more programs. Wherein the one or more programs are stored in the memory 520 and configured to be executed by the one or more processors 510, the one or more programs configured to perform the methods described in one or more embodiments above.
Processor 510 may include one or more processing cores. The processor 510 interfaces with various components throughout the electronic device 500 using various interfaces and circuitry to perform various functions of the electronic device 500 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 520 and invoking data stored in the memory 520. Alternatively, the processor 510 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 510 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 510, but may be implemented by a communication chip.
The Memory 520 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 520 may be used to store instructions, programs, code sets, or instruction sets. The memory 520 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described above, and the like. The stored data area may also store data created by the electronic device 500 during use (e.g., phone books, audio-visual data, chat log data), and the like.
Referring to fig. 10, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 600 has stored therein program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 600 includes a non-volatile computer-readable storage medium. The computer readable storage medium 600 has storage space for program code 610 for performing any of the method steps described above. The program code can be read from or written to one or more computer program products. The program code 610 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (6)

1. An audio transmission method applied to an electronic device, the method comprising:
the electronic equipment receives audio data;
judging whether the distance between a first Bluetooth headset and a second Bluetooth headset which are connected to the electronic equipment at the same time is changed;
if not, the user is judged to wear the earphone by the same user, left channel data corresponding to the audio data is sent to the first Bluetooth earphone, and right channel data corresponding to the audio data is sent to the second Bluetooth earphone, so that stereo hearing experience is formed;
if the audio data are stereo data, fusing the left channel data and the right channel data into stereo data, and then respectively sending the stereo data to the first Bluetooth earphone and the second Bluetooth earphone;
the method further comprises the following steps:
after the distance between the first Bluetooth earphone and the second Bluetooth earphone is obtained through calculation each time, whether the distance is the same as the distance obtained through calculation at the last time is judged; if the distance between the first Bluetooth earphone and the second Bluetooth earphone is the same as the distance between the first Bluetooth earphone and the second Bluetooth earphone, judging that the distance between the first Bluetooth earphone and the second Bluetooth earphone is unchanged; and if the two Bluetooth earphones are different, judging that the distance between the first Bluetooth earphone and the second Bluetooth earphone is changed.
2. The method of claim 1, further comprising:
acquiring the position relations of the first Bluetooth headset and the second Bluetooth headset relative to the electronic equipment respectively through a positioning algorithm;
and calculating the distance between the first Bluetooth earphone and the second Bluetooth earphone according to the position relationship between the electronic equipment and the first Bluetooth earphone and the position relationship between the electronic equipment and the second Bluetooth earphone.
3. The method of claim 2, wherein the obtaining the distance between the first bluetooth headset and the second bluetooth headset and determining whether the distance between the first bluetooth headset and the second bluetooth headset is within a preset threshold range comprises:
the electronic equipment acquires a first distance between the electronic equipment and a first Bluetooth headset according to the signal intensity between the electronic equipment and the first Bluetooth headset, and acquires a second distance between the electronic equipment and a second Bluetooth headset according to the signal intensity between the electronic equipment and the second Bluetooth headset;
judging whether the difference value between the first distance and the second distance is larger than the maximum value in the preset threshold range or not;
if so, judging that the distance between the first Bluetooth earphone and the second Bluetooth earphone is not within the preset threshold range;
if not, acquiring a first angle of the first Bluetooth headset relative to the electronic equipment, and acquiring a second angle of the second Bluetooth headset relative to the electronic equipment;
calculating the distance between the first Bluetooth headset and the second Bluetooth headset by combining the first distance, the first angle, the second distance and the second angle;
and judging whether the distance between the first Bluetooth headset and the second Bluetooth headset is within a preset threshold range.
4. An audio transmission apparatus, applied to an electronic device, the apparatus comprising:
the audio receiving module is used for receiving audio data by the electronic equipment;
the judgment module is used for judging whether the distance between a first Bluetooth headset and a second Bluetooth headset which are connected to the electronic equipment at the same time changes;
the first sending module is used for judging that a first Bluetooth headset and a second Bluetooth headset which are connected to the electronic equipment at the same time are worn by the same user if the first Bluetooth headset and the second Bluetooth headset are not worn by the same user, sending left channel data corresponding to the audio data to the first Bluetooth headset, and sending right channel data corresponding to the audio data to the second Bluetooth headset;
the second sending module is used for judging that the first Bluetooth headset and the second Bluetooth headset which are simultaneously connected to the electronic equipment are not worn by the same user if the audio data are stereo data, and respectively sending the audio data to the first Bluetooth headset and the second Bluetooth headset if the audio data are stereo data; if the left channel data and the right channel data in the audio data are separated, fusing the left channel data and the right channel data into stereo data and then respectively sending the stereo data to the first Bluetooth earphone and the second Bluetooth earphone;
the judgment module is specifically configured to judge whether the distance between the first bluetooth headset and the second bluetooth headset is the same as the distance obtained by the previous calculation after the distance between the first bluetooth headset and the second bluetooth headset is obtained by each calculation; if the distance between the first Bluetooth earphone and the second Bluetooth earphone is the same as the distance between the first Bluetooth earphone and the second Bluetooth earphone, judging that the distance between the first Bluetooth earphone and the second Bluetooth earphone is unchanged; and if the two Bluetooth earphones are different, judging that the distance between the first Bluetooth earphone and the second Bluetooth earphone is changed.
5. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-3.
6. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 3.
CN201811161378.4A 2018-09-30 2018-09-30 Audio transmission method and device, electronic equipment and storage medium Active CN109379653B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811161378.4A CN109379653B (en) 2018-09-30 2018-09-30 Audio transmission method and device, electronic equipment and storage medium
PCT/CN2019/094931 WO2020063017A1 (en) 2018-09-30 2019-07-05 Audio transmission method and device, electronic apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811161378.4A CN109379653B (en) 2018-09-30 2018-09-30 Audio transmission method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109379653A CN109379653A (en) 2019-02-22
CN109379653B true CN109379653B (en) 2020-12-04

Family

ID=65402859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811161378.4A Active CN109379653B (en) 2018-09-30 2018-09-30 Audio transmission method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109379653B (en)
WO (1) WO2020063017A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379653B (en) * 2018-09-30 2020-12-04 Oppo广东移动通信有限公司 Audio transmission method and device, electronic equipment and storage medium
CN111752372A (en) * 2019-03-28 2020-10-09 深圳市冠旭电子股份有限公司 Action recognition method and device and computer readable storage medium
CN111770403A (en) * 2019-04-01 2020-10-13 炬芯科技股份有限公司 Wireless earphone control method, wireless earphone and control system thereof
CN111770412B (en) * 2019-04-01 2022-04-12 炬芯科技股份有限公司 Wireless earphone control method, wireless earphone and control system thereof
CN112752198B (en) * 2019-10-31 2022-12-20 深圳市冠旭电子股份有限公司 Method, device, terminal and storage medium for controlling earphone to play stereo
CN110830970B (en) * 2019-11-19 2023-05-30 Oppo广东移动通信有限公司 Audio transmission method, device, equipment and storage medium between Bluetooth equipment
CN111372166B (en) * 2020-02-21 2021-10-01 华为技术有限公司 Intelligent left and right ear identification method and related equipment
CN111882846B (en) * 2020-03-05 2021-07-06 珠海市杰理科技股份有限公司 Wireless control method and device, BLE equipment, chip and storage medium
CN111615036B (en) * 2020-04-17 2021-07-23 歌尔科技有限公司 Data processing method and device and electronic equipment
WO2022000317A1 (en) * 2020-06-30 2022-01-06 深圳传音控股股份有限公司 Control method, device and readable storage medium
CN111698607B (en) * 2020-07-03 2022-05-06 歌尔科技有限公司 TWS earphone audio output control method, apparatus, device and medium
CN111681404B (en) * 2020-08-11 2021-01-22 江西斐耳科技有限公司 Communication equipment, earphone and communication equipment main part based on BLE wireless data transmission
CN112040361B (en) * 2020-09-03 2022-05-13 Oppo广东移动通信有限公司 Earphone control method, earphone control device and storage medium
CN112312260A (en) * 2020-10-30 2021-02-02 维沃移动通信有限公司 Wireless earphone and wearing detection method thereof
CN113207052A (en) * 2021-01-28 2021-08-03 珠海市杰理科技股份有限公司 Communication connection method and device, Bluetooth headset, communication system and storage medium
CN115474238A (en) * 2021-06-10 2022-12-13 华为技术有限公司 Data stream transmission method, device, communication device and storage medium
CN113596802A (en) * 2021-08-31 2021-11-02 歌尔科技有限公司 Earphone connection equipment switching method, system and related components
CN114745637A (en) * 2022-04-14 2022-07-12 刘道正 Sound effect realization method of wireless audio equipment
CN116033304B (en) * 2022-08-31 2023-09-29 荣耀终端有限公司 Audio output method, electronic equipment and readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105829950A (en) * 2015-08-19 2016-08-03 深圳市柔宇科技有限公司 Wearable display device

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7418103B2 (en) * 2004-08-06 2008-08-26 Sony Computer Entertainment Inc. System and method for controlling states of a device
CN102927964B (en) * 2012-10-24 2016-02-03 安科智慧城市技术(中国)有限公司 Distance-measuring device, method and vehicle
CN104125522A (en) * 2014-07-18 2014-10-29 北京智谷睿拓技术服务有限公司 Sound track configuration method and device and user device
CN105491469A (en) * 2014-09-15 2016-04-13 Tcl集团股份有限公司 Method and system for controlling audio output mode based on wearing earphone state
CN105101016A (en) * 2015-08-07 2015-11-25 深圳市金立通信设备有限公司 Earphone sound channel switching method and terminal
CN105451111B (en) * 2015-12-10 2019-03-19 小米科技有限责任公司 Earphone control method for playing back, device and terminal
CN105827280A (en) * 2016-04-19 2016-08-03 唐山新质点科技有限公司 Distance measuring method and device
US20180014102A1 (en) * 2016-07-06 2018-01-11 Bragi GmbH Variable Positioning of Distributed Body Sensors with Single or Dual Wireless Earpiece System and Method
CN106597424A (en) * 2016-12-22 2017-04-26 惠州Tcl移动通信有限公司 Distance measuring method and distance measuring system based on dual cameras, and mobile terminal
TW201824880A (en) * 2016-12-29 2018-07-01 瑞昱半導體股份有限公司 Headphone amplifier circuit for headphone speaker and operating method thereof, and headphone device with usb interface using the same
CN106878915B (en) * 2017-02-17 2019-09-03 Oppo广东移动通信有限公司 Control method, device and the playback equipment and mobile terminal of playback equipment
CN106775571A (en) * 2017-03-21 2017-05-31 北京小米移动软件有限公司 Audio frequency playing method and device
CN107707282A (en) * 2017-09-08 2018-02-16 深圳市盛路物联通讯技术有限公司 A kind of wave beam adjustment method and wearable device based on wearable device
CN107613387A (en) * 2017-10-12 2018-01-19 广东小天才科技有限公司 Method, apparatus, playback equipment and the storage medium that control data plays
CN109379653B (en) * 2018-09-30 2020-12-04 Oppo广东移动通信有限公司 Audio transmission method and device, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105829950A (en) * 2015-08-19 2016-08-03 深圳市柔宇科技有限公司 Wearable display device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向可穿戴计算机音频的环境感知系统的研究;杨宇;《中国优秀硕士学位论文全文数据库》;20150315;全文 *

Also Published As

Publication number Publication date
CN109379653A (en) 2019-02-22
WO2020063017A1 (en) 2020-04-02

Similar Documents

Publication Publication Date Title
CN109379653B (en) Audio transmission method and device, electronic equipment and storage medium
CN109246672B (en) Data transmission method, device and system and Bluetooth headset
CN109445740B (en) Audio playing method and device, electronic equipment and storage medium
WO2020019821A1 (en) Microphone hole-blockage detection method and related product
CN108886653B (en) Earphone sound channel control method, related equipment and system
CN109165005B (en) Sound effect enhancement method and device, electronic equipment and storage medium
CN109104684B (en) Microphone hole blockage detection method and related product
CN109413555B (en) Audio output method and device, earphone and electronic equipment
US20210144495A1 (en) Microphone Hole Blockage Detection Method, Microphone Hole Blockage Detection Device, and First Wireless Earphone
CN108777827B (en) Wireless earphone, volume adjusting method and related product
CN109257642A (en) Video resource playback method, device, electronic equipment and storage medium
CN109151211A (en) Method of speech processing, device and electronic equipment
CN109379490A (en) Audio frequency playing method, device, electronic equipment and computer-readable medium
CN110267144A (en) Information processing method and device and storage medium
CN111343558A (en) Microphone hole blockage detection method and related product
US20230364513A1 (en) Audio processing method and apparatus
CN109358832A (en) Audio frequency transmission method, device, electronic equipment and storage medium
US20210176584A1 (en) Audio Processing Method and Apparatus
WO2020063037A1 (en) 3d sound effect processing method and related product
CN108924705B (en) 3D sound effect processing method and related product
CN112969115B (en) Tone quality optimization method of wireless earphone and related equipment
WO2020063027A1 (en) 3d sound effect processing method and related product
CN108882112B (en) Audio playing control method and device, storage medium and terminal equipment
WO2022143268A1 (en) Position recognition method and earphone device
CN113676590A (en) Recording method, recording device, electronic equipment and storage medium

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