CN109445740B - Audio playing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN109445740B
CN109445740B CN201811163030.9A CN201811163030A CN109445740B CN 109445740 B CN109445740 B CN 109445740B CN 201811163030 A CN201811163030 A CN 201811163030A CN 109445740 B CN109445740 B CN 109445740B
Authority
CN
China
Prior art keywords
bluetooth headset
audio data
application
playing
application program
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
CN201811163030.9A
Other languages
Chinese (zh)
Other versions
CN109445740A (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 CN201811163030.9A priority Critical patent/CN109445740B/en
Publication of CN109445740A publication Critical patent/CN109445740A/en
Application granted granted Critical
Publication of CN109445740B publication Critical patent/CN109445740B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • 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
    • H04R1/1041Mechanical or electronic switches, or control elements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Acoustics & Sound (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application discloses an audio playing method, an audio playing device, electronic equipment and a storage medium, wherein the method is applied to the electronic equipment and comprises the following steps: detecting a connection state between the electronic equipment and other equipment; when the electronic equipment is connected with a first Bluetooth headset and a second Bluetooth headset, detecting an application program which currently outputs audio data in the electronic equipment; when detecting that two or more application programs output audio data currently exist, transmitting the audio data output by a first application program of the two or more application programs to the first Bluetooth headset for playing, and transmitting the audio data output by a second application program of the two or more application programs to the second Bluetooth headset for playing. The method can realize that different audio data are respectively played in different earphones, and improves user experience.

Description

Audio playing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic devices, and in particular, to an audio playing method and apparatus, an electronic device, and a storage medium.
Background
Electronic devices, such as computers and mobile phones, have become one of the most common consumer electronic products in daily life. With the development of audio playing devices, music, video, games, and the like can be often listened to, watched, or played through an audio playing device connected to an electronic device. However, when the audio data of two or more applications are played simultaneously in the electronic device, the audio data of only one application can be played, which results in poor user experience.
Disclosure of Invention
In view of the foregoing problems, the present application provides an audio playing method, an audio playing device, an electronic device, and a computer readable storage medium, which can implement that different audio data are respectively played in different earphones, thereby improving user experience.
In a first aspect, an embodiment of the present application provides an audio playing method, which is applied to an electronic device, and the method includes: detecting a connection state between the electronic equipment and other equipment; when the electronic equipment is connected with a first Bluetooth headset and a second Bluetooth headset, detecting an application program which currently outputs audio data in the electronic equipment; when detecting that two or more application programs output audio data exist currently, transmitting the audio data output by a first application program of the two or more application programs to the first Bluetooth headset for playing, and transmitting the audio data output by a second application program of the two or more application programs to the second Bluetooth headset for playing.
In a second aspect, an embodiment of the present application provides an audio playing apparatus, which is applied to an electronic device, and the apparatus includes: the device comprises a connection detection module, an application detection module and a play control module, wherein the connection detection module is used for detecting the connection state between the electronic equipment and other equipment; the application detection module is used for detecting an application program of current output audio data in the electronic equipment when the electronic equipment is connected with a first Bluetooth headset and a second Bluetooth headset; the playing control module is used for transmitting the audio data output by a first application program of the two or more application programs to the first Bluetooth headset for playing and transmitting the audio data output by a second application program of the two or more application programs to the second Bluetooth headset for playing when detecting that the audio data output by the two or more application programs currently exists.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application 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 audio playback method provided by the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the audio playing method provided in the first aspect.
Compared with the prior art, according to the scheme provided by the application, by detecting the connection state between the electronic equipment and other equipment, when the electronic equipment is connected with the first Bluetooth headset and the second Bluetooth headset, the application program which outputs the audio data currently in the electronic equipment is detected, when the situation that the audio data output by two or more application programs currently exists is detected, the audio data output by the first application program in the two or more application programs is transmitted to the first Bluetooth headset to be played, the audio data output by the second application program in the two or more application programs is transmitted to the second Bluetooth headset to be played, the audio data output by the two application programs are played on different headsets respectively, the effect of playing the audio data output by the two application programs simultaneously is achieved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below 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 shows a flow chart of an audio playing method according to an embodiment of the present application.
Fig. 2 shows a flow chart of an audio playing method according to another embodiment of the present application.
Fig. 3 shows a flow chart of an audio playing method according to a further embodiment of the present application.
Fig. 4 shows a block diagram of an audio playback device according to an embodiment of the present application.
Fig. 5 is a block diagram illustrating a play control module in an audio playing device according to an embodiment of the present application.
Fig. 6 shows another block diagram of an audio playback device according to an embodiment of the present application.
Fig. 7 is a block diagram of an electronic device for executing an audio playing method according to an embodiment of the present application.
Fig. 8 is a storage unit according to an embodiment of the present application, configured to store or carry program codes for implementing an ear audio playing 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.
Currently, most electronic devices, such as computers, mobile phones, music playing devices, etc., can play audio data. With the further development of scientific technology and the increase of the demands of users, the electronic equipment can be connected with external audio playing equipment, so that the electronic equipment can play audio data through the external audio playing equipment. The audio playing device may include an earphone, a sound box, a vehicle-mounted device, and the like. The audio playing device can receive the audio data transmitted by the electronic device and play the audio data. The electronic device can be connected with the audio playing device in a wired mode or a wireless mode.
When a user actually plays audio data transmitted by an electronic device using an audio playing device, the user often uses a Wireless communication headset to implement the audio playing device playing the audio data, for example, a Wireless Fidelity (WiFi) headset or a Bluetooth (BT) headset is used to play the audio data.
In most cases, the electronic device can be connected with the audio playing device through bluetooth, and transmit audio data to the audio playing device through bluetooth for playing.
Further, the current electronic devices generally have a Bluetooth (BT) module, wherein the Bluetooth module may refer to a chip basic circuit set integrated with a Bluetooth function and used for wireless network communication. Furthermore, the electronic device can be connected with a bluetooth playing device (such as a bluetooth headset, a bluetooth sound box, a bluetooth car-mounted device, etc.) via a bluetooth module in a bluetooth manner. As a mode, the electronic device may establish a communication link with the bluetooth headset based on a bluetooth communication protocol, and the electronic device may transmit the audio data to be played to the bluetooth headset for playing.
However, when two applications in the electronic device output audio data, the electronic device usually sends only the audio data of the application with higher priority in the two applications to the bluetooth headset for playing, so that the user can only hear the audio content output by one application. Of course, the audio data of two or more applications can be played, but when the audio data output by the two applications are played, the electronic device can mix the audio data of the two applications and send the mixed audio data to the bluetooth headset to play, so that the sound played by the user is poor in playing effect, and the user experience is low.
In view of the above problems, the inventors have studied for a long time and proposed an audio playing method, an audio playing apparatus, an electronic device, and a computer readable storage medium provided in embodiments of the present application, which detect a connection state between the electronic device and another device, detect an application currently outputting audio data in the electronic device when the electronic device is connected to a first bluetooth headset and a second bluetooth headset, and transmit audio data output by one application to the first bluetooth headset for playing and transmit audio data output by one application to the second bluetooth headset for playing when two or more applications output audio data are detected, so as to realize that audio data output by two applications are played on different headsets respectively, thereby achieving an effect of playing audio data output by two applications simultaneously, and the user experience is improved.
The following describes an audio playing method according to an embodiment of the present application in detail.
Referring to fig. 1, an embodiment of the present application provides an audio playing method, which is applicable to an electronic device, and the audio playing method may include:
step S110: detecting a connection state between the electronic device and other devices.
Most users utilize electronic devices to connect with bluetooth headsets to implement audio data playback. For users with higher requirements, the electronic equipment is connected with the two earphones of the real wireless stereo earphone through Bluetooth, and the electronic equipment transmits audio data to the two earphones of the real wireless stereo earphone for playing.
The real wireless stereo earphone can realize the real wireless separation and use of the left sound channel and the right sound channel of the Bluetooth, namely, the two earphones of the real wireless stereo earphone do not need to be connected by wires. When the real wireless stereo headset is used for playing audio data, the electronic device can be connected with two headsets of the wireless stereo headset, and the electronic device establishes audio channels for transmitting audio data of left and right channels with the two headsets respectively based on a bluetooth communication protocol, namely each headset corresponds to an audio channel of the audio data of one channel. Therefore, stereo playing with separated left and right sound channels is realized, and song listening, conversation and wearing are improved.
At present, when two applications of an electronic device output audio data, the audio data output by one of the applications is usually transmitted to a bluetooth headset for playing, so that a user can only hear a sound corresponding to the played application, or the electronic device mixes the audio data output by the two applications and transmits the mixed audio data to the bluetooth headset for playing, but the sound heard by the user is poor in effect. And because both earphones of the real wireless stereo earphone can establish a communication link with the electronic equipment, and the established communication link can realize the transmission of audio data, the real wireless stereo earphone can be utilized to realize the playing of the audio data output by the two application programs.
In the embodiment of the application, the connection state between the electronic device and other devices can be detected, so that the situation that two applications output audio data of the electronic device exist when the electronic device is connected with two earphones of a real wireless stereo earphone through bluetooth can be processed according to the connection state of communication connection between the electronic device and other devices.
The connection state between the electronic device and the other device includes the existence of communication connection between the other device and the electronic device, the communication connection mode between the other device and the other device, the non-communication connection with the other device, the device information of the device connected to the electronic device, and the like. When the electronic device is in the connected state, the electronic device may be in a mobile network connected state, for example: when other devices are in communication connection with the electronic device, the connection mode may be a WiFi (WIreless-Fidelity) connection, a bluetooth connection, a MiFi (Mobile WiFi, Mobile router, or Mobile hotspot) connection, or the like. In the embodiment of the present application, the connection state of the communication connection between the specific electronic device and the other device may not be limited.
Step S120: when the electronic equipment is connected with the first Bluetooth headset and the second Bluetooth headset, detecting an application program which currently outputs audio data in the electronic equipment.
In this embodiment, the electronic device may be connected to the first bluetooth headset and the second bluetooth headset of the real wireless stereo headset via bluetooth. The first bluetooth headset may be a headset for playing left channel audio data, the second bluetooth headset may be a headset for playing right channel audio data, and of course, the first bluetooth headset may also be a headset for playing right channel audio data, and the second bluetooth headset may be a headset for playing left channel audio data.
Therefore, after the electronic device is connected to the first bluetooth headset and the second bluetooth headset via bluetooth, step S110 may detect that the electronic device is connected to the first bluetooth headset and the second bluetooth headset.
As one way, when the bluetooth functions of the electronic device and other devices are detected in step S110 and the electronic device is successfully paired with other devices that start the bluetooth functions, it may be determined that there is bluetooth connection between the other devices and the electronic device.
When detecting that other equipment is connected with the electronic equipment through Bluetooth, the equipment information of the equipment in Bluetooth communication connection with the electronic equipment can be acquired so as to determine whether the equipment in Bluetooth connection with the electronic equipment is a first Bluetooth earphone and a second Bluetooth earphone of a real wireless stereo earphone.
As one approach, in an android operating system based electronic device, the type of device currently connected through bluetooth may be determined by a return value obtained based on instantiating a bluetooth class. If the returned value is AUDIO _ VIDEO _ CAMCORDER, the image acquisition equipment is characterized; if the returned value is AUDIO _ VIDEO _ CAR _ AUDIO, the vehicle-mounted equipment is represented; if the returned value is AUDIO _ VIDEO _ HIFI _ AUDIO, the AUDIO or VIDEO playing device is characterized as an AUDIO playing device or a VIDEO playing device, such as a bluetooth headset; if the returned value is AUDIO _ VIDEO _ MICROPHONE, it is characterized as a MICROPHONE.
Further, when it is detected that the electronic device is connected to the bluetooth headset via bluetooth, an device address or a device ID of the bluetooth headset connected to the electronic device may be obtained to determine whether the bluetooth headset connected to the electronic device via bluetooth is the first bluetooth headset or the second bluetooth headset.
Of course, it may also be determined whether the electronic device is connected to the first bluetooth headset and the second bluetooth headset according to the broadcast transmitted when the bluetooth headset is connected or disconnected by monitoring the broadcast in the system. The specific manner of detecting that the electronic device is connected to the first bluetooth headset and the second bluetooth headset is not limited in the embodiment of the present application.
Therefore, the condition that the electronic equipment is connected with the first Bluetooth headset and the second Bluetooth headset through Bluetooth can be detected. When the electronic device is connected with the first bluetooth headset and the second bluetooth headset, the application program which currently outputs the audio data in the electronic device can be detected, so that the condition that two application programs output the audio data in the electronic device is processed.
In this embodiment of the application, as a manner, an application program that calls a relevant interface of the electronic device system currently to play audio data may be detected, so that the application program that the electronic device currently outputs the audio data may be obtained.
Step S130: when detecting that two or more application programs output audio data currently exist, transmitting the audio data output by a first application program of the two or more application programs to the first Bluetooth headset for playing, and transmitting the audio data output by a second application program of the two or more application programs to the second Bluetooth headset for playing.
In the embodiment of the application, when it is determined that the electronic device currently has two or more applications to output audio data according to the detected result of the application currently outputting audio data in the electronic device, the audio data output by the two or more applications can be played by using the real wireless stereo headset.
Furthermore, when it is detected that the electronic device currently has two or more applications to output audio data, the audio data output by a first application of the two or more applications can be transmitted to the first bluetooth headset to be played, and the audio data output by a second application of the two or more applications can be transmitted to the second bluetooth headset to be played.
It can be understood that the audio management module of the electronic device can acquire the audio data output by the two applications respectively, and the audio data output by the first application can be encoded and then transmitted to the first bluetooth headset through the communication link established between the electronic device and the first bluetooth headset, so that the first bluetooth headset can decode and play the encoded audio data after receiving the encoded audio data, thereby playing the audio data output by the first application by the first bluetooth headset. And the audio data output by the second application program can be encoded and then transmitted to the second Bluetooth headset through a communication link established between the electronic equipment and the second Bluetooth headset, so that the second Bluetooth headset receives the encoded audio data and then decodes and plays the encoded audio data, and the audio data output by the second application program is played by the second Bluetooth headset. That is to say, the stereo data output by the two applications are not split into audio data corresponding to the left channel and audio data corresponding to the right channel, the audio data corresponding to the left channels of the two applications are synthesized and transmitted to the first bluetooth headset, and the audio data corresponding to the right channels of the two applications are synthesized and transmitted to the second bluetooth headset. And the stereo audio data output by the first application program is transmitted to the first Bluetooth headset for playing, and the stereo audio data output by the second application program is transmitted to the second Bluetooth headset for playing.
It should be understood that, the audio data of the first application program is transmitted to the first bluetooth headset for playing, the audio data of the second application program is transmitted to the second bluetooth headset for playing, which only means that the audio data output by one of the two or more application programs is transmitted to one of the real wireless stereo headsets for playing, and the audio data output by one of the two or more application programs is transmitted to the other headset for playing. Therefore, the two application programs of the electronic equipment for outputting the audio data can be played, and the audio data output by the two application programs are played by different Bluetooth earphones respectively, so that the audio data can be distinguished by users conveniently.
According to the audio playing method provided by the embodiment of the application, when the electronic equipment is connected with the first Bluetooth headset and the second Bluetooth headset, the application program which outputs the audio data currently in the electronic equipment is detected, when the electronic equipment is detected to have the audio data output by two or more application programs currently, the audio data output by the first application program in the two or more application programs is transmitted to the first Bluetooth headset to be played, the audio data output by the second application program in the two or more application programs is transmitted to the second Bluetooth headset to be played, the audio data output by the two application programs are played simultaneously, the audio data output by the two application programs are played by different Bluetooth headsets respectively, the user can distinguish the audio data conveniently, and the auditory experience of the user is improved.
Referring to fig. 2, another embodiment of the present application provides an audio playing method, which can be applied to an electronic device, and the audio playing method can include:
step S210: detecting a connection state between the electronic device and other devices.
Step S220: when the electronic equipment is connected with the first Bluetooth headset and the second Bluetooth headset, detecting an application program which currently outputs audio data in the electronic equipment.
In the embodiment of the present application, the contents of step S210 and step S220 may refer to the contents of the above embodiments, and are not described in detail herein.
Step S230: when it is detected that two or more applications output audio data, the application types of the two or more applications are acquired.
In the embodiment of the application, when it is detected that the electronic device has two or more applications to output the audio data, the application types of the two or more applications can be acquired to determine whether to transmit the audio data output by the two different applications to the first bluetooth headset and the second bluetooth headset respectively for playing.
Further, after detecting the application program of the electronic device currently outputting the audio data, the classification of the application program of the currently outputting audio data may be obtained according to a classification table of the application programs stored in advance. The classification table may be a table in which the electronic device classifies all the application programs in advance, stores the classified application programs in different types, and matches the application programs with the stored application programs one by one when determining the application types of the application programs, so as to obtain the types of the application programs.
Step S240: and judging whether two set types of application programs exist in the two or more than two application programs.
In this embodiment of the application, when there are two applications in the set type, the audio data output by the two applications in the set type may be respectively transmitted to the first bluetooth headset and the second bluetooth headset for playing, so that it may be determined whether the application types of the two applications outputting the audio data are both in the set type.
Further, the setting types may include: a video playback type, a music playback type, a broadcast type, a voice chat type, a video chat type, or a social application type. Of course, the specific setting type may not be limited in the embodiment of the present application, and the specific setting type may be set according to the requirement of the user.
It can be understood that, when the application types of the two application programs currently outputting the audio data are the video playing type, the music playing type, the broadcast type, the voice chat type, the video chat type, or the social application type, the user needs to listen to the audio data output by the application programs, and needs to distinguish the audio data output by the two application programs of the set types, so as to have a better appreciation effect and clearly obtain information from the played audio data.
Step S250: when two application programs of set types exist, audio data output by a first application program of the two application programs of set types are transmitted to the first Bluetooth headset to be played, and audio data output by a second application program of the two application programs of set types are transmitted to the second Bluetooth headset to be played.
In this embodiment, when there are two application programs of a set type in the application program currently outputting audio data, the audio management module of the electronic device may obtain the audio data output by the two application programs. And transmitting the audio data output by a first application program in the two application programs of the set types to the first Bluetooth headset through a communication link between the electronic equipment and the first Bluetooth headset, so that the first Bluetooth headset plays the audio data output by the first application program, and transmitting the audio data output by a second application program in the two application programs of the set types to the second Bluetooth headset through a communication link between the electronic equipment and the second Bluetooth headset, so that the second Bluetooth headset plays the audio data output by the second application program.
Step S260: and when the interruption of the audio data output of the first application program is detected, transmitting the audio data output by the second application program to the first Bluetooth headset and the second Bluetooth headset simultaneously for playing.
In this embodiment of the application, the application program of the current output audio data of the electronic device may be detected in real time in the process of transmitting the audio data of the first application program and the second application program to the first bluetooth headset and the second bluetooth headset for playing. The implementation of the application program for the real-time electronic device to output the audio data at present may be the same as the manner of detecting the application program for the electronic device to output the audio data at present, and is not described herein again.
When the interruption of the audio data output by the first application program outputting the audio data is detected, the audio data output by the second application program can be simultaneously transmitted to the first Bluetooth headset and the second Bluetooth headset for playing. It can be understood that, when the audio data output of the first application program is interrupted and no other application program starts to output audio data in the above process, the application program that outputs audio data currently only has the second application program to output audio data, so that stereo audio data output by the second application program can be split into a left channel audio signal and a right channel audio signal, and the split signals are processed and then the left channel audio data is transmitted to the first bluetooth headset to input the left ear of the user, and the right channel audio data is transmitted to the second bluetooth headset to input the right ear of the user, so that the audio playing effect and the user experience can be improved.
Step S270: and when the interruption of the audio data output of the second application program is detected, transmitting the audio data output by the first application program to the first Bluetooth headset and the second Bluetooth headset simultaneously for playing.
In this embodiment, when it is detected that the audio data output by the second application program outputting the audio data is interrupted, the audio data output by the first application program may be simultaneously transmitted to the first bluetooth headset and the second bluetooth headset for playing. It can be understood that, when the audio data output of the second application program is interrupted and no other application program starts to output audio data in the above process, the application program that outputs audio data currently only has the first application program to output audio data, so that stereo audio data output by the first application program can be split into a left channel audio signal and a right channel audio signal, and the split signals are processed and then the left channel audio data is transmitted to the first bluetooth headset to input the left ear of the user, and the right channel audio data is transmitted to the second bluetooth headset to input the right ear of the user, thereby improving the audio playing effect and the user experience.
The audio playing method provided by the embodiment of the application detects an application program of currently output audio data in an electronic device when the electronic device is connected with a first bluetooth headset and a second bluetooth headset, acquires application types of two or more application programs when the electronic device is detected to have the audio data output by the two or more application programs currently, transmits the audio data output by a first application program of the two application programs to the first bluetooth headset to play when the two or more application programs of the two setting types exist, transmits the audio data output by a second application program of the two application programs of the two setting types to the second bluetooth headset to play, and realizes the simultaneous playing of the audio data output by the application programs of the two application types, and the audio data output by the application programs of the two application types are respectively played by different bluetooth headsets Playing is convenient for users to distinguish, and hearing experience of the users is improved. And when one application program interrupts outputting the audio data, the audio data of the other application program is simultaneously transmitted to the first Bluetooth earphone and the second Bluetooth earphone for playing, so that the audio playing effect and the user experience can be improved.
Referring to fig. 3, another embodiment of the present application provides an audio playing method, which can be applied to an electronic device, and the audio playing method can include:
step S310: and detecting the connection state between the electronic equipment and other equipment.
Step S320: when the electronic equipment is connected with the first Bluetooth headset and the second Bluetooth headset, detecting an application program which currently outputs audio data in the electronic equipment.
Step S330: when it is detected that two or more applications output audio data, the application types of the two applications are acquired.
Step S340: and judging whether two set types of application programs exist in the two or more than two application programs.
In the embodiment of the present application, the contents of steps S310 to S340 may refer to the contents of the above embodiments, and are not described in detail herein.
Step S350: when two setting types of application programs exist, determining a setting difference value of the playing volume of the first Bluetooth headset and the playing volume of the second Bluetooth headset based on the application type of a first application program and the application type of a second application program in the two setting types of application programs.
In this embodiment of the application, when the electronic device currently outputs two application programs of set types of audio data, the audio data output by the first application program is transmitted to the first bluetooth headset for playing, and before the audio data output by the second application program is transmitted to the second bluetooth headset for playing, the playing volume of the first bluetooth headset and the playing volume of the second bluetooth headset may be further adjusted, so that a difference between the playing volume of the first bluetooth headset and the playing volume of the second bluetooth headset is a set difference.
In this embodiment of the application, the electronic device may store in advance a corresponding relationship between application types of two set types of application programs and play volumes of the bluetooth headset corresponding to the two application programs. The corresponding relationship comprises an application type of the first application program, an application type of the second application program, and a set difference value between the playing volume of the first Bluetooth headset corresponding to the first application program and the playing volume corresponding to the second application program.
It can be understood that, when the audio data output by the first application program is transmitted to the first bluetooth headset for playing and the audio data output by the second bluetooth headset is transmitted to the second bluetooth headset for playing, the user can hear the playing sound of different audio data through the first bluetooth headset and the second bluetooth headset. However, the importance of the audio data output by the two applications may be different, and the user may need to listen to the playing sound of the audio data output by the application with higher importance more carefully, for example, when the game type application outputs the audio data simultaneously with the broadcast playing type application, the user may need to listen to the playing sound of the audio data output by the game type application more carefully. Therefore, the difference value between the playing volume of the first Bluetooth headset corresponding to the first application program and the playing volume of the second Bluetooth headset corresponding to the second application program can be set according to the importance division of the application programs, so that the subsequent first Bluetooth headset plays the audio data output by the first application program, and when the second Bluetooth headset plays the audio data output by the second application program, the playing volume of the Bluetooth headset corresponding to one application program is higher than that of the other Bluetooth headset, and a user can clearly distinguish the played sound.
Step S360: and adjusting the playing volume of the first Bluetooth headset and/or the playing volume of the second Bluetooth headset according to the setting difference, wherein the difference between the adjusted playing volume of the first Bluetooth headset and the adjusted playing volume of the second Bluetooth headset is equal to the setting difference.
After the set difference between the play volume of the first bluetooth headset and the play volume of the second bluetooth headset is obtained, the play volume of the first bluetooth headset and/or the play volume of the second bluetooth headset can be adjusted according to the set difference, so that the difference between the play volume of the first bluetooth headset and the play volume of the second bluetooth headset is equal to the set difference.
In this embodiment of the application, adjusting the play volume of the first bluetooth headset and/or the play volume of the second bluetooth headset according to the setting difference may include:
acquiring an application program with the highest priority from the first application program and the second application program according to a priority relation of application types stored in advance; when the application program with the highest priority is a first application program, controlling the second Bluetooth headset to adjust the playing volume according to the setting difference and the playing volume of the first Bluetooth headset, wherein the difference between the playing volume of the first Bluetooth headset and the adjusted playing volume of the second Bluetooth headset is equal to the setting difference; and when the application program with the highest priority is a second application program, controlling the first Bluetooth headset to adjust the playing volume according to the setting difference and the playing volume of the second Bluetooth headset, wherein the difference between the adjusted playing volume of the first Bluetooth headset and the playing volume of the second Bluetooth headset is equal to the setting difference.
It can be understood that, when the play volumes of the first bluetooth headset and the second bluetooth headset are adjusted according to the setting difference, the play volume of the bluetooth headset corresponding to the application program with the low priority can be adjusted, so that the play volume of the bluetooth headset corresponding to the application program with the high priority is inconvenient to keep, and a user can hear the sound of the audio data output by the application program with the high priority of the original volume, thereby improving user experience.
In the embodiment of the application, the priority relationship of the application types of the application programs is stored in the electronic device. The application program with the higher priority can be determined according to the obtained application type of the first application program and the obtained application type of the second application program. When the application program with the highest priority is the first application program, the playing volume of the second bluetooth headset corresponding to the second application program can be adjusted only according to the set difference value and the playing volume of the first bluetooth headset, so that the difference value between the playing volume of the first bluetooth headset and the playing volume of the second bluetooth headset is equal to the difference value. When the application program with the highest priority is the second application program, the playing volume of the first bluetooth headset corresponding to the first application program can be adjusted only according to the set difference and the playing volume of the second bluetooth headset, so that the difference between the playing volume of the first bluetooth headset and the playing volume of the second bluetooth headset is equal to the difference. Therefore, the playing volume of the Bluetooth headset corresponding to the application program with high priority is kept unchanged, and the playing volume of the Bluetooth headset corresponding to the application program with low priority is adjusted, so that the playing sounds of the two headsets can be easily distinguished, and the audio playing effect and the user experience are improved.
Step S370: and transmitting the audio data output by a first application program of the two application programs of the set types to the first Bluetooth headset for playing, and transmitting the audio data output by a second application program of the two application programs of the set types to the second Bluetooth headset for playing.
After the adjustment control of the playing volume is performed on the first bluetooth headset and the second bluetooth headset, the audio data output by the first application program can be transmitted to the first bluetooth headset for playing, and the audio data output by the second application program can be transmitted to the second bluetooth headset for playing.
In this embodiment of the application, after detecting the application program that currently outputs the audio data in the electronic device, the audio playing method may further include:
when detecting that an application program outputting audio data exists at present, judging whether the application type of the application program outputting the audio data is a voice call type; if the type of the voice call is the voice call type, judging whether two voice objects exist when the application program outputting the audio data runs; when two voice objects exist, transmitting the audio data corresponding to a first voice object of the two voice objects to the first Bluetooth headset for playing, and transmitting the audio data corresponding to a second voice object of the two voice objects to the second Bluetooth headset for playing.
In this embodiment of the application, after the detection of the application program currently outputting the audio data in the electronic device, if it is detected that there is an application program currently outputting the audio data, it may be determined whether the application program is a voice call type. The voice call type is an application type that can perform a voice call or a chat, for example, a video chat type, a video conference type, or a call type. That is, the voice call type application is an application that can make a voice with two voice objects. When the application program of the voice call type and the two voice objects are judged to carry out voice, the audio data of the first voice object in the two voice objects can be played in the first Bluetooth earphone, and the audio data of the second voice object in the two voice objects can be played in the second Bluetooth earphone.
As a manner, when the application program of the voice call type makes a voice with two voice objects, the received audio data may carry an identifier of each voice object, and the audio management module of the electronic device may split the received audio data into audio data of a first voice object and audio data of a second voice object according to the identifiers of the voice objects, and then play the audio data of the first voice object in the first bluetooth headset and play the audio data of the second voice object in the second bluetooth headset. Of course, the above-mentioned manner of acquiring the audio data of the first voice object and the audio data of the second voice object may not be limited in the embodiment of the present application, and for example, the audio data of the first voice object and the audio data of the second voice object may also be split by sound color, sound tone, and the like.
In this embodiment of the application, after detecting the application currently outputting the audio data in the electronic device, the audio playing method may further include:
when detecting that an application program outputting audio data currently exists, judging whether the application type of the application program outputting the audio data is a target application type, wherein the target application type at least comprises the following steps: a video playing type; if the type of the application program is the target application type, judging whether two video pictures exist during the operation of the application program which outputs the audio data; when two video pictures exist, transmitting the audio data corresponding to a first video picture in the two video pictures to the first Bluetooth headset for playing, and transmitting the audio data corresponding to a second video picture in the two video pictures to the second Bluetooth headset for playing.
It is understood that, after detecting the application program currently outputting the audio data in the electronic device, if it is detected that there is an application program currently outputting the audio data, it may be determined whether the application program is of the target application type. The target application type may include at least: a video playback type. Some video playing type applications may have a situation where two video frames are played simultaneously, and it may be determined whether the two video frames played by the application are two by detecting the display interface. When the application program of the target application type is judged to play the two video pictures at the same time, the audio data of the first video picture in the two video pictures can be played in the first Bluetooth headset, and the audio data of the second video picture in the two video pictures can be played in the second Bluetooth headset.
As a manner, the application program of the above-mentioned target type simultaneously plays two video pictures, the received audio data may carry an identifier of the audio data of each video picture, the audio management module of the electronic device may split the received audio data into the audio data of the first video picture and the audio data of the second video picture according to the identifier of the audio data of the video picture, and then play the audio data of the first video picture on the first bluetooth headset and play the audio data of the second video picture on the second bluetooth headset. Or, when the target application program plays two video pictures simultaneously, the data transmission channel corresponding to each video picture is different, and the audio management module of the electronic device may obtain the audio data of the first video picture and the audio data of the second video picture according to the different data transmission channels. Of course, the above-mentioned manner of acquiring the audio data of the first video frame and the audio data of the second video frame may not be limited in the embodiment of the present application.
The audio playing method provided by the embodiment of the application includes detecting an application program of currently output audio data in an electronic device when the electronic device is connected with a first bluetooth headset and a second bluetooth headset, acquiring application types of two or more application programs when it is detected that the electronic device currently has two or more application programs to output audio data, transmitting the audio data output by a first application program of the two or more application programs to the first bluetooth headset to play when the two or more application programs have two application programs of set types, transmitting the audio data output by a second application program of the two application programs of set types to the second bluetooth headset to play, and playing the audio data output by the two application programs of set types simultaneously by different bluetooth headsets respectively And the user can distinguish the sound sources conveniently, and the hearing experience of the user is improved. And moreover, the playing volume of the first Bluetooth earphone and the playing volume of the second Bluetooth earphone are adjusted according to the application types, so that the playing effects of the audio data output by the first application program and the audio data output by the second application program are easier to distinguish. In addition, the processing mode is adopted to play the audio data of each voice object under the condition that the voice is simultaneously performed with the two voice objects, and the processing mode is adopted to play the audio data of each video image under the condition that the two video images are simultaneously played, so that the audio playing effect is enhanced, and the user experience is improved.
Referring to fig. 4, a block diagram of an audio playing apparatus 400 according to an embodiment of the present application is shown, where the audio playing apparatus 400 is applied to an electronic device, and the audio playing apparatus 400 includes: a connection detection module 410, an application detection module 420, and a play control module 430. The connection detection module 410 is configured to detect a connection state between the electronic device and another device; the application detection module 420 is configured to detect an application program currently outputting audio data in the electronic device when the electronic device is connected to the first bluetooth headset and the second bluetooth headset; the playing control module 430 is configured to, when it is detected that there are two or more application programs outputting audio data currently, transmit the audio data output by a first application program of the two or more application programs to the first bluetooth headset for playing, and transmit the audio data output by a second application program of the two or more application programs to the second bluetooth headset for playing.
In the embodiment of the present application, please refer to fig. 5, the play control module 430 may include: a type acquisition unit 431, a type judgment unit 432, and a play execution unit 433. The type acquisition unit 431 is used for acquiring the application types of the two or more applications when detecting that the two or more applications output the audio data; the type determining unit 432 is configured to determine whether two applications of a set type exist among the two or more applications; the play execution unit 433 is configured to, when the two application programs of the setting types exist, transmit audio data output by a first application program of the two application programs of the setting types to the first bluetooth headset for playing, and transmit audio data output by a second application program of the two application programs of the setting types to the second bluetooth headset for playing.
Further, referring to fig. 6, the audio playing apparatus 400 may further include: a volume difference acquisition module 440 and a volume adjustment module 450. The volume difference obtaining module 440 is configured to determine a setting difference between the playing volume of the first bluetooth headset and the playing volume of the second bluetooth headset based on the application type of the first application program and the application type of the second application program in the two application programs of the two setting types before transmitting the audio data output by the first application program in the two application programs of the two setting types to the first bluetooth headset for playing and transmitting the audio data output by the second application program in the two application programs of the two setting types to the second bluetooth headset for playing; the volume adjusting module 450 is configured to adjust the playing volume of the first bluetooth headset and/or the playing volume of the second bluetooth headset according to the setting difference, where a difference between the adjusted playing volume of the first bluetooth headset and the adjusted playing volume of the second bluetooth headset is equal to the setting difference.
In this embodiment, the volume adjusting module 450 may be specifically configured to: acquiring an application program with the highest priority from the first application program and the second application program according to a pre-stored priority relation of application types; when the application program with the highest priority is a first application program, controlling the second Bluetooth headset to adjust the playing volume according to the setting difference and the playing volume of the first Bluetooth headset, wherein the difference between the playing volume of the first Bluetooth headset and the adjusted playing volume of the second Bluetooth headset is equal to the setting difference; and when the application program with the highest priority is a second application program, controlling the first Bluetooth headset to adjust the playing volume according to the setting difference and the playing volume of the second Bluetooth headset, wherein the difference between the adjusted playing volume of the first Bluetooth headset and the playing volume of the second Bluetooth headset is equal to the setting difference.
In the embodiment of the present application, please refer to fig. 6, the audio playing apparatus 400 may further include: a first play module 460. The first playing module is used for: when detecting that an application program outputting audio data exists at present, judging whether the application type of the application program outputting the audio data is a voice call type; if the type of the voice call is the voice call type, judging whether two voice objects exist when the application program outputting the audio data runs; when two voice objects exist, transmitting the audio data corresponding to a first voice object of the two voice objects to the first Bluetooth headset for playing, and transmitting the audio data corresponding to a second voice object of the two voice objects to the second Bluetooth headset for playing.
In the embodiment of the present application, please refer to fig. 6, the audio playing apparatus 400 may further include: a second play module 470. The second playing module 470 is configured to, when it is detected that there is currently one application program outputting audio data, determine whether an application type of the application program outputting audio data is a target application type, where the target application type at least includes: a video playing type; if the type of the application program is the target application type, judging whether two video pictures exist during the operation of the application program which outputs the audio data; when two video pictures exist, transmitting the audio data corresponding to a first video picture in the two video pictures to the first Bluetooth headset for playing, and transmitting the audio data corresponding to a second video picture in the two video pictures to the second Bluetooth headset for playing.
In the embodiment of the present application, please refer to fig. 6, the audio playing apparatus may further include: a third playing module 480 and a fourth playing module 490. The third playing module 480 is configured to transmit the audio data output by the first application program of the two application programs to the first bluetooth headset for playing, transmit the audio data output by the second application program of the two application programs to the second bluetooth headset for playing, and transmit the audio data output by the second application program to the first bluetooth headset and the second bluetooth headset for playing simultaneously when detecting that the audio data output of the first application program is interrupted; the fourth playing module 490 is configured to transmit the audio data output by the first application to the first bluetooth headset and the second bluetooth headset for playing when detecting that the output of the audio data of the second application is interrupted.
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.
To sum up, the scheme that this application provided, through detecting the connection status between electronic equipment and other equipment, when electronic equipment is connected with first bluetooth headset and second bluetooth headset, detect the application of current output audio data in the electronic equipment, when detecting that there are two or more than two application output audio data at present, audio data transmission to first bluetooth headset of the first application output in two or more than two applications plays, audio data transmission to the second bluetooth headset of the second application output in two or more than two applications plays, thereby realize that the audio data of two applications output plays in different earphones respectively, reach the effect of the audio data's of two applications output simultaneous broadcast, promote user experience.
Referring to fig. 7, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 100 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, a bluetooth module 130, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform the methods as described in the foregoing method embodiments.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall electronic device 100 using various interfaces and lines, and performs various functions of the electronic device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 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 110 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 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The data storage area may also store data created by the electronic device 100 during use (e.g., phone book, audio-video data, chat log data), and the like.
The bluetooth module 130 is used for implementing bluetooth connection between the electronic device and two bluetooth headsets and data interaction between the electronic device and two bluetooth headsets, wherein the number of the bluetooth module 130 may be one, or may be multiple integrated together, which is not limited herein. Specifically, the bluetooth protocol may be used with the bluetooth device by 5.0/4.2/4.1/2.1/2.0, or may also be used by Bluetooth Low Energy (BLE), bluetooth Enhanced Data Rate (EDR), or bluetooth Basic Rate (BR). The basic circuit structure is similar to the WiFi module, and can also be composed of a power amplifier, a wireless transceiver, a transceiver switcher, a low noise amplifier, an antenna, and the like. The bluetooth module 130 may use a first communication frequency band, wherein the first communication frequency band may be 2.4 GHZ.
Referring to fig. 8, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a 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 800 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 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 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 (7)

1. An audio playing method applied to an electronic device, the method comprising:
detecting a connection state between the electronic equipment and other equipment;
when the electronic equipment is connected with a first Bluetooth headset and a second Bluetooth headset, detecting an application program which currently outputs audio data in the electronic equipment;
when detecting that more than two application programs output audio data, acquiring application types of the more than two application programs;
judging whether two application programs of set types exist in the more than two application programs;
when two setting types of application programs exist, determining a setting difference value of the playing volume of the first Bluetooth headset and the playing volume of the second Bluetooth headset based on the application type of a first application program and the application type of a second application program in the two setting types of application programs, wherein the setting difference value is determined by the importance of the application programs;
acquiring an application program with the highest priority from the first application program and the second application program according to a priority relation of application types stored in advance;
when the application program with the highest priority is a first application program, controlling the second Bluetooth headset to adjust the playing volume according to the setting difference and the playing volume of the first Bluetooth headset, wherein the difference between the playing volume of the first Bluetooth headset and the adjusted playing volume of the second Bluetooth headset is equal to the setting difference;
when the application program with the highest priority is a second application program, controlling the first Bluetooth headset to adjust the playing volume according to the setting difference and the playing volume of the second Bluetooth headset, wherein the difference between the adjusted playing volume of the first Bluetooth headset and the playing volume of the second Bluetooth headset is equal to the setting difference;
and transmitting the audio data output by the first application program to the first Bluetooth headset for playing, and transmitting the audio data output by the second application program to the second Bluetooth headset for playing.
2. The method of claim 1, wherein after the detecting an application currently outputting audio data in the electronic device, the method further comprises:
when detecting that an application program outputting audio data exists at present, judging whether the application type of the application program outputting the audio data is a voice call type;
if the type of the voice call is the voice call type, judging whether two voice objects exist when the application program outputting the audio data runs;
when two voice objects exist, transmitting the audio data corresponding to a first voice object of the two voice objects to the first Bluetooth headset for playing, and transmitting the audio data corresponding to a second voice object of the two voice objects to the second Bluetooth headset for playing.
3. The method of claim 1, wherein after the detecting an application currently outputting audio data in the electronic device, the method further comprises:
when detecting that an application program outputting audio data currently exists, judging whether the application type of the application program outputting the audio data is a target application type, wherein the target application type at least comprises the following steps: a video playing type;
if the type of the application program is the target application type, judging whether two video pictures exist during the operation of the application program which outputs the audio data;
when two video pictures exist, transmitting the audio data corresponding to a first video picture in the two video pictures to the first Bluetooth headset for playing, and transmitting the audio data corresponding to a second video picture in the two video pictures to the second Bluetooth headset for playing.
4. The method of claim 1, wherein after the audio data output by the first application is transmitted to the first bluetooth headset for playback and the audio data output by the second application is transmitted to the second bluetooth headset for playback, the method further comprises:
when the interruption of the audio data output of the first application program is detected, transmitting the audio data output by the second application program to the first Bluetooth headset and the second Bluetooth headset simultaneously for playing;
and when the interruption of the audio data output of the second application program is detected, transmitting the audio data output by the first application program to the first Bluetooth headset and the second Bluetooth headset simultaneously for playing.
5. An audio playing apparatus, applied to an electronic device, the apparatus comprising: a connection detection module, an application detection module, a volume difference value acquisition module, a volume adjustment module and a play control module, wherein the play control module comprises a type acquisition unit, a type judgment unit and a play execution unit,
the connection detection module is used for detecting the connection state between the electronic equipment and other equipment;
the application detection module is used for detecting an application program of current output audio data in the electronic equipment when the electronic equipment is connected with a first Bluetooth headset and a second Bluetooth headset;
the type acquisition unit is used for acquiring the application types of more than two application programs when detecting that the more than two application programs output audio data;
the type judging unit is used for judging whether two set types of application programs exist in the more than two application programs;
the volume difference acquisition module is used for determining a setting difference between the playing volume of the first Bluetooth headset and the playing volume of the second Bluetooth headset based on the application type of a first application program and the application type of a second application program in the two application programs, wherein the setting difference is determined by the importance of the application programs;
the volume adjusting module is used for acquiring the application program with the highest priority from the first application program and the second application program according to the priority relation of the application types stored in advance; when the application program with the highest priority is a first application program, controlling the second Bluetooth headset to adjust the playing volume according to the setting difference and the playing volume of the first Bluetooth headset, wherein the difference between the playing volume of the first Bluetooth headset and the adjusted playing volume of the second Bluetooth headset is equal to the setting difference; when the application program with the highest priority is a second application program, controlling the first Bluetooth headset to adjust the playing volume according to the setting difference and the playing volume of the second Bluetooth headset, wherein the difference between the adjusted playing volume of the first Bluetooth headset and the playing volume of the second Bluetooth headset is equal to the setting difference;
the playing execution unit is used for transmitting the audio data output by the first application program to the first Bluetooth headset for playing and transmitting the audio data output by the second application program to the second Bluetooth headset for playing.
6. 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-4.
7. A computer-readable storage medium having program code stored therein, the program code being invoked by a processor to perform the method of any one of claims 1 to 4.
CN201811163030.9A 2018-09-30 2018-09-30 Audio playing method and device, electronic equipment and storage medium Active CN109445740B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811163030.9A CN109445740B (en) 2018-09-30 2018-09-30 Audio playing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811163030.9A CN109445740B (en) 2018-09-30 2018-09-30 Audio playing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109445740A CN109445740A (en) 2019-03-08
CN109445740B true CN109445740B (en) 2022-05-20

Family

ID=65546013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811163030.9A Active CN109445740B (en) 2018-09-30 2018-09-30 Audio playing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109445740B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110058836B (en) * 2019-03-18 2020-11-06 维沃移动通信有限公司 Audio signal output method and terminal equipment
KR20210053094A (en) * 2019-11-01 2021-05-11 삼성전자주식회사 Electronic device for outputting audio data of a plurality of applications and operating method thereof
CN111132377B (en) * 2019-12-27 2022-03-22 昱兆微电子科技(上海)有限公司 Data transmission method and system for terminal and earphone
CN111405337A (en) * 2020-02-17 2020-07-10 福州瑞芯微电子股份有限公司 Method, device, equipment and medium for realizing double-screen abnormal sound of android system
CN113490187A (en) * 2020-03-16 2021-10-08 维沃移动通信有限公司 Audio transmission method and electronic equipment
CN111459456B (en) * 2020-04-07 2023-03-14 维沃移动通信有限公司 Audio control method and electronic equipment
CN111818418A (en) * 2020-07-12 2020-10-23 韶关市启之信息技术有限公司 Earphone background display method and system
CN111935801B (en) * 2020-07-16 2023-04-28 中国联合网络通信集团有限公司 Voice access method, system, terminal equipment and computer readable storage medium
CN112954528B (en) * 2021-02-20 2023-01-24 英华达(上海)科技有限公司 Method for transmitting audio data
CN112925503A (en) * 2021-03-24 2021-06-08 深圳市欢太科技有限公司 Audio output method, audio output device, computer equipment and storage medium
CN115309360A (en) * 2021-04-21 2022-11-08 华为技术有限公司 Audio output method, recording method of media file and electronic equipment
CN113271376B (en) * 2021-05-08 2023-08-22 维沃移动通信有限公司 Communication control method, electronic equipment and earphone
CN113076082B (en) * 2021-06-03 2021-09-03 杭州星犀科技有限公司 Method, system, electronic device and storage medium for audio source processing
CN113382337A (en) * 2021-06-21 2021-09-10 紫优科技(深圳)有限公司 Equipment management system and method of intelligent earphone
CN113840032A (en) * 2021-09-23 2021-12-24 Oppo广东移动通信有限公司 Audio control method, audio control device and electronic equipment
CN113660580A (en) * 2021-10-20 2021-11-16 翱捷科技(深圳)有限公司 Earphone communication method and system, earphone and electronic equipment
CN116055615B (en) * 2022-08-19 2023-10-27 荣耀终端有限公司 Audio playing method, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246417A (en) * 2007-02-13 2008-08-20 艾威梯软件技术(北京)有限公司 Method and system for non-intermittence software switch of audio data flow input/output
CN105827825A (en) * 2016-02-29 2016-08-03 维沃移动通信有限公司 Audio data processing method and mobile terminal
CN106303816A (en) * 2015-05-25 2017-01-04 联想(北京)有限公司 A kind of information control method and electronic equipment
CN107171816A (en) * 2017-06-21 2017-09-15 歌尔科技有限公司 Data processing method and device in videoconference
CN107396151A (en) * 2017-08-24 2017-11-24 维沃移动通信有限公司 A kind of video playing control method and electronic equipment
CN107562405A (en) * 2017-08-18 2018-01-09 广东欧珀移动通信有限公司 Audio play control method, device and storage medium and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102062309B1 (en) * 2013-05-28 2020-01-03 삼성전자주식회사 Method for controlling window and an electronic device thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246417A (en) * 2007-02-13 2008-08-20 艾威梯软件技术(北京)有限公司 Method and system for non-intermittence software switch of audio data flow input/output
CN106303816A (en) * 2015-05-25 2017-01-04 联想(北京)有限公司 A kind of information control method and electronic equipment
CN105827825A (en) * 2016-02-29 2016-08-03 维沃移动通信有限公司 Audio data processing method and mobile terminal
CN107171816A (en) * 2017-06-21 2017-09-15 歌尔科技有限公司 Data processing method and device in videoconference
CN107562405A (en) * 2017-08-18 2018-01-09 广东欧珀移动通信有限公司 Audio play control method, device and storage medium and mobile terminal
CN107396151A (en) * 2017-08-24 2017-11-24 维沃移动通信有限公司 A kind of video playing control method and electronic equipment

Also Published As

Publication number Publication date
CN109445740A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109445740B (en) Audio playing method and device, electronic equipment and storage medium
CN109257500B (en) Audio playing method and device, electronic equipment and storage medium
EP3629561B1 (en) Data transmission method and system, and bluetooth headphone
CN109165005B (en) Sound effect enhancement method and device, electronic equipment and storage medium
US10950238B2 (en) Bluetooth speaker base, method and system for controlling thereof
CN109151212B (en) Equipment control method and device and electronic equipment
WO2021180083A1 (en) Bluetooth communication system and wireless communication system
CN109107158B (en) Sound effect processing method and device, electronic equipment and computer readable storage medium
CN109379490B (en) Audio playing method and device, electronic equipment and computer readable medium
CN109274407B (en) Data transmission method, device, electronic equipment and storage medium
CN111124351B (en) Audio output method, audio output device, electronic equipment and storage medium
CN110830970B (en) Audio transmission method, device, equipment and storage medium between Bluetooth equipment
CN109271131B (en) Earphone control method and device, electronic equipment and storage medium
CN107621933B (en) Audio playing method and device and related medium product
US20170195817A1 (en) Simultaneous Binaural Presentation of Multiple Audio Streams
CN110602683B (en) Bluetooth control method, device, mobile terminal and storage medium
CN109298846B (en) Audio transmission method and device, electronic equipment and storage medium
CN110248347B (en) Call abnormity detection method, device, equipment and storage medium
CN111107226A (en) Volume control method applied to mobile terminal
US11210058B2 (en) Systems and methods for providing independently variable audio outputs
CN112910488B (en) Public and private network fusion system and data processing method thereof
CN115022766B (en) Audio data playing method and equipment
CN103986818B (en) A kind of information processing method and electronic equipment
CN113038317A (en) Earphone control method and device, Bluetooth earphone and storage medium
CN116321084A (en) Bluetooth communication method, bluetooth communication device, electronic equipment and computer readable 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