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

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

Info

Publication number
CN114077414A
CN114077414A CN202010821060.5A CN202010821060A CN114077414A CN 114077414 A CN114077414 A CN 114077414A CN 202010821060 A CN202010821060 A CN 202010821060A CN 114077414 A CN114077414 A CN 114077414A
Authority
CN
China
Prior art keywords
target application
audio
playing
application program
target
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.)
Pending
Application number
CN202010821060.5A
Other languages
Chinese (zh)
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 CN202010821060.5A priority Critical patent/CN114077414A/en
Priority to PCT/CN2021/101231 priority patent/WO2022033176A1/en
Publication of CN114077414A publication Critical patent/CN114077414A/en
Pending legal-status Critical Current

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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • 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

Abstract

The embodiment of the application discloses an audio playing control method, an audio playing control device, electronic equipment and a storage medium, wherein the method comprises the following steps: when a target application program of the electronic equipment takes a wireless earphone end as an audio output channel of a target audio, if the wireless earphone is determined to be picked off, whether the target application program responds to pause playing is judged; if not, the target audio is continuously output to the wireless earphone, and if so, the electronic equipment end is used as an audio output channel, so that the audio output channel can be flexibly and reasonably selected, and the user experience is prevented from being bad when the earphone is used.

Description

Audio playing control method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to an audio playing control method and apparatus, an electronic device, and a storage medium.
Background
The audio output mode of the electronic equipment mainly comprises speaker output and earphone output, the user usually pairs and connects the electronic equipment and the wireless earphone at first, the wireless earphone is worn on the ear and plays audio signals as an audio output path, and in the scene of the wireless earphone in practical application, the user experience is not good because the unreasonable selection of the audio output path is carried out on the wireless earphone end and the electronic equipment end.
Disclosure of Invention
The embodiment of the application provides an audio playing control method and device, electronic equipment and a storage medium, and an audio output channel can be reasonably selected between an electronic equipment end and a wireless earphone end in the using process, so that audio output is flexibly controlled, and user experience is improved.
A first aspect of an embodiment of the present application provides an audio playing control method, which is applied to an electronic device, where the electronic device is connected to a wireless headset, and the method includes:
when a target application program of the electronic equipment takes the wireless earphone end as an audio output channel of target audio, if the wireless earphone is determined to be picked off, judging whether the target application program responds to pause playing;
if not, continuing to output the target audio to the wireless earphone, and if so, taking the electronic equipment end as an audio output channel.
A second aspect of the embodiments of the present application provides an audio playing control method, which is applied to an electronic device, where the electronic device is connected to at least one of a pair of wireless earphones, and the method includes:
when state information representing that the pair of wireless earphones are both taken off is obtained, response information of a target application program of the electronic equipment is obtained, wherein the response information is used for representing whether the target application program can respond to a play pause instruction sent by the wireless earphone end;
and determining an audio output channel of the target application program according to the response information.
A third aspect of the embodiments of the present application provides an audio playing control device, which is applied to an electronic device, where the electronic device is connected to a wireless headset, and the audio playing control device includes:
the judging unit is used for judging whether a target application program of the electronic equipment responds to pause playing if the wireless earphone is determined to be picked off when the target application program of the electronic equipment takes the wireless earphone end as an audio output channel of target audio;
the processing unit is used for continuing to output the target audio to the wireless earphone if the target application program does not respond to the pause of playing; and if the target application program responds to the pause of playing, the electronic equipment end is taken as an audio output channel.
A fourth aspect of the embodiments of the present application provides an audio playback control apparatus, which is applied to an electronic device, where the electronic device is connected to at least one of a pair of wireless earphones, and the audio playback control apparatus includes:
the acquisition unit is used for acquiring response information of a target application program of the electronic equipment when state information representing that the pair of wireless earphones are both taken off is acquired, wherein the response information is used for representing whether the target application program can respond to a play pause instruction sent by the wireless earphone end;
and the determining unit is used for determining the audio output path of the target application program according to the response information.
A fifth aspect of the embodiments of the present application provides an audio playback control system, including an electronic device and a wireless headset, where the electronic device is connected to the wireless headset,
if the wireless earphone determines that the wearing state is changed into the non-wearing state, or the wireless earphone determines that the wearing state is changed into the non-wearing state and the target application program of the electronic equipment is in the playing state,
sending a play pause instruction to the electronic equipment;
after the electronic equipment receives the playing pause instruction, if the target application program can respond to the playing pause instruction, pausing to play the target audio;
if the target application program cannot respond to the pause playing instruction, continuing playing the target audio;
the wireless earphone sends a state change instruction to the electronic equipment within a preset time after sending the play pause instruction to the electronic equipment; and after receiving the state change instruction, the electronic equipment acquires response information of the target application program and determines an audio playing path of the target application program according to the response information.
A sixth aspect of the embodiments of the present application provides an audio playback control system, including an electronic device and a wireless headset, where the wireless headset includes a first headset and a second headset, and the electronic device is connected to at least one of the first and second headsets, where,
if any earphone of the wireless earphones is determined to be changed from the wearing state to the non-wearing state, or if any earphone of the wireless earphones is determined to be changed from the wearing state to the non-wearing state and the target application program of the electronic equipment is in the playing state,
sending a pause playing instruction to the electronic equipment, and after receiving the pause playing instruction, pausing to play the target audio if the target application program of the electronic equipment can respond to the pause playing instruction by the electronic equipment;
if the target application program of the electronic equipment cannot respond to the pause playing instruction, continuing playing the target audio;
if the wireless earphones determine that the two earphones are both taken off, state information is sent to the electronic equipment;
the electronic equipment receives the state information and then acquires response information of the target application program;
and the electronic equipment determines an audio playing path of the target application program according to the response information.
A seventh aspect of embodiments of the present application provides an electronic device, including: a processor and a memory; and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for some or all of the steps as described in the first or second aspects of embodiments of the present application.
An eighth aspect of embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, where the computer program is used to make a computer execute some or all of the steps described in the first aspect or the second aspect of embodiments of the present application.
A ninth aspect of embodiments of the present application provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps as described in the first or second aspect of embodiments of the present application. The computer program product may be a software installation package.
According to the embodiment of the application, when the target application program of the electronic equipment takes the wireless earphone end as the audio output channel of the target audio, if the wireless earphone is determined to be picked off, whether the target application program responds to the pause of playing is judged; if not, the target audio is continuously output to the wireless earphone, and if the target audio is not output to the wireless earphone, the electronic equipment end is used as an audio output path, so that the target audio can be continuously output through the wireless earphone when the target application program does not respond to the pause of playing, the audio output path can be flexibly and reasonably selected, the sound interruption of the target audio under the condition that the target audio is not paused when the earphone is taken off can be avoided, and the influence on surrounding people when the target audio is externally played through the electronic equipment end is avoided, so that the user experience is not good.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1A is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application;
fig. 1B is a schematic flowchart of an audio playing control method disclosed in an embodiment of the present application;
fig. 2 is a schematic flowchart of another audio playing control method disclosed in the embodiment of the present application;
fig. 3 is a schematic flowchart of another audio playing control method disclosed in the embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an audio playback control apparatus disclosed in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an audio playback control system disclosed in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an audio playback control system according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present invention 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, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device described in the embodiments of the present application may include various handheld devices having a wireless communication function, vehicle-mounted devices, wireless headsets, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like, and the electronic device may be, for example, a smart phone, a tablet computer, a headset box, a wearable device, and the like. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
In this embodiment, the wireless headset may specifically be: the bluetooth headset may be a general bluetooth headset, that is, a headset that plays sound through a speaker, or may be a bone conduction headset, and the sound conduction mode of the wireless headset is not limited in the present application. The wireless headset may establish a wireless connection with an electronic device,
it can be understood that the wireless earphone may be an in-ear earphone, or a headset, and the embodiment of the present application is not limited thereto.
Referring to fig. 1A, fig. 1A is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application, the electronic device 100 includes a storage and processing circuit 110, and a sensor 170 connected to the storage and processing circuit 110, where:
the electronic device 100 may include control circuitry, which may include storage and processing circuitry 110. The storage and processing circuitry 110 may include memory, such as hard drive memory, non-volatile memory (e.g., flash memory or other electronically programmable read-only memory used to form a solid state drive, etc.), volatile memory (e.g., static or dynamic random access memory, etc.), and so on, and embodiments of the present application are not limited thereto. Processing circuitry in storage and processing circuitry 110 may be used to control the operation of electronic device 100. The processing circuitry may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage and processing circuitry 110 may be used to run software in the electronic device 100, such as an Internet browsing application, a Voice Over Internet Protocol (VOIP) telephone call application, an email application, a media playing application, operating system functions, and so forth. Such software may be used to perform control operations such as, for example, camera-based image capture, ambient light measurement based on an ambient light sensor, proximity sensor measurement based on a proximity sensor, information display functionality based on status indicators such as status indicator lights of light emitting diodes, touch event detection based on a touch sensor, functionality associated with displaying information on multiple (e.g., layered) display screens, operations associated with performing wireless communication functionality, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and other functions in the electronic device 100, to name a few.
The electronic device 100 may include input-output circuitry 150. The input-output circuit 150 may be used to enable the electronic device 100 to input and output data, i.e., to allow the electronic device 100 to receive data from an external device and also to allow the electronic device 100 to output data from the electronic device 100 to the external device. The input-output circuit 150 may further include a sensor 170. Sensor 170 may include the ultrasonic fingerprint identification module, may also include ambient light sensor, proximity sensor based on light and electric capacity, touch sensor (for example, based on light touch sensor and/or capacitanc touch sensor, wherein, touch sensor may be a part of touch display screen, also can regard as a touch sensor structure independent utility), acceleration sensor, and other sensors etc., the ultrasonic fingerprint identification module can be integrated in the screen below, or, the ultrasonic fingerprint identification module can set up in electronic equipment's side or back, do not do the restriction here, this ultrasonic fingerprint identification module can be used to gather the fingerprint image.
The sensor 170 may include a first camera and a second camera, the first camera may be a front camera or a rear camera, the second camera may be an Infrared (IR) camera or a visible light camera, and when the IR camera takes a picture, a pupil reflects Infrared light, so that the IR camera may take a pupil image more accurately than the RGB camera; the visible light camera needs to carry out more follow-up pupil detection, and calculation accuracy and accuracy are higher than the IR camera, and the commonality is better than the IR camera, but the calculated amount is big.
Input-output circuit 150 may also include one or more display screens, such as display screen 130. The display 130 may include one or a combination of liquid crystal display, organic light emitting diode display, electronic ink display, plasma display, display using other display technologies. The display screen 130 may include an array of touch sensors (i.e., the display screen 130 may be a touch display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
The electronic device 100 may also include an audio component 140. The audio component 140 may be used to provide audio input and output functionality for the electronic device 100. The audio components 140 in the electronic device 100 may include a speaker, a microphone, a buzzer, a tone generator, and other components for generating and detecting sound.
The communication circuit 120 may be used to provide the electronic device 100 with the capability to communicate with external devices. The communication circuit 120 may include analog and digital input-output interface circuits, and wireless communication circuits based on radio frequency signals and/or optical signals. The wireless communication circuitry in communication circuitry 120 may include radio-frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless Communication circuitry in Communication circuitry 120 may include circuitry to support Near Field Communication (NFC) by transmitting and receiving Near Field coupled electromagnetic signals. For example, the communication circuit 120 may include a near field communication antenna and a near field communication transceiver. The communications circuitry 120 may also include a cellular telephone transceiver and antenna, a wireless local area network transceiver circuitry and antenna, and so forth.
The electronic device 100 may further include a battery, power management circuitry, and other input-output units 160. The input-output unit 160 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, and the like.
A user may input commands through input-output circuitry 150 to control the operation of electronic device 100, and may use output data of input-output circuitry 150 to enable receipt of status information and other outputs from electronic device 100.
The following describes embodiments of the present application in detail.
Referring to fig. 1B, fig. 1B is a schematic flowchart of an audio playing control method disclosed in an embodiment of the present application, and as shown in fig. 1B, the audio playing control method is applied to an electronic device, and the electronic device is connected to a wireless headset, and includes the following steps:
101. when the target application program of the electronic equipment takes the wireless earphone end as an audio output channel of the target audio, if the wireless earphone is determined to be taken off, whether the target application program responds to the pause of playing is judged.
The target application program can be any one of the following: the audio playing application refers to an application program mainly used for playing audio, and may be, for example, a music playing application, a reading application, or a broadcasting application, and is not limited herein.
The target audio refers to any audio played through the target application program.
The audio output path refers to which channel the target audio is output through, for example, the wireless earphone end is used as the audio output path (i.e., the target audio can be played through a speaker at the earphone end or a playing device such as bone conduction), the electronic device end is used as the audio output path (i.e., the target audio can be played through a speaker at the earphone end or a playing device such as a speaker at the earphone end), and it should be noted that the wireless earphone end or the electronic device end is used as the audio output path, which may be a state in which the target audio is being played or a state in which the playing is paused.
In specific implementation, when the electronic device runs the target application program, the target audio is output through the wireless headset, the wearing state of the wireless headset can be detected by the wireless headset in the process that a user listens to the target audio through the wireless headset, and if the situation that the wireless headset is taken off is detected, the state information can be reported to the electronic device, so that the electronic device can determine that the wireless headset is taken off after receiving the state information.
It is understood that, if the wireless headset includes a single headset, the wireless headset may report the status information to the electronic device after detecting that the wireless headset is detached, so that the electronic device may determine that the wireless headset is detached.
It can be understood that, if the wireless headset includes a first headset and a second headset, the first headset is connected to the second headset, and the first headset is connected to the electronic device, the first headset may report, to the electronic device, state information that both the first headset and the second headset are taken off when the first headset detects that the first headset is taken off and receives a state information representation that the second headset is taken off, which is reported by the second headset.
It can be understood that, if the wireless headset includes a first headset and a second headset, and the first headset and the second headset are respectively connected with the electronic device, the first headset can report the state information of the first headset to the electronic device when detecting that the first headset is removed; when the second earphone detects that the second earphone is picked off, the state information of the second earphone can be reported to the electronic equipment, so that the electronic equipment can determine that the first earphone and the second earphone are both picked off according to the received state information of the first earphone and the received state information of the second earphone.
It can be understood that, if the wireless headset includes a first headset and a second headset, the first headset is connected to the second headset, a main headset of the first headset and the second headset is connected to the electronic device, when any one of the two headsets detects that the headset is removed, the main headset sends status information to the electronic device, and the electronic device determines whether the first headset and the second headset are both removed according to the obtained statuses of the two headsets (it may be that one headset is removed after one headset is removed, and it is considered that the headsets are both removed when the latter headset is removed).
It is understood that the detection of being taken off may be obtained by comparing wearing conditions detected twice or more, for example, the previous detection is a wearing state, and the next detection is a non-wearing state, and then the detection is determined to be taken off, which may be determined according to conditions of multiple detections, or other detection methods, which is not limited in this embodiment.
It is understood that the wireless headset includes a single headset or a dual headset, and if the wireless headset is a dual headset, the connecting the electronic device with the wireless headset includes: at least one of the dual earphones is connected with the electronic equipment;
if the wireless earphone is determined to be picked off, whether the target application program responds to the pause playing or not is judged, and the method comprises the following steps:
and if the double earphones are determined to be off, judging whether the target application program responds to the pause playing.
The electronic device may be connected to a wireless earphone or a pair of wireless earphones, and if the pair of wireless earphones is detected to be removed, whether the target application program responds to the pause of the playing is judged.
It is to be understood that, before determining whether the target application responds to the pause in play, the method further comprises:
receiving a play pause instruction sent by the wireless earphone;
and if the target application program can respond to the playing pause instruction, the playing of the target audio can be paused, otherwise, the playing of the target audio cannot be paused.
When the wireless earphone connected with the electronic equipment is taken off, the wireless earphone can send a play pause instruction to the electronic equipment so as to instruct the electronic equipment to pause the target audio currently played by the target application program. If the target application program can respond to the play pause instruction, the electronic equipment can pause playing the target audio, and if the target application program cannot respond to the play pause instruction, the electronic equipment cannot pause playing the target audio. The earphone can send the state information to the electronic device after a preset time after sending the play pause instruction, so that the electronic device can know that the earphone is taken off, and the preset time can be set according to actual needs, for example, 4 microseconds.
It can be understood that, in the step 101, determining whether the target application responds to the pause of the playback includes:
11. and judging whether the target application program pauses playing the target audio.
In the embodiment of the application, the electronic device may determine whether the target application responds to the pause of the playing target audio according to whether the operation of pausing the playing target audio is executed in the actual running process of the target application, if the operation of pausing the playing target audio is executed by the target application, the target application responds to the pause of the playing, otherwise, the target application does not respond to the pause of the playing. In the application scenario, because the pause playing instruction sent by the wireless headset is sent before the state information, the target application program may pause according to the pause playing instruction, so that whether the response is made can be directly determined according to whether the playing state is actually paused, and the audio output path is determined.
It can be understood that, in the step 101, determining whether the target application responds to the pause of the playback includes: acquiring response information of the target application program, and determining whether the target application program responds to the pause playing according to the response information so as to determine an audio output channel; the method specifically comprises the following steps:
12. acquiring a process number corresponding to a sound track in an activated state at present;
13. acquiring target application identification information of a target application program according to the process number;
14. and searching a preset response relation table according to the target application identification information to obtain response information corresponding to the target application identification information, wherein the response information is used for representing whether the target application program can respond to the pause playing instruction.
The target application identification information is identification information for identifying a target application program, and the target application identification information may be an application program name, an application program serial number, an application program icon, and the like, which is not limited herein.
The electronic equipment can acquire a process number corresponding to an audio track (audio track) in an active state; then, target application identification information corresponding to the target application program is obtained according to the process number, a preset response relation table can be preset in the electronic device, and response information indicating whether each application program in the electronic device can respond to the pause playing instruction or not can be preset in the preset response relation table; if the target application is configured to be unable to respond to the pause instruction, the response information may indicate that the target application is unable to respond to the pause instruction. Therefore, after the target application identification information of the target application program is obtained, the preset response relation table can be searched according to the target application identification information, the response information corresponding to the target application identification information is obtained, and whether the target application program can respond to the pause playing instruction or not is determined according to the response information.
It should be noted that, in this embodiment, a preset response relationship table may be preset to indicate whether the target application program can respond to the pause instruction, for example, the live broadcast application cannot respond to the pause instruction, the video/voice call application cannot respond to the pause instruction, and music and video music can respond to the pause instruction, where the preset response relationship table may be stored in the local of the electronic device or in the cloud, and the pause instruction may be issued after the wireless headset is taken off, or may be a pause instruction triggered by detecting an operation of the user on the electronic device, and the like. According to the embodiment, whether the target audio is actually paused is not required to be judged, the response information is obtained to determine whether the playing is paused or not, the accuracy is good, and the use by a user is facilitated.
102. If not, the target audio is continuously output to the wireless earphone, and if so, the electronic equipment end is used as an audio output channel.
The electronic equipment end is used as an audio output channel, and the target audio can be played through a loudspeaker of the electronic equipment.
If the target application program does not respond to the pause playing, in order to avoid directly switching to the electronic equipment end to be an audio output channel, the electronic equipment end is externally placed to influence people around, bad experience is brought to the user, the target audio can be continuously output through the wireless earphone, and therefore no matter the user needs to manually close the playing of the target audio or continuously listen to the target audio through the wireless earphone, other people around cannot be influenced.
If the target application program responds to pause playing when the wireless earphone is taken off, the influence of the target audio playing to surrounding people does not exist, therefore, the audio output channel corresponding to the wireless earphone can be disconnected, the electronic equipment end is used as the audio output channel, when the user manually controls the target application program to cancel the pause playing, the electronic equipment can play the target audio through the loudspeaker of the electronic equipment, and therefore the user can be ensured to receive and hear the target audio after the wireless earphone is taken off.
Therefore, through the operation, the electronic equipment can be more flexibly controlled to switch the audio output channels, and the user experience of the user is improved. It can be understood that after the electronic device is taken as an audio output path, the method further comprises the following steps:
if the target application program is an audio and video playing application program, determining a wearing mode and playing volume of the wireless earphone before the wireless earphone is picked off;
if the wearing mode of the wireless earphone is in an ear-hanging mode and the playing volume is greater than the preset volume value, the playing volume of the audio is reduced.
Wherein, the wearing mode can be any one of the following modes: a supra-aural, in-ear, or head-mounted style, and is not limited herein.
The electronic equipment determines a wearing mode of the wireless earphone before being taken off, specifically obtains an earphone model corresponding to the wireless earphone in the process of pairing with the wireless earphone and establishing connection, and then searches corresponding earphone parameters from a preset database according to the earphone model of the wireless earphone, wherein the earphone parameters comprise the wearing mode of the wireless earphone, so that the electronic equipment can determine the wearing mode according to the earphone model of the wireless earphone.
In the specific implementation, considering that when the wireless headset continues to output the target audio through the wireless headset after being picked off, if the volume of the played target audio is large, surrounding people may also be affected, therefore, for the scene of audio and video playing, in the case that the target application program is the audio and video playing application program, the wearing mode and the playing volume of the wireless headset before being picked off are further determined, if the wearing mode of the wireless headset is in an ear-hang type, and the playing volume is larger than the preset volume value, the playing volume of the audio can be reduced, so that the situation that the volume of the wireless headset outputting the target audio is too large and surrounding people are noisy is prevented.
It is understood that, without conflict, on the basis of the foregoing steps 101 and 102 and/or various specific embodiments, in this embodiment of the present application, the following may be further included:
when the electronic equipment starts to play the target audio, determining whether the wireless earphone is in a wearing state;
if the wireless earphone is in a wearing state, audio output is carried out on the wireless earphone end, otherwise, audio output is carried out on the electronic equipment end;
when the wireless earphone is a pair of earphones, if the wireless earphone is in a wearing state, the method comprises the following steps: any one of the wireless earphones is in a wearing state.
The wireless earphone can determine whether the wireless earphone is in a wearing state when the target audio starts to be played, if the wireless earphone is in the wearing state, the audio output is carried out on the wireless earphone end, otherwise, the audio output is carried out on the electronic equipment end, and therefore the audio output channel of the target audio can be controlled according to the wearing state of the wireless earphone.
It should be noted that the audio playing path is determined according to the response information or the actual playing pause condition, so that when the user does not wear the earphone, it is avoided that some applications which cannot be paused are directly released out through the electronic device to affect the surrounding environment or reveal the privacy of the user, and it is also avoided that some applications which can be paused are still output through the earphone after the earphone is taken down, which is inconvenient for the user to use actually, and therefore, the usage requirements of the user are better met, further, when playing again, the wireless earphone wearing state is firstly detected, the audio output path is determined according to the detection result, and the user can further use conveniently.
It can be seen that, in the embodiment of the present application, when a target application program of an electronic device uses a wireless headset end as an audio output path of a target audio, if it is determined that the wireless headset is removed, it is determined whether the target application program responds to a pause of playing; if not, the target audio is continuously output to the wireless earphone, and if the target audio is not output to the wireless earphone, the electronic equipment end is used as an audio output path, so that the target audio can be continuously output through the wireless earphone when the target application program does not respond to the pause of playing, the audio output path can be flexibly and reasonably selected, the sound interruption of the target audio under the condition that the target audio is not paused when the earphone is taken off can be avoided, and the influence on surrounding people when the target audio is externally played through the electronic equipment end is avoided, so that the user experience is not good.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another audio playing control method according to an embodiment of the present application. As shown in fig. 2, the audio playback control method is applied to an electronic device connected to at least one of a pair of wireless earphones, and includes the following steps:
201. when state information representing that the pair of wireless earphones are both taken off is obtained, response information of a target application program of the electronic equipment is obtained, and the response information is used for representing whether the target application program can respond to a play pause instruction sent by the wireless earphone end.
The target application program can be any one of the following: the audio playing application refers to an application program mainly used for playing audio, and may be, for example, a music playing application, a reading application, or a broadcasting application, and is not limited herein.
The electronic device obtains the state information of the wireless headset which is picked off, and specifically, can receive the state information reported by the wireless headset. It can be understood that, if the wireless headset includes a first headset and a second headset, the first headset is connected to the second headset, and the first headset is connected to the electronic device, the first headset may report, to the electronic device, state information that both the first headset and the second headset are taken off when the first headset detects that the first headset is taken off and receives a state information representation that the second headset is taken off, which is reported by the second headset. It can be understood that, if the wireless headset includes a first headset and a second headset, and the first headset and the second headset are respectively connected with the electronic device, the first headset can report the state information of the first headset to the electronic device when detecting that the first headset is removed; when the second earphone detects that the second earphone is picked off, the state information of the second earphone can be reported to the electronic equipment, so that the electronic equipment can determine that the first earphone and the second earphone are both picked off according to the received state information of the first earphone and the received state information of the second earphone. It can be understood that, if the wireless headset includes a first headset and a second headset, the first headset is connected to the second headset, a main headset of the first headset and the second headset is connected to the electronic device, when any one of the two headsets detects that the headset is removed, the main headset sends status information to the electronic device, and the electronic device determines whether the first headset and the second headset are both removed according to the obtained statuses of the two headsets (it may be that one headset is removed after one headset is removed, and it is considered that the headsets are both removed when the latter headset is removed).
It can be understood that the detection of being taken off may be obtained by comparing wearing conditions detected twice or more, for example, the previous detection is a wearing state, and the next detection is a non-wearing state, and then the detection is determined to be taken off, which may be determined according to the conditions of multiple detections, or other detection methods, which is not limited in this embodiment.
It is understood that, in the step 201, acquiring the response information of the target application of the electronic device includes:
21. acquiring a process number corresponding to a sound track in an activated state at present;
22. determining target application identification information of a target application program according to the process number;
23. and searching a preset response relation table according to the target application identification information to obtain response information corresponding to the target application identification information.
The target application identification information is identification information for identifying a target application program, and the target application identification information may be an application program name, an application program serial number, an application program icon, and the like, which is not limited herein.
In specific implementation, the electronic device may obtain a process number corresponding to an audio track (audio track) currently in an active state; and then acquiring target application identification information corresponding to the target application program according to the process number, wherein a preset response relation table can be preset in the electronic equipment, and response information whether each application program in the electronic equipment can respectively respond to the pause playing instruction can be preset in the preset response relation table. It should be noted that the preset response relation table may be preset in the electronic device or may be set in the cloud. The response condition of the target application program can be determined by setting the response relation table, so that a reasonable audio output channel can be determined timely and accurately, and the use of a user is facilitated.
It can be understood that the obtaining of the status information indicating that the pair of wireless headsets are both off may be after obtaining the pause playing instruction, and the method further includes:
and A1, when the pause playing instruction is acquired, the target application program responds to the pause playing instruction to pause playing the target audio, or does not respond to the pause playing instruction to continue playing the target audio.
If the target application program can respond to the pause playing instruction, the electronic equipment pauses playing the target audio, and if the target application program cannot respond to the pause playing instruction, the electronic equipment does not pause playing the target audio.
202. And determining an audio output channel of the target application program according to the response information.
For example, the electronic device may determine, according to the response information, that the audio output path of the target application is the electronic device side or the wireless headset side.
It is to be understood that, when the response information indicates that the target application is capable of responding to the pause instruction to pause the playing of the target audio, the determining, in step 202, the audio output path of the target application according to the response information includes:
and determining the electronic equipment side as an audio output channel.
The electronic device side is an audio output path, and specifically may refer to a speaker of the electronic device as the audio output path.
If the target application program can respond to the playing pause instruction to pause the playing of the target audio when the wireless earphone is picked off, the influence of the external playing of the target audio on surrounding people does not exist, so that the audio output channel corresponding to the wireless earphone can be disconnected, the electronic equipment end is used as the audio output channel, and when the user manually controls the target application program to cancel the playing pause, the electronic equipment can play the target audio through the loudspeaker of the electronic equipment, so that the user can be ensured to hear the target audio after the earphone is picked off.
It is to be understood that, when the response information indicates that the target application is capable of responding to the pause instruction to pause the playing of the target audio, the determining, in step 202, the audio output path of the target application according to the response information includes:
the audio output path is maintained at the wireless headset end.
When the response information represents that the target application program can respond to the pause playing instruction to pause the playing of the target audio, the audio output channel is kept at the wireless earphone end, and the target audio is continuously output through the wireless earphone, so that the situation that when the earphone is taken off and the target audio is resumed to be played again, the target audio is exposed through the electronic equipment end to the surrounding people is avoided, and bad user experience is brought to a user.
It is to be understood that, when the response information indicates that the target application cannot respond to the pause playing instruction to pause the playing of the target audio, the determining, in step 202, the audio output path of the target application according to the response information includes:
and determining the wireless earphone end as an audio output channel.
When the response information represents that the target application program cannot respond to the pause playing instruction to pause the playing of the target audio, the audio output channel is kept at the wireless earphone end, and the target audio is continuously output through the wireless earphone, so that the sound interruption of the target audio under the condition that the playing of the target audio is not paused when the earphone is taken off can be avoided, surrounding people are prevented from being influenced when the target audio is placed outside through the electronic equipment end, and poor user experience is brought to a user. Based on the three specific audio output path selection manners given in step 202, the last one can be combined with any one of the two previous audio output path selection schemes, so as to meet different application requirements.
It is understood that, in the embodiment of the present application, after the step a1, the method further includes:
after the target audio is paused to be played, when a playing instruction is received, if at least one of the wireless earphones is determined to be in a wearing state, the wireless earphone end is determined to be used as an audio output channel, and the target audio is transmitted to the wireless earphone end.
After the target audio is paused to be played, if the electronic equipment receives a playing instruction, the playing of the target audio is resumed, and if at least one of the wireless earphones is determined to be in a wearing state, the wireless earphone end is determined to be used as an audio output channel, and the target audio is transmitted to the wireless earphone end.
It is understood that, in the embodiment of the present application, after the step a1, the method further includes:
after the target audio is paused to be played, if the playing instruction is received and the pair of wireless earphones are determined to be in the non-wearing state, the electronic equipment end is used as an audio output channel, and a loudspeaker of the electronic equipment is controlled to play the target audio.
After the target audio is paused to be played, if the electronic equipment receives a playing instruction, the playing of the target audio can be resumed, and if the pair of wireless earphones are both in a non-wearing state, the electronic equipment end is determined to be used as an audio output channel to control a loudspeaker of the electronic equipment to play the target audio, so that a user can be ensured to hear the target audio.
It can be seen that, in the embodiment of the present application, when state information indicating that both of the pair of wireless earphones are removed is obtained, response information of a target application program of the electronic device is obtained, where the response information is used to indicate whether the target application program can respond to a play pause instruction sent by the wireless earphone terminal; and determining the audio output channel of the target application program according to the response information, so that the audio output channel can be flexibly and reasonably selected, and when the wireless earphone is picked, the audio output channel can be flexibly switched according to the condition that whether the target application program can respond to the play pause instruction, thereby improving the user experience.
In accordance with the above, please refer to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, the electronic device includes: a processor 310, a communication interface 330, and a memory 320; and one or more programs 321, the one or more programs 321 being stored in the memory 320 and configured to be executed by the processor, the electronic device being connected with the wireless headset, the program 321 comprising instructions for:
when a target application program of the electronic equipment takes a wireless earphone end as an audio output channel of a target audio, if the wireless earphone is determined to be picked off, whether the target application program responds to pause playing is judged;
if not, the target audio is continuously output to the wireless earphone, and if so, the electronic equipment end is used as an audio output channel.
In one possible example, the wireless headset includes a single headset or dual headsets, and if the wireless headset is a dual headset, the connecting the electronic device with the wireless headset includes: at least one of the dual earphones is connected with the electronic equipment; if it is determined that the wireless headset is removed, in determining whether the target application responds to the pause in playback, the program 321 includes instructions for performing the following steps:
and if the double earphones are determined to be off, judging whether the target application program responds to the pause playing.
In one possible example, before determining whether the target application responds to pausing playback, program 321 further includes instructions for performing the steps of:
receiving a play pause instruction sent by the wireless earphone;
and if the target application program can respond to the playing pause instruction, the playing of the target audio can be paused, otherwise, the playing of the target audio cannot be paused.
In one possible example, in determining whether the target application responds to a pause in playback, program 321 includes instructions for performing the following steps:
and judging whether the target application program pauses playing the target audio.
In one possible example, in determining whether the target application responds to a pause in playback, program 321 includes instructions for performing the following steps:
acquiring a process number corresponding to a sound track in an activated state at present;
acquiring target application identification information of a target application program according to the process number;
and searching a preset response relation table according to the target application identification information to obtain response information corresponding to the target application identification information, wherein the response information is used for representing whether the target application program can respond to the pause playing instruction.
In one possible example, program 321 further includes instructions for performing the steps of:
when the electronic equipment starts to play the target audio, determining whether the wireless earphone is in a wearing state;
if the wireless earphone is in a wearing state, audio output is carried out on the wireless earphone end, otherwise, audio output is carried out on the electronic equipment end;
when the wireless earphone is a pair of earphones, if the wireless earphone is in a wearing state, the method comprises the following steps: any one of the wireless earphones is in a wearing state.
In another embodiment of the present application, where the electronic device is connected to at least one of a pair of wireless headsets, the program 321 includes instructions for:
when state information representing that a pair of wireless earphones are both taken off is obtained, response information of a target application program of the electronic equipment is obtained, and the response information is used for representing whether the target application program can respond to a play pause instruction sent by a wireless earphone end;
and determining an audio output channel of the target application program according to the response information.
In one possible example, after obtaining the pause playback instruction, the program 321 includes instructions for performing the following steps:
when the pause playing instruction is acquired, the target application program responds to the pause playing instruction to pause playing the target audio, or the target application program does not respond to the pause playing instruction to continue playing the target audio.
In one possible example, when the response information characterizes that the target application is capable of responding to the pause-play instruction to pause playing the target audio, in determining the audio output path of the target application according to the response information, the program 321 further includes instructions for performing the following steps:
and determining the electronic equipment side as an audio output channel.
In one possible example, when the response information characterizes that the target application is capable of responding to a pause-play instruction to pause playing the target audio, in determining the audio output path of the target application according to the response information, the program 321 includes instructions for performing the following steps:
the audio output path is maintained at the wireless headset end.
In one possible example, when the response information characterizes that the target application is unable to respond to the pause-play instruction to pause playing the target audio, in determining the audio output path of the target application based on the response information, the program 321 includes instructions for performing the following steps:
and determining the wireless earphone end as an audio output channel.
In one possible example, program 321 further includes instructions for performing the steps of:
after the target audio is paused to be played, when a playing instruction is received, if at least one of the wireless earphones is determined to be in a wearing state, the wireless earphone end is determined to be used as an audio output channel, and the target audio is transmitted to the wireless earphone end.
In one possible example, program 321 further includes instructions for performing the steps of:
after the target audio is paused to be played, if the playing instruction is received and the pair of wireless earphones are determined to be in the non-wearing state, the electronic equipment end is used as an audio output channel, and a loudspeaker of the electronic equipment is controlled to play the target audio.
In one possible example, in obtaining response information for a target application of an electronic device, the program 321 includes instructions for performing the following steps:
and determining the wireless earphone end as an audio output channel.
Acquiring a process number corresponding to a sound track in an activated state at present;
determining target application identification information of a target application program according to the process number;
and searching a preset response relation table according to the target application identification information to obtain response information corresponding to the target application identification information.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an audio playing control device provided in this embodiment, which is applied to an electronic device, the electronic device is connected to a wireless headset, the audio playing control device includes a determining unit 401 and a processing unit 402, wherein,
a determining unit 401, configured to determine whether a target application program of the electronic device responds to a pause of playing if it is determined that the wireless headset is removed when the target application program uses the wireless headset end as an audio output path of a target audio;
a processing unit 402, configured to continue outputting the target audio to the wireless headset if the target application does not respond to the pause of the playback; and if the target application program responds to the pause of the playing, the electronic equipment end is taken as an audio output channel.
It is understood that the wireless headset includes a single headset or a dual headset, and if the wireless headset is a dual headset, the connecting the electronic device with the wireless headset includes: at least one of the dual earphones is connected with the electronic equipment; if it is determined that the wireless headset is removed, in terms of determining whether the target application responds to the pause playback, the determining unit 401 is specifically configured to:
and if the double earphones are determined to be off, judging whether the target application program responds to the pause playing.
It is to be understood that, before determining whether the target application responds to the pause in play, the processing unit 402 is further configured to:
receiving a play pause instruction sent by the wireless earphone;
and if the target application program can respond to the playing pause instruction, the playing of the target audio can be paused, otherwise, the playing of the target audio cannot be paused.
It is understood that, in terms of determining whether the target application responds to the pause of the playback, the determining unit 401 is specifically configured to:
and judging whether the target application program pauses playing the target audio.
It is to be understood that, in terms of determining whether the target application responds to the paused playing, the determining unit 401 is configured to: acquiring response information of the target application program, and determining whether the target application program responds to the pause playing according to the response information so as to determine an audio output channel; it is particularly useful in the context of,
acquiring a process number corresponding to a sound track in an activated state at present;
acquiring target application identification information of a target application program according to the process number;
and searching a preset response relation table according to the target application identification information to obtain response information corresponding to the target application identification information, wherein the response information is used for representing whether the target application program can respond to the pause playing instruction.
It is to be appreciated that the processing unit 402 is further configured to:
when the electronic equipment starts to play the target audio, determining whether the wireless earphone is in a wearing state;
if the wireless earphone is in a wearing state, audio output is carried out on the wireless earphone end, otherwise, audio output is carried out on the electronic equipment end;
when the wireless earphone is a pair of earphones, if the wireless earphone is in a wearing state, the method comprises the following steps: any one of the wireless earphones is in a wearing state.
It can be seen that, in the embodiment of the present application, when a target application program of an electronic device uses a wireless headset end as an audio output path of a target audio, if it is determined that the wireless headset is removed, it is determined whether the target application program responds to a pause of playing; if not, the target audio is continuously output to the wireless earphone, and if the target audio is not output to the wireless earphone, the electronic equipment end is used as an audio output path, so that the target audio can be continuously output through the wireless earphone when the target application program does not respond to the pause of playing, the audio output path can be flexibly and reasonably selected, the sound interruption of the target audio under the condition that the target audio is not paused when the earphone is taken off can be avoided, and the influence on surrounding people when the target audio is externally played through the electronic equipment end is avoided, so that the user experience is not good.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an audio playing control device provided in this embodiment, which is applied to a connection between an electronic device and at least one of a pair of wireless earphones, the audio playing control device includes an obtaining unit 501 and a determining unit 502, wherein,
the obtaining unit 501 is configured to obtain response information of a target application program of the electronic device when state information indicating that a pair of wireless earphones are both removed is obtained, where the response information is used to indicate whether the target application program can respond to a play pause instruction sent by a wireless earphone terminal;
a determining unit 502, configured to determine an audio output path of the target application according to the response information.
It can be understood that after the state information indicating that the pair of wireless earphones are both taken off is obtained, the determining unit 502 is further configured to:
when the pause playing instruction is acquired, the target application program responds to the pause playing instruction to pause playing the target audio, or the target application program does not respond to the pause playing instruction to continue playing the target audio.
It is to be understood that, when the response information indicates that the target application can respond to the pause playing instruction to pause playing the target audio, in terms of determining the audio output path of the target application according to the response information, the determining unit 502 is specifically configured to:
and determining the electronic equipment side as an audio output channel.
It is to be understood that, when the response information indicates that the target application can respond to the pause playing instruction to pause playing the target audio, in terms of determining the audio output path of the target application according to the response information, the determining unit 502 is specifically configured to:
the audio output path is maintained at the wireless headset end.
It is to be understood that, when the response information is characterized that the target application program cannot respond to the pause playing instruction to pause playing the target audio, in terms of determining the audio output path of the target application program according to the response information, the determining unit 502 is specifically configured to:
and determining the wireless earphone end as an audio output channel.
It is to be understood that the determining unit 502 is further configured to:
after the target audio is paused to be played, when a playing instruction is received, if at least one of the wireless earphones is determined to be in a wearing state, the wireless earphone end is determined to be used as an audio output channel, and the target audio is transmitted to the wireless earphone end.
It is to be understood that the determining unit 502 is further configured to:
after the target audio is paused to be played, if the playing instruction is received and the pair of wireless earphones are determined to be in the non-wearing state, the electronic equipment end is used as an audio output channel, and a loudspeaker of the electronic equipment is controlled to play the target audio.
It is understood that, in terms of acquiring the response information of the target application of the electronic device, the acquiring unit is specifically configured to:
acquiring a process number corresponding to a sound track in an activated state at present;
determining target application identification information of a target application program according to the process number;
and searching a preset response relation table according to the target application identification information to obtain response information corresponding to the target application identification information.
It can be seen that, in the embodiment of the present application, when state information indicating that both of the pair of wireless earphones are removed is obtained, response information of a target application program of the electronic device is obtained, where the response information is used to indicate whether the target application program can respond to a play pause instruction sent by the wireless earphone terminal; and determining the audio output channel of the target application program according to the response information, so that the audio output channel can be flexibly and reasonably selected, and when the wireless earphone is picked, the audio output channel can be flexibly switched according to the condition that whether the target application program can respond to the play pause instruction, thereby improving the user experience.
It can be understood that the functions of each program module of the audio playback control apparatus in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Referring to fig. 6, fig. 6 is a diagram of an audio playing control system according to an embodiment of the present application, including an electronic device and a wireless headset, where the electronic device is connected to the wireless headset, and in this case,
if the wireless earphone determines that the wearing state is changed into the non-wearing state, or the wireless earphone determines that the wearing state is changed into the non-wearing state and the target application program of the electronic equipment is in the playing state,
sending a play pause instruction to the electronic equipment;
after the electronic equipment receives the playing pause instruction, if the target application program can respond to the playing pause instruction, pausing to play the target audio;
if the target application program cannot respond to the pause playing instruction, continuing playing the target audio;
the wireless earphone sends a state change instruction to the electronic equipment within a preset time after sending a play pause instruction to the electronic equipment; and after receiving the state change instruction, the electronic equipment acquires the response information of the target application program and determines the audio playing path of the target application program according to the response information.
If the wireless earphone determines that the wearing state is changed into the non-wearing state, or the wireless earphone determines that the wearing state is changed into the non-wearing state and the target application program of the electronic equipment is in the playing state, the wireless earphone can send a playing pause instruction to the electronic equipment, and if the target application program can respond to the playing pause instruction, the electronic equipment pauses playing of the target audio; and if the target application program cannot respond to the pause playing instruction, continuing to play the target audio.
The response information is used for representing whether the target application program can respond to the pause playing instruction. The electronic equipment can receive a state change instruction sent by the wireless earphone within a preset time after receiving the play pause instruction, wherein the state change instruction is used for indicating that the wireless earphone is changed from a wearing state to a non-wearing state, and after receiving the state change instruction, the electronic equipment acquires response information of the target application program and determines an audio play path of the target application program according to the response information.
It is understood that when the response information is characterized that the target application program can respond to the pause playing instruction to pause the playing of the target audio, determining the audio output path of the target application program according to the response information includes:
and determining the electronic equipment side as an audio output channel.
It is understood that when the response information is characterized that the target application program can respond to the pause playing instruction to pause the playing of the target audio, determining the audio output path of the target application program according to the response information includes:
the audio output path is maintained at the wireless headset end.
It is understood that when the response information is characterized that the target application program cannot respond to the pause playing instruction to pause the playing of the target audio, determining the audio output path of the target application program according to the response information comprises:
and determining the wireless earphone end as an audio output channel.
It can be seen that, in the embodiment of the present application, when state information that the wireless headset is taken off is obtained, response information of a target application program of the electronic device is obtained, where the response information is used to represent whether the target application program can respond to a play pause instruction sent by the wireless headset end; and determining the audio output channel of the target application program according to the response information, so that the audio output channel can be flexibly switched according to the condition that whether the target application program can respond to the play pause instruction or not when the wireless earphone is taken off, and the user experience is improved.
Referring to fig. 7, fig. 7 is a diagram of another audio playing control system according to an embodiment of the present application, including an electronic device and a wireless headset, where the wireless headset includes a first headset and a second headset, the electronic device is connected to at least one of the first and second headsets, where,
if any earphone of the wireless earphones is determined to be changed from the wearing state to the non-wearing state, or if any earphone of the wireless earphones is determined to be changed from the wearing state to the non-wearing state and the target application program of the electronic equipment is in the playing state,
sending a pause playing instruction to the electronic equipment, and after the electronic equipment receives the pause playing instruction, pausing to play the target audio if the target application program of the electronic equipment can respond to the pause playing instruction;
if the target application program of the electronic equipment cannot respond to the playing pause instruction, continuing to play the target audio;
if the wireless earphone determines that the two earphones are both taken off, state information is sent to the electronic equipment;
the electronic equipment receives the state information and then acquires response information of the target application program;
and the electronic equipment determines the audio playing path of the target application program according to the response information.
The response information is used for representing whether the target application program can respond to the pause playing instruction. The state change instruction is used for indicating the wireless headset to change from a wearing state to a non-wearing state.
In a specific implementation, if any one of the earphones of the wireless earphone determines to change from the wearing state to the non-wearing state, or if any one of the earphones of the wireless earphone determines to change from the wearing state to the non-wearing state and the target application program of the electronic device is in the playing state, a playing pause instruction is sent to the electronic device. And if the wireless earphones determine that the two earphones are both taken off, sending state information to the electronic equipment.
After the electronic equipment receives the playing pause instruction, if a target application program of the electronic equipment can respond to the playing pause instruction, pausing to play the target audio; and if the target application program of the electronic equipment cannot respond to the pause playing instruction, continuing playing the target audio. After the electronic equipment receives the state information, response information of the target application program can be obtained, and an audio playing channel of the target application program is determined according to the response information.
It is understood that when the response information is characterized that the target application program can respond to the pause playing instruction to pause the playing of the target audio, determining the audio output path of the target application program according to the response information includes:
and determining the electronic equipment side as an audio output channel.
It is understood that when the response information is characterized that the target application program can respond to the pause playing instruction to pause the playing of the target audio, determining the audio output path of the target application program according to the response information includes:
the audio output path is maintained at the wireless headset end.
It is understood that when the response information is characterized that the target application program cannot respond to the pause playing instruction to pause the playing of the target audio, determining the audio output path of the target application program according to the response information comprises:
and determining the wireless earphone end as an audio output channel.
It can be seen that, in the embodiment of the present application, when state information that both the earphones are detached is obtained, response information of a target application program of the electronic device is obtained, where the response information is used to represent whether the target application program can respond to a play pause instruction sent by the wireless earphone terminal; and determining the audio output channel of the target application program according to the response information, so that the audio output channel can be flexibly switched according to the condition that whether the target application program can respond to the play pause instruction or not when the wireless earphone is taken off, and the user experience is improved.
Embodiments of the present application also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above embodiments of the image processing method, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the image processing methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (20)

1. An audio playing control method is applied to an electronic device, wherein the electronic device is connected with a wireless headset, and the method comprises the following steps:
when a target application program of the electronic equipment takes the wireless earphone end as an audio output channel of target audio, if the wireless earphone is determined to be picked off, judging whether the target application program responds to pause playing;
if not, continuing to output the target audio to the wireless earphone, and if so, taking the electronic equipment end as an audio output channel.
2. The method of claim 1, wherein the wireless headset comprises a single headset or a dual headset, and if the wireless headset is a dual headset, the connecting the electronic device to the wireless headset comprises: at least one of the dual earphones is connected with the electronic device;
if the wireless earphone is determined to be picked off, judging whether the target application program responds to the pause of playing or not, wherein the steps comprise:
and if the double earphones are determined to be off, judging whether the target application program responds to pause playing.
3. The method of claim 1,
before the determining whether the target application responds to the paused playing, the method further comprises:
receiving a pause playing instruction sent by the wireless earphone;
and if the target application program can respond to the playing pause instruction, the playing of the target audio can be paused, otherwise, the playing of the target audio cannot be paused.
4. The method of claim 1, wherein determining whether the target application is responsive to pausing playback comprises:
and judging whether the target application program pauses the playing of the target audio.
5. The method of claim 1, wherein determining whether the target application is responsive to pausing playback comprises:
acquiring a process number corresponding to a sound track in an activated state at present;
acquiring target application identification information of the target application program according to the process number;
and searching a preset response relation table according to the target application identification information to obtain response information corresponding to the target application identification information, wherein the response information is used for representing whether the target application program can respond to the pause playing instruction or not.
6. The method according to any one of claims 1-5, further comprising:
when the electronic equipment starts to play the target audio, determining whether the wireless earphone is in a wearing state;
if the wireless earphone is in a wearing state, audio output is carried out on the wireless earphone end, otherwise, audio output is carried out on the electronic equipment end;
when the wireless headset is a pair of headsets, if the wireless headset is in a wearing state, the method comprises the following steps: any one of the wireless earphones is in a wearing state.
7. An audio play control method applied to an electronic device connected to at least one of a pair of wireless earphones, the method comprising:
when state information representing that the pair of wireless earphones are both taken off is obtained, response information of a target application program of the electronic equipment is obtained, wherein the response information is used for representing whether the target application program can respond to a play pause instruction sent by the wireless earphone end;
and determining an audio output channel of the target application program according to the response information.
8. The method according to claim 7, wherein the obtaining of the status information indicating that the pair of wireless earphones are both taken off is after obtaining the pause playing instruction, and the method further comprises:
when the pause playing instruction is acquired, the target application program responds to the pause playing instruction to pause playing of the target audio, or the target application program does not respond to the pause playing instruction to continue playing of the target audio.
9. The method according to claim 7 or 8, wherein when the response information indicates that the target application can respond to the pause playing instruction to pause playing of the target audio, the determining the audio output path of the target application according to the response information comprises:
and determining the electronic equipment end as the audio output channel.
10. The method according to claim 7 or 8, wherein when the response information indicates that the target application can respond to a pause-play instruction to pause playing of target audio, the determining the audio output path of the target application according to the response information comprises:
maintaining the audio output path at the wireless headset end.
11. The method according to claim 7 or 8, wherein when the response information indicates that the target application program cannot respond to the pause instruction to pause playing the target audio, the determining the audio output path of the target application program according to the response information comprises:
and determining the wireless earphone end as the audio output path.
12. The method of claim 8, further comprising:
after the target audio is paused to be played, when a playing instruction is received, if at least one of the wireless earphones is determined to be in a wearing state, the wireless earphone end is determined to be used as the audio output channel, and the target audio is transmitted to the wireless earphone end.
13. The method according to claim 7 or 8, characterized in that the method further comprises:
and after the target audio is paused to be played, if the playing instruction is received and the pair of wireless earphones are determined to be in the non-wearing state, the electronic equipment end is taken as the audio output channel, and a loudspeaker of the electronic equipment is controlled to play the target audio.
14. The method according to claim 7 or 8, wherein the obtaining response information of the target application of the electronic device comprises:
acquiring a process number corresponding to a sound track in an activated state at present;
determining target application identification information of the target application program according to the process number;
and searching a preset response relation table according to the target application identification information to obtain response information corresponding to the target application identification information.
15. An audio playback control apparatus, applied to an electronic device connected to a wireless headset, the audio playback control apparatus comprising:
the judging unit is used for judging whether a target application program of the electronic equipment responds to pause playing if the wireless earphone is determined to be picked off when the target application program of the electronic equipment takes the wireless earphone end as an audio output channel of target audio;
the processing unit is used for continuing to output the target audio to the wireless earphone if the target application program does not respond to the pause of playing; and if the target application program responds to the pause of playing, the electronic equipment end is taken as an audio output channel.
16. An audio playback control apparatus applied to an electronic device connected to at least one of a pair of wireless headphones, the audio playback control apparatus comprising:
the acquisition unit is used for acquiring response information of a target application program of the electronic equipment when state information representing that the pair of wireless earphones are both taken off is acquired, wherein the response information is used for representing whether the target application program can respond to a play pause instruction sent by the wireless earphone end;
and the determining unit is used for determining the audio output path of the target application program according to the response information.
17. An audio playing control system, comprising an electronic device and a wireless earphone, wherein the electronic device is connected with the wireless earphone,
if the wireless earphone determines that the wearing state is changed into the non-wearing state, or the wireless earphone determines that the wearing state is changed into the non-wearing state and the target application program of the electronic equipment is in the playing state,
sending a play pause instruction to the electronic equipment;
after the electronic equipment receives the playing pause instruction, if the target application program can respond to the playing pause instruction, pausing to play the target audio;
if the target application program cannot respond to the pause playing instruction, continuing playing the target audio;
the wireless earphone sends a state change instruction to the electronic equipment within a preset time after sending the play pause instruction to the electronic equipment; and after receiving the state change instruction, the electronic equipment acquires response information of the target application program and determines an audio playing path of the target application program according to the response information.
18. An audio playback control system comprising an electronic device and a wireless headset, the wireless headset comprising a first headset and a second headset, the electronic device being connected to at least one of the wireless headsets, wherein,
if any earphone of the wireless earphones is determined to be changed from the wearing state to the non-wearing state, or if any earphone of the wireless earphones is determined to be changed from the wearing state to the non-wearing state and the target application program of the electronic equipment is in the playing state,
sending a pause playing instruction to the electronic equipment, and after receiving the pause playing instruction, pausing to play the target audio if the target application program of the electronic equipment can respond to the pause playing instruction by the electronic equipment;
if the target application program of the electronic equipment cannot respond to the pause playing instruction, continuing playing the target audio;
if the wireless earphones determine that the two earphones are both taken off, state information is sent to the electronic equipment;
the electronic equipment receives the state information and then acquires response information of the target application program;
and the electronic equipment determines an audio playing path of the target application program according to the response information.
19. An electronic device, comprising: a processor and a memory; and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for the method of any of claims 1-14.
20. A computer-readable storage medium for storing a computer program, wherein the computer program causes a computer to perform the method of any one of claims 1-14.
CN202010821060.5A 2020-08-14 2020-08-14 Audio playing control method and device, electronic equipment and storage medium Pending CN114077414A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010821060.5A CN114077414A (en) 2020-08-14 2020-08-14 Audio playing control method and device, electronic equipment and storage medium
PCT/CN2021/101231 WO2022033176A1 (en) 2020-08-14 2021-06-21 Audio play control method and apparatus, and electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010821060.5A CN114077414A (en) 2020-08-14 2020-08-14 Audio playing control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114077414A true CN114077414A (en) 2022-02-22

Family

ID=80247627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010821060.5A Pending CN114077414A (en) 2020-08-14 2020-08-14 Audio playing control method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114077414A (en)
WO (1) WO2022033176A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117492689A (en) * 2023-12-28 2024-02-02 荣耀终端有限公司 Audio processing method and electronic equipment
CN117492689B (en) * 2023-12-28 2024-04-19 荣耀终端有限公司 Audio processing method and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115119098B (en) * 2022-08-30 2022-12-27 荣耀终端有限公司 Audio playing control method, TWS earphone and storage medium
CN115175065B (en) * 2022-09-06 2023-01-17 荣耀终端有限公司 Broadcasting method, TWS headset and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024193A (en) * 2012-12-25 2013-04-03 北京百度网讯科技有限公司 Mobile terminal and play control method and play control device for same
CN105491469A (en) * 2014-09-15 2016-04-13 Tcl集团股份有限公司 Method and system for controlling audio output mode based on wearing earphone state
CN106453791A (en) * 2016-10-27 2017-02-22 宇龙计算机通信科技(深圳)有限公司 A sound signal output method and apparatus and an earphone state detection method and apparatus
WO2020082387A1 (en) * 2018-10-27 2020-04-30 深圳市欢太科技有限公司 Method for changing audio channel, and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117492689A (en) * 2023-12-28 2024-02-02 荣耀终端有限公司 Audio processing method and electronic equipment
CN117492689B (en) * 2023-12-28 2024-04-19 荣耀终端有限公司 Audio processing method and electronic equipment

Also Published As

Publication number Publication date
WO2022033176A1 (en) 2022-02-17

Similar Documents

Publication Publication Date Title
US11102697B2 (en) Method for controlling earphone switching and earphone
CN108541080B (en) Method for realizing loop connection between first electronic equipment and second electronic equipment and related product
CN108886653B (en) Earphone sound channel control method, related equipment and system
CN108966067B (en) Play control method and related product
CN108777827B (en) Wireless earphone, volume adjusting method and related product
US11395059B2 (en) Master/slave switching method for wearable apparatus and related product
CN109067965B (en) Translation method, translation device, wearable device and storage medium
CN110460721B (en) Starting method and device and mobile terminal
CN108600887B (en) Touch control method based on wireless earphone and related product
CN108600539B (en) Mobile terminal, position detection method and related product
CN108897516B (en) Wearable device volume adjustment method and related product
CN108848267B (en) Audio playing method and mobile terminal
CN108833683B (en) Dynamic antenna adjustment implementation method and related product
WO2022033176A1 (en) Audio play control method and apparatus, and electronic device and storage medium
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN108834013B (en) Wearable equipment electric quantity balancing method and related product
CN108882084B (en) Wearable equipment electric quantity balancing method and related product
CN108668018B (en) Mobile terminal, volume control method and related product
CN108319440B (en) Audio output method and mobile terminal
CN112653965A (en) Audio playing control circuit and method and device thereof, electronic equipment and storage medium
CN110415495B (en) Equipment loss processing method and related equipment
CN108683800B (en) Mobile terminal, position detection method and related product
CN108600906B (en) Playing control method and device for multiple sound boxes
CN110083205B (en) Page switching method, wearable device and computer-readable storage medium
CN109618062B (en) Voice interaction method, device, equipment and computer readable 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