[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112997471B - Audio channel switching method and device, readable storage medium and electronic equipment - Google Patents

Audio channel switching method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN112997471B
CN112997471B CN201880098670.8A CN201880098670A CN112997471B CN 112997471 B CN112997471 B CN 112997471B CN 201880098670 A CN201880098670 A CN 201880098670A CN 112997471 B CN112997471 B CN 112997471B
Authority
CN
China
Prior art keywords
audio
audio channel
data
condition
channel switching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201880098670.8A
Other languages
Chinese (zh)
Other versions
CN112997471A (en
Inventor
李亚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN112997471A publication Critical patent/CN112997471A/en
Application granted granted Critical
Publication of CN112997471B publication Critical patent/CN112997471B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Headphones And Earphones (AREA)

Abstract

An audio channel switching method and device, a computer readable storage medium and an electronic device are provided, the audio channel switching method is applied to the electronic device with a plurality of audio channels, and the audio channel switching method comprises the following steps: receiving an audio channel switching instruction, wherein the audio channel switching instruction refers to an instruction for switching a wireless earphone channel to other audio channels except the wireless earphone audio channel; judging whether an audio channel switching condition is met; if so, converting the audio channel of the wireless earphone into the other audio channels for audio output; if not, the audio channel of the wireless earphone is kept for audio output.

Description

Audio channel switching method and device, readable storage medium and electronic equipment
Technical Field
The present application relates to the field of electronic device technologies, and in particular, to an audio channel switching method and apparatus, a readable storage medium, and an electronic device.
Background
In daily life, when people use electronic equipment such as mobile phones in some scenes, the wireless earphones are often required to be connected. For example, when driving or in motion.
When the wireless earphone is connected with electronic equipment such as a mobile phone, sometimes the switching between the wireless earphone and other audio channels is triggered due to misoperation or abnormal conditions, so that the wireless earphone is disconnected and other audio channels are connected. This not only interrupts the audio output that the user is currently performing, but also requires the user to re-operate to resume the connection of the wireless headset, causing a lot of trouble to the user. The main reason for this problem is that the switching method of the wireless headset and other audio channels in the conventional technology is not intelligent enough.
Disclosure of Invention
The embodiment of the application provides an audio channel switching method and device, a computer readable storage medium and electronic equipment, which can effectively prevent audio channel switching errors caused by misoperation or system abnormity, further prevent audio data from being output by using a loudspeaker or a receiver channel and the like in inappropriate scenes, and improve the intelligence of the electronic equipment during audio channel switching.
An audio channel switching method is applied to electronic equipment and comprises the following steps:
receiving an audio channel switching instruction, wherein the audio channel switching instruction refers to an instruction for switching a wireless earphone channel to other audio channels except the wireless earphone audio channel;
judging whether an audio channel switching condition is met;
if so, converting the audio channel of the wireless earphone into the other audio channels for audio output;
if not, the audio channel of the wireless earphone is kept for audio output.
An audio channel switching device applied to an electronic device, the device comprising:
the wireless earphone comprises a receiving module, a switching module and a switching module, wherein the receiving module is used for receiving an audio channel switching instruction, and the audio channel switching instruction refers to an instruction for switching a wireless earphone channel to other audio channels except the wireless earphone;
The judging module is used for judging whether the audio channel switching condition is met;
the execution module is used for converting the wireless earphone audio channel into the other audio channels for audio output when the audio channel switching condition is met; and when the audio channel switching condition is not met, keeping the audio channel of the wireless earphone for audio output.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the audio path switching method described above.
An electronic device comprises a memory and a processor, wherein the memory stores computer readable instructions, and the instructions, when executed by the processor, cause the processor to execute the audio channel switching method.
After receiving an audio channel switching instruction, the audio channel switching method and apparatus, the computer-readable storage medium, and the electronic device determine whether an audio channel switching condition is met, and if the audio channel switching condition is met, convert the wireless headset audio channel into the other audio channels for audio output; and if the audio channel switching condition is not met, keeping the audio channel of the wireless earphone for audio output. The audio channel switching method and device, the computer readable storage medium and the electronic equipment do not directly switch the audio channel after receiving the audio channel switching instruction, but judge whether to switch the audio channel according to the preset condition, thereby effectively preventing the switching error caused by misoperation or system abnormity, further preventing the audio data output by using a loudspeaker or a receiver channel and the like in an inappropriate scene, and improving the intelligence of the electronic equipment during the audio channel switching.
Drawings
Fig. 1 is a schematic internal structural diagram of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an audio channel switching method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for determining whether an audio channel switching condition is satisfied according to an audio channel setting parameter according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for determining whether an audio channel switching condition is satisfied according to wireless headset status data according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a method for determining whether an audio channel switching condition is satisfied according to user usage scenario data according to an embodiment of the present application;
fig. 6 is a schematic flowchart of an audio channel switching method according to an embodiment of the present application;
fig. 7 is a schematic diagram of a frame of an audio path switching apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
In one embodiment, as shown in FIG. 1, a schematic diagram of an internal structure of an electronic device is provided. The electronic device includes a processor, a memory, and a display screen connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory is used for storing data, programs, instruction codes and/or the like, and at least one computer program is stored on the memory, and the computer program can be executed by the processor to realize the audio channel switching method suitable for the electronic equipment provided by the embodiment of the application. The Memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random-Access-Memory (RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a database, and a computer program. The database stores data related to implementing an audio channel switching method provided in the above embodiments, for example, information such as a name of each process or application may be stored. The computer program can be executed by a processor for implementing an audio path switching method provided by various embodiments of the present application. The internal memory provides a cached operating environment for the operating system, databases, and computer programs in the non-volatile storage medium. The display screen may be a touch screen, such as a capacitive screen or an electronic screen, and is configured to display interface information of an application corresponding to a foreground process, and also may be configured to detect a touch operation applied to the display screen, and generate a corresponding instruction, such as a switching instruction for performing foreground and background applications.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the electronic devices to which the subject application may be applied, and that a particular electronic device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. For example, the electronic device further includes a network interface connected via the system bus, where the network interface may be an ethernet card or a wireless network card, and the like, and is used for communicating with an external electronic device, such as a server.
Referring to fig. 2, an embodiment of the present application provides an audio channel switching method. The audio channel switching method is applied to electronic equipment with a wireless earphone audio channel. The wireless earphone can be a Bluetooth earphone or an infrared earphone, etc. The audio channel switching method provided by the embodiment of the application is mainly used for controlling the switching of the audio channel when receiving an audio channel switching instruction under the condition that the wireless earphone channel is used for outputting audio, and preventing the condition that the wireless earphone channel is switched to other channels when misoperation or system abnormity occurs. In one embodiment, the electronic Device may be a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a Mobile Internet Device (MID), a wearable Device (e.g., a smart watch, a smart bracelet, a pedometer, etc.), or other electronic devices having multiple audio paths such as an earphone audio path.
As shown in fig. 2, an audio channel switching method applied to an electronic device includes S10-S40:
and S10, receiving an audio channel switching instruction, wherein the audio channel switching instruction is an instruction for switching the wireless earphone channel to other audio channels except the wireless earphone audio channel.
The audio path refers to a channel of audio data output. The audio path may include an earpiece path, a speaker path, a wireless headset path, a wired headset path, and the like. When the audio channel is a receiver channel, the audio data is sent out by a receiver; when the audio channel is a loudspeaker channel, the audio data is sent out by an external loudspeaker; when the audio channel is a wireless earphone channel, the audio data can be sent out through the wired earphone; when the audio channel is a wired earphone channel, the audio data can be sent out through the wired earphone.
The audio channel switching instruction is to switch the wireless earphone channel to the earphone channel, the speaker channel or the wired earphone channel. The audio channel switching instruction may be a switching instruction input by a user, or may be a switching instruction output by the electronic device according to a preset automatic switching rule.
And S20, judging whether the audio channel switching condition is satisfied.
And after receiving the audio channel switching instruction, the electronic equipment judges whether the current condition meets the audio channel switching condition according to a preset judgment rule, so as to determine whether to switch the audio channel. The preset judgment rule can be set according to actual requirements, and the method is not limited in the application. For example, the preset determination rule may be set according to the surrounding environment, the setting of the user, or the habit of the user.
And S30, if yes, converting the wireless earphone audio channel into the other audio channels for audio output.
According to the judgment of the S20, if the audio channel switching condition is satisfied, the electronic device executes the audio channel switching instruction, and converts the currently used audio output channel from the wireless headset audio channel to the other audio channel.
And S40, if not, keeping the wireless earphone audio channel for audio output.
According to the judgment of the S20, if the audio channel switching condition is not satisfied, the electronic equipment does not execute the audio channel switching instruction, and keeps the audio channel of the wireless earphone to continue outputting the audio.
In this embodiment, after receiving an audio channel switching instruction, the method determines whether an audio channel switching condition is satisfied, and if the audio channel switching condition is satisfied, converts the audio channel of the wireless headset into the other audio channels for audio output; and if the audio channel switching condition is not met, keeping the audio channel of the wireless earphone for audio output. According to the method provided by the embodiment of the application, after the audio channel switching instruction is received, the audio channel is not directly switched, whether the audio channel is switched or not is judged according to the preset condition, the switching error caused by misoperation or system abnormity is effectively prevented, the audio data output by using a loudspeaker or a receiver channel and the like in an unsuitable scene is further prevented, and the intelligence of the electronic equipment during the audio channel switching is improved.
In one embodiment, S20 includes:
s210, judging whether the audio channel switching condition is met according to the audio channel setting parameter.
The audio channel setting parameter refers to a parameter which is preset by a user and relates to audio channel switching. The audio channel setting parameter is used for representing fixed selection or preferential selection when the audio channel of the user is switched. For example, the audio path setting parameters may include, but are not limited to: 1) outputting audio data through a wireless earphone; 2) when the wireless earphone is disconnected, the loudspeaker output is preferentially selected; 3) when the wireless headset is disconnected, the earpiece output, etc. is preferred.
Referring to fig. 3, in an embodiment, S210 specifically includes:
s211, acquiring the audio channel setting parameters;
s212, if the audio channel setting parameters do not comprise fixed earphone connection parameters, the audio channel switching conditions are met;
otherwise, the audio path switching condition is not satisfied.
The fixed earphone connection parameters refer to parameters which represent that a user fixedly sets and outputs audio through the wireless earphone in the audio channel setting parameters. The electronic equipment can display the selection items to the user through a system setting interface or a setting interface of an audio data program so as to collect and acquire the audio channel setting parameters. And the electronic equipment screens the audio channel setting parameters, and if the audio channel setting parameters comprise the fixed earphone connection parameters, the audio channel setting parameters indicate that a user only considers audio output through a wireless earphone, and then the audio channel switching conditions are not met. And the electronic equipment keeps the current wireless earphone channel for audio output. If the audio channel setting parameter does not include the fixed earphone connection parameter, it indicates that the user can consider outputting through other channels except the wireless earphone channel. And meeting the audio channel switching condition, and carrying out audio channel switching by the electronic equipment according to the audio channel switching instruction.
In this embodiment, whether the audio channel switching condition is satisfied is determined by determining whether the audio channel setting parameter includes the fixed earphone connection parameter, so that the accuracy of the audio channel switching determination is improved, and the intelligence of the audio channel switching is further improved.
In one embodiment, S20 includes:
and S220, judging whether the audio channel switching condition is met according to the wireless earphone condition data.
The wireless headset condition data refers to parameters representing the working condition and the audio output capability of the wireless headset. In one embodiment, the wireless headset condition data includes wireless headset power data. In yet another embodiment, the wireless headset condition data includes wireless headset signal data. It can be understood that the judgment of whether the audio channel switching condition is satisfied according to the wireless headset condition data can be carried out through one parameter, or can be simultaneously judged through a plurality of parameters.
Referring to fig. 4, in an embodiment, S220 specifically includes:
s221, acquiring the wireless earphone condition data;
s222, if the wireless earphone condition data is smaller than a first preset threshold value, an audio channel switching condition is met;
Otherwise, the audio path switching condition is not satisfied.
The first preset threshold value can be set according to actual requirements. And when the wireless earphone condition data is the wireless earphone electric quantity data, the first preset threshold is a low electric quantity threshold of the wireless earphone. When the wireless earphone condition data is the wireless earphone signal data, the first preset threshold is a low signal threshold of the wireless earphone.
And when the electric quantity of the wireless earphone is lower than the low electric quantity threshold value and/or the signal of the wireless earphone is lower than the low signal threshold value, the current working state of the wireless earphone is not suitable for continuously outputting audio data, and audio channel switching is required. And the electronic equipment executes the audio channel switching instruction and switches the current audio output channel from the wireless earphone audio channel to the other audio output channels.
In this embodiment, whether the audio channel switching condition is met is judged through the wireless headset state data, the working condition of the wireless headset is fully considered, audio output through the wireless headset channel is avoided under the condition that the wireless headset cannot meet the audio output requirement, the intelligence of audio channel switching is further improved, and then the user experience degree is improved.
In one embodiment, S20 includes:
and S230, judging whether the audio channel switching condition is met according to the user use scene data.
The user usage context data refers to data representing the environment and context of the user currently using the electronic device. For example, the user usage scenario data may characterize the current user being in a meeting scenario, a rest scenario, or an outdoor scenario, among others.
In one embodiment, the user usage scenario data may include ambient noise volume data, time data, and the like. The ambient noise volume data is used to characterize the magnitude of noise in the environment in which the electronic device is currently located. The ambient noise volume data may be collected by a sensor such as a microphone provided in the electronic device. The environmental noise volume data can also be obtained by issuing through a server and the like. The time data refers to the fact that the current moment is a few minutes. The time data can be acquired through a network or a time module of the electronic equipment. It is to be understood that the user usage scenario data may also include other data representing the surrounding environment according to different requirements, and the application is not limited in particular.
And the electronic equipment judges whether the current condition meets the audio channel switching condition or not according to the user use scene data and by combining a preset judgment criterion.
Referring to fig. 5, in an embodiment, S230 specifically includes:
s231, acquiring the user use scene data;
s232, if the user usage scene data meet preset conditions, audio channel switching conditions are met;
otherwise, the audio path switching condition is not satisfied.
The preset condition may be set differently according to different user scene data, and the present application is not limited specifically. And if the user use scene data meet the preset conditions, the environment and the scene where the current user is located are suitable for switching the audio channel of the wireless earphone to the other audio channels. And the electronic equipment switches audio channels according to the audio channel switching instruction. And if the user use scene data do not meet the preset conditions, the environment and the scene where the current user is located are not suitable for switching the audio channel of the wireless earphone to the other audio channels. And the electronic equipment continuously keeps the wireless earphone passage for audio data output. In this embodiment, whether the audio channel switching condition is satisfied is determined by using the scene data by the user, so that erroneous switching in unsuitable scenes or environments is prevented, and the intelligence of audio channel switching is further improved.
In one embodiment, the user usage scenario data includes ambient noise volume data, and in S232, the determining whether the audio channel switching condition is satisfied specifically includes:
and if the ambient noise volume data is greater than a second preset threshold and less than a third preset threshold, meeting the audio channel switching condition.
The second preset threshold and the third preset threshold may be set according to actual requirements. When the ambient noise volume data is less than or equal to the second preset threshold, the ambient environment is quite quiet, and the wireless earphone audio channel is not suitable to be switched to the other audio channels. For example, in an office environment or a conference environment, if the ambient noise volume data is smaller than the second preset threshold, the audio path switching condition is not satisfied. When the volume data of the environmental noise is greater than or equal to the third preset threshold, which indicates that the surrounding environment is noisy, the wireless headset channel is switched to the other audio channels, which may cause that the audio cannot be heard. For example, if the user is in a noisy public city and the volume of the environmental noise is greater than the third preset threshold, the audio path switching condition is not satisfied. Otherwise, when the ambient noise volume data is greater than the second preset threshold and less than the third preset threshold, the audio channel switching condition is met.
In this embodiment, the ambient environment or the scene where the electronic device is currently located is determined according to the ambient noise volume data, and whether the wireless headset audio channel is switched to the other audio channel is determined according to different ambient environments or scenes, so that audio is prevented from being acquired in environments where a speaker or a receiver is not suitable for use, such as where the ambient environment is relatively quiet or too loud. The method provided by the embodiment further improves the intelligence of switching the audio channel and improves the user experience.
In one embodiment, the user usage scenario data includes time data, and in S232, if the user usage scenario data satisfies a preset condition, the condition that the audio channel is switched to satisfy is specifically:
and if the time data is in a preset range, the audio channel switching condition is met.
The preset range can be set according to actual requirements, and can also be set and selected by a user. The time data of the preset range represents a time period suitable for switching the audio channel of the wireless headset to the other audio channel. For example, the preset range may be: 7: 00-20: non-nighttime period of 00, or 7: 00-12: 00 and 14: 00-20: non-noon break, non-night time period of 00. And if the current time is in the preset time period, the current condition meets the audio channel switching condition. Otherwise, the current situation does not satisfy the audio path switching condition. In this embodiment, the current surrounding environment of the electronic device is determined according to the time data, and the audio data is processed differently according to different surrounding environments, so as to prevent the audio data from being unsuited to be played through other audio channels such as a speaker or a receiver at night or during rest time. The method provided by the embodiment further improves the intelligence of switching the audio channel and improves the user experience.
Referring to fig. 6, in one embodiment, after S30, the method further includes:
and S50, outputting user prompt information to prompt the user to switch the current audio channel.
The electronic equipment can output the user prompt information in a voice output mode, and can also output the user prompt information in a text display mode. And the user prompt information prompts the user about the current switching result of the audio channel. It will be appreciated that the user prompt may also include information that may be selected by the user, such as confirming a switch, denying a switch, etc. And if the user selects to refuse to switch, the electronic equipment switches the other audio channels into the wireless earphone audio channel. In the embodiment, the intelligence of audio switching is further improved and the man-machine interaction capacity is improved by outputting the prompt information of the user.
Referring to fig. 7, an embodiment of the present application provides an audio channel switching apparatus 10 applied to an electronic device, the apparatus including: a receiving module 100, a judging module 200 and an executing module 300. Wherein,
the receiving module 100 is configured to receive an audio channel switching instruction, where the audio channel switching instruction refers to an instruction for switching a wireless headset channel to another audio channel except for the wireless headset;
The judging module 200 is configured to judge whether an audio channel switching condition is satisfied;
the execution module 300 is configured to, when an audio channel switching condition is met, convert the wireless headset audio channel into the other audio channels for audio output; and when the audio channel switching condition is not met, keeping the audio channel of the wireless earphone for audio output.
In this embodiment, the audio channel switching apparatus 10 receives an audio channel switching instruction through the receiving module 100, and determines whether an audio channel switching condition is satisfied through the determining module 200, and when the audio channel switching condition is satisfied, the executing module 300 converts the audio channel of the wireless headset into the other audio channel for audio output; and when the audio channel switching condition is not met, the audio channel of the wireless earphone is kept for audio output. The audio channel switching device 10 provided in the embodiment of the present application does not directly perform audio channel switching after receiving the audio channel switching instruction, but determines whether to perform audio channel switching according to a preset condition, thereby effectively preventing a switching error caused by a malfunction or system abnormality, and further preventing audio data from being output by using a speaker or a headphone channel in an inappropriate scene, and improving the intelligence of the audio channel switching device 10 during audio channel switching.
In one embodiment, the determining module 200 includes an audio path setting parameter determining unit. The audio channel setting parameter judging unit is used for judging whether the audio channel switching condition is met according to the audio channel setting parameter.
In one embodiment, the audio path setting parameter judging unit includes an audio path setting parameter acquiring subunit and an audio path setting parameter judging subunit. The audio channel setting parameter acquiring subunit is configured to acquire the audio channel setting parameter. The audio channel setting parameter judging subunit is used for judging that the audio channel switching condition is met when the audio channel setting parameter does not comprise a fixed earphone connection parameter; otherwise, the audio channel switching condition is judged not to be met.
In one embodiment, the determining module 200 further comprises a wireless headset state data determining unit. The wireless earphone condition data judging unit is used for judging whether the audio channel switching condition is met or not according to the wireless earphone condition data.
In one embodiment, the wireless headset condition data determining unit includes a wireless headset condition data acquiring subunit and a wireless headset condition data determining subunit. The wireless earphone condition data acquisition subunit is used for acquiring the wireless earphone condition data. The wireless earphone condition data judging subunit is used for judging that the audio channel switching condition is met when the wireless earphone condition data is smaller than a first preset threshold; otherwise, the audio channel switching condition is judged not to be satisfied.
In one embodiment, the wireless headset condition data comprises: wireless headset power data.
In one embodiment, the wireless headset condition data comprises: wireless headset signal data.
In one embodiment, the determining module 200 further comprises a user usage scenario data determining unit. The user usage scene data judging unit is used for judging whether the audio channel switching condition is met according to the user usage scene data.
In one embodiment, the user usage scene data determination unit includes a user usage scene data acquisition sub-unit and a user usage scene data determination sub-unit. The user usage scene data acquisition subunit is configured to acquire the user usage scene data. The user usage scene data judging subunit is used for judging that the audio channel switching condition is met when the user usage scene data meets a preset condition; otherwise, the audio channel switching condition is judged not to be satisfied.
In one embodiment, the user usage scenario data includes ambient noise volume data, and the user usage scenario data determination subunit is configured to determine that an audio channel switching condition is satisfied when the ambient noise volume data is greater than a second preset threshold and smaller than a third preset threshold.
In one embodiment, the user usage scenario data includes time data, and the user usage scenario data determination subunit is configured to determine that the audio path switching condition is satisfied when the time data is within a preset range.
In one embodiment, the audio path switching apparatus 10 further comprises a prompt module. The prompt module is used for outputting user prompt information to prompt a user to switch the current audio channel.
The implementation principle and technical effects of the audio channel switching device 10 provided in the above embodiment are similar to those of the above method embodiment, and are not described herein again.
The division of the modules in the audio path switching device 10 is only for illustration, and in other embodiments, the audio path switching device 10 may be divided into different modules as needed to complete all or part of the functions of the audio path switching device 10.
The modules in the audio channel switching device 10 can be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the electronic device, or can be stored in a memory in the electronic device in a software form, so that the processor can call and execute operations corresponding to the modules.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the audio path switching method of:
receiving an audio channel switching instruction, wherein the audio channel switching instruction refers to an instruction for switching a wireless earphone channel to other audio channels except the wireless earphone audio channel;
judging whether an audio channel switching condition is met;
if so, converting the audio channel of the wireless earphone into the other audio channels for audio output;
if not, the audio channel of the wireless earphone is kept for audio output.
It should be noted that one or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, further cause the processors to perform the audio path switching method of any of the above embodiments.
The implementation principle and technical effect of the computer-readable storage medium provided by the above embodiments are similar to those of the above method embodiments, and are not described herein again.
The embodiment of the application further provides the electronic equipment. As shown in fig. 8, for convenience of illustration, only the portions related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method portion of the embodiments of the present application. The electronic device may be any terminal device having a voice call function and a speaker, including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking the electronic device as the mobile phone as an example:
fig. 8 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application. Referring to fig. 8, the mobile phone 1000 includes: radio Frequency (RF) circuit 1010, memory 1020, input unit 1030, display unit 1040, sensor 1050, audio circuit 1060, wireless fidelity (WiFi) module 1070, processor 1080, and power source 1090. Those skilled in the art will appreciate that the handset configuration shown in fig. 8 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 1010 may be configured to receive and transmit signals during information transmission and reception or during a call, and may receive downlink information of a base station and then process the received downlink information to the processor 1080; the uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 1010 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
The memory 1020 may be used to store software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 1020 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 1030 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 1000. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also referred to as a touch screen, may collect touch operations performed by a user on or near the touch panel 1031 (e.g., operations performed by a user on or near the touch panel 1031 using any suitable object or accessory such as a finger, a stylus, etc.) and drive corresponding connection devices according to a predetermined program. In one embodiment, the touch panel 1031 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 may be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1030 may include other input devices 1032 in addition to the touch panel 1031. In particular, other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), and the like.
The display unit 1040 may be used to display information input by a user or information provided to the user and various menus of the cellular phone. The display unit 1040 may include a display panel 1041. In one embodiment, the Display panel 1041 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, the touch panel 1031 can overlay the display panel 1041, and when the touch panel 1031 detects a touch operation on or near the touch panel 1031, the touch operation is transmitted to the processor 1080 to determine the type of the touch event, and then the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of the touch event. Although in fig. 8, the touch panel 1031 and the display panel 1041 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated to implement the input and output functions of the mobile phone.
The cell phone 1000 may also include at least one sensor 1050, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1041 and/or the backlight when the mobile phone moves to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
Audio circuitry 1060, speaker 1061, and microphone 1062 may provide an audio interface between a user and a cell phone. The audio circuit 1060 can transmit the electrical signal converted from the received audio data to the speaker 1061, and convert the electrical signal into a sound signal for output by the speaker 1061; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and the audio data is processed by the audio data output processor 1080 and then transmitted to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help the user to send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 1070, which provides wireless broadband internet access for the user. Although fig. 8 shows the WiFi module 1070, it is to be understood that it does not necessarily form the handset 1000 and may be omitted as desired.
The processor 1080 is a control center of the mobile phone, connects various parts of the whole mobile phone by using various interfaces and lines, and executes various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1020 and calling data stored in the memory 1020, thereby integrally monitoring the mobile phone. In one embodiment, processor 1080 may include one or more processing units. In one embodiment, processor 1080 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 1080.
The handset 1000 also includes a power supply 1090 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1080 via a power management system that may be configured to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 1000 may also include a camera, a bluetooth module, and the like.
In an embodiment of the application, the electronic device comprises a processor 1080 which, when executing the computer program stored on the memory, performs the following steps:
receiving an audio channel switching instruction, wherein the audio channel switching instruction refers to an instruction for switching a wireless earphone channel to other audio channels except the wireless earphone audio channel;
judging whether an audio channel switching condition is met;
if so, converting the audio channel of the wireless earphone into the other audio channels for audio output;
if not, the audio channel of the wireless earphone is kept for audio output.
It should be noted that, an electronic device includes a memory and a processor, where the memory stores computer readable instructions, and the instructions, when executed by the processor, cause the processor to execute the steps of the audio processing method in any of the above embodiments.
The implementation principle and technical effect of the electronic device provided by the above embodiment are similar to those of the above method embodiment, and are not described again here. Any reference to memory, storage, database or other medium used herein may include non-volatile and/or volatile memory. Suitable non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
All possible combinations of the technical features of the above embodiments may not be described for the sake of brevity, but should be considered as within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention. Therefore, the protection scope of the present patent should be subject to the appended claims.

Claims (11)

1. An audio channel switching method is applied to electronic equipment, and comprises the following steps:
receiving an audio channel switching instruction, wherein the audio channel switching instruction refers to an instruction for switching a wireless earphone channel to other audio channels except the wireless earphone audio channel;
after receiving the audio channel switching instruction, judging whether an audio channel switching condition is met according to a preset judgment rule, wherein the preset judgment rule is set according to one of audio channel setting parameters, wireless earphone condition data and user use scene data;
if so, converting the audio channel of the wireless earphone into the other audio channels for audio output, and outputting user prompt information to prompt a user to switch the current audio channel;
If not, the audio channel of the wireless earphone is kept for audio output.
2. The method according to claim 1, wherein the determining whether the audio path switching condition is satisfied according to the audio path setting parameter comprises:
acquiring the audio channel setting parameters;
if the audio channel setting parameters do not comprise fixed earphone connection parameters, the audio channel switching conditions are met;
otherwise, the audio path switching condition is not satisfied.
3. The method of claim 1, wherein determining whether the audio path switching condition is satisfied according to the condition of the wireless headset comprises:
acquiring the wireless earphone condition data;
if the wireless earphone condition data is smaller than a first preset threshold value, an audio channel switching condition is met;
otherwise, the audio path switching condition is not satisfied.
4. The method of claim 3, wherein the wireless headset condition data comprises: wireless headset power data.
5. The method of claim 3, wherein the wireless headset condition data comprises: wireless headset signal data.
6. The method according to claim 1, wherein the determining whether the audio path switching condition is satisfied according to the user usage scenario comprises:
Acquiring the user usage scene data;
if the user usage scene data meets the preset conditions, audio channel switching conditions are met;
otherwise, the audio path switching condition is not satisfied.
7. The method of claim 6, wherein the user usage scenario data comprises ambient noise volume data, and the audio path switching condition is satisfied if the user usage scenario data satisfies a predetermined condition, comprising:
and if the ambient noise volume data is greater than a second preset threshold and less than a third preset threshold, meeting the audio channel switching condition.
8. The method according to claim 6, wherein the user usage scenario data includes time data, and the audio path switching condition is satisfied if the user usage scenario data satisfies a preset condition, including:
and if the time data is in a preset range, the audio channel switching condition is met.
9. An audio channel switching device applied to an electronic device, the device comprising:
the wireless earphone comprises a receiving module, a switching module and a switching module, wherein the receiving module is used for receiving an audio channel switching instruction, and the audio channel switching instruction refers to an instruction for switching a wireless earphone channel to other audio channels except the wireless earphone;
The judging module is used for judging whether an audio channel switching condition is met or not according to a preset judging rule after the audio channel switching instruction is received, wherein the preset judging rule is set according to one of audio channel setting parameters, wireless earphone condition data and user use scene data;
the execution module is used for converting the wireless earphone audio channel into the other audio channels for audio output when the audio channel switching condition is met; and when the audio channel switching condition is not met, keeping the audio channel of the wireless earphone for audio output.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the audio path switching method according to any one of claims 1 to 8.
11. An electronic device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the audio path switching method of any of claims 1 to 8.
CN201880098670.8A 2018-12-10 2018-12-10 Audio channel switching method and device, readable storage medium and electronic equipment Active CN112997471B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/120139 WO2020118496A1 (en) 2018-12-10 2018-12-10 Audio path switching method and device, readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112997471A CN112997471A (en) 2021-06-18
CN112997471B true CN112997471B (en) 2022-07-12

Family

ID=71076184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880098670.8A Active CN112997471B (en) 2018-12-10 2018-12-10 Audio channel switching method and device, readable storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN112997471B (en)
WO (1) WO2020118496A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12075220B2 (en) 2020-06-22 2024-08-27 Apple Inc. Smart routing for audio output devices
CN112437339A (en) * 2020-11-10 2021-03-02 深圳Tcl新技术有限公司 Audio output control method and device, smart television and storage medium
CN112925502B (en) * 2021-02-10 2022-07-08 歌尔科技有限公司 Audio channel switching equipment, method and device and electronic equipment
CN117707462B (en) * 2023-05-16 2024-08-16 荣耀终端有限公司 Audio data processing method, electronic equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072274A (en) * 2015-08-12 2015-11-18 广东欧珀移动通信有限公司 Method and system for dynamically switching audio channels
WO2018130087A1 (en) * 2017-01-13 2018-07-19 维沃移动通信有限公司 Audio transmission method based on bone-conduction loudspeaker, and mobile terminal
CN108683798A (en) * 2018-04-19 2018-10-19 维沃移动通信有限公司 A kind of sound output control method and mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867657B (en) * 2010-06-24 2014-03-12 中兴通讯股份有限公司南京分公司 Method and device for switching audio output equipment on mobile phone
CN105323363B (en) * 2014-06-30 2019-07-12 中兴通讯股份有限公司 Select the method and device of main microphon

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072274A (en) * 2015-08-12 2015-11-18 广东欧珀移动通信有限公司 Method and system for dynamically switching audio channels
WO2018130087A1 (en) * 2017-01-13 2018-07-19 维沃移动通信有限公司 Audio transmission method based on bone-conduction loudspeaker, and mobile terminal
CN108683798A (en) * 2018-04-19 2018-10-19 维沃移动通信有限公司 A kind of sound output control method and mobile terminal

Also Published As

Publication number Publication date
CN112997471A (en) 2021-06-18
WO2020118496A1 (en) 2020-06-18

Similar Documents

Publication Publication Date Title
WO2018121148A1 (en) Communication resource selection method, hand-held intelligent terminal and access device
CN112997471B (en) Audio channel switching method and device, readable storage medium and electronic equipment
CN112997470B (en) Audio output control method and device, computer readable storage medium and electronic equipment
CN107888765B (en) Method for switching scene mode and mobile terminal
CN108958695B (en) Audio output method, device and computer readable storage medium
CN111371705B (en) Download task execution method and electronic device
CN112805988B (en) Call control method and device, computer readable storage medium and electronic equipment
CN106936516B (en) Display screen display state control method, storage medium and terminal
CN107046595A (en) Announcement information processing method, device and mobile terminal
CN113039518B (en) Playing control method and device, computer readable storage medium and electronic equipment
CN106126170B (en) Sound effect setting method of terminal and terminal
CN110673761B (en) Touch key detection method and terminal equipment thereof
CN113168303A (en) Audio processing method and device, computer readable storage medium and electronic equipment
CN110891262A (en) Bluetooth pairing method, system and terminal equipment
CN107894958B (en) Junk information cleaning method, terminal, server and computer readable storage medium
CN106713668B (en) Method and device for controlling vibration of terminal
CN105635379B (en) Noise suppression method and device
CN108737619A (en) A kind of call control method of terminal, device and terminal
CN106210951A (en) The adaptation method of a kind of bluetooth earphone, device and terminal
CN109739641B (en) Self-adaptive CPU frequency modulation acceleration method and device, mobile terminal and storage medium
CN107484225B (en) Network access control method, device and user terminal
CN113039524A (en) Audio resource processing method and device, computer readable storage medium and electronic equipment
WO2020113392A1 (en) Network processing method, computer-readable storage medium and electronic device
CN113170015B (en) Call processing method, call processing device, computer-readable storage medium, and electronic apparatus
CN110891304B (en) gPS power consumption control method for mobile terminal

Legal Events

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