CN108549529A - Control the method and device of audio output - Google Patents

Control the method and device of audio output Download PDF

Info

Publication number
CN108549529A
CN108549529A CN201810306976.XA CN201810306976A CN108549529A CN 108549529 A CN108549529 A CN 108549529A CN 201810306976 A CN201810306976 A CN 201810306976A CN 108549529 A CN108549529 A CN 108549529A
Authority
CN
China
Prior art keywords
earphone
temperature
pressure
electronic equipment
information
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
CN201810306976.XA
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201810306976.XA priority Critical patent/CN108549529A/en
Publication of CN108549529A publication Critical patent/CN108549529A/en
Pending legal-status Critical Current

Links

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/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • 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

Abstract

Present disclose provides a kind of method and devices of control audio output, belong to Audiotechnica field.The method includes:Audio play instruction is received, the audio play instruction is used to indicate broadcasting audio file;When detect in the earphone that the electronic equipment is connected there is any earphone not to be worn in human ear when, determine that the first earphone, first earphone are the earphone not being worn in human ear;The second earphone only into the earphone exports the audio signal of the audio file, and second earphone is the earphone other than the first earphone described in the earphone.The disclosure is by the way that when receiving audio play instruction, whether test earphone is worn on ear, to only carry out audio output to the earphone being worn on ear, without carrying out audio output to the earphone not being worn on ear, avoids unnecessary electrical source consumption.

Description

Control the method and device of audio output
Technical field
This disclosure relates to Audiotechnica field more particularly to a kind of method and device of control audio output.
Background technology
User can only use one in two earphones sometimes when listening the audio of electronic equipment using earphone, for example, with It takes another earphone while obtaining the audio of electronic equipment using an earphone and listens extraneous sound in family.
Currently, when electronic equipment plays audio file, no matter user uses two earphones, still takes an earphone, Electronic equipment can export the corresponding audio signal of the audio file to two earphones.
Invention content
The embodiment of the present disclosure provides a kind of method and device of control audio output, can solve the relevant technologies power supply and disappear Consume big problem.
According to the first aspect of the embodiments of the present disclosure, a kind of method of control audio output is provided, including:
Audio play instruction is received, the audio play instruction is used to indicate broadcasting audio file;
When detect in the earphone that the electronic equipment is connected there is any earphone not to be worn in human ear when, determine One earphone, first earphone are the earphone not being worn in human ear;
The second earphone only into the earphone exports the audio signal of the audio file, and second earphone is described Earphone other than first earphone described in earphone.
In a kind of possible realization method, second earphone only into the earphone exports the sound of the audio file Frequency signal, including:
When second earphone is left earphone, only left channel audio signal is exported to second earphone;Or,
When second earphone is right earphone, only right channel audio signal is exported to second earphone.
It is described to detect in the earphone that the electronic equipment is connected there is any ear in a kind of possible realization method When machine is not worn in human ear, the first earphone is determined, including:
Obtain at least one of temperature information and the pressure information of the earphone that the electronic equipment is connected;
When at least one of the temperature information of any earphone and pressure information in the earphone that the electronic equipment is connected When meeting preset condition, the earphone of the preset condition will be met as first earphone.
In a kind of possible realization method, the temperature of any earphone in the earphone connected when the electronic equipment When at least one of information and pressure information meet preset condition, the earphone of the preset condition will be met as first ear Machine, including:
When the corresponding temperature of the temperature information of any earphone in the earphone that the electronic equipment is connected be not at it is default When in temperature range, temperature is not at the earphone in the preset temperature range as first earphone;Or,
When the corresponding pressure of the pressure information of any earphone in the earphone that the electronic equipment is connected be not at it is default When in pressure limit, pressure is not at the earphone in the pre-set pressure range as first earphone;Or,
Described in being not at when the corresponding temperature of the temperature information of any earphone in the earphone that the electronic equipment is connected In preset temperature range, and when the corresponding pressure of pressure information is not in the pre-set pressure range, temperature is not at institute It states in preset temperature range and pressure is not at earphone in the pre-set pressure range as first earphone.
In a kind of possible realization method, the temperature information and pressure for obtaining the earphone that the electronic equipment is connected At least one of information, including:
At least one of temperature information and the pressure information that the chip in the earphone is sent are received, the chip is for connecing Receive the pressure information that the pressure sensor in the temperature information and the earphone that the temperature sensor in the earphone is sent is sent At least one of, the temperature sensor is used to detect the temperature of the earphone local environment, and the pressure sensor is for examining Survey the pressure that the earphone is subject to.
In a kind of possible realization method, the temperature information and pressure for obtaining the earphone that the electronic equipment is connected Before at least one of information, the method further includes:
The earphone that is connected to the electronic equipment sends detection instruction, the detection instruct be used to indicate the earphone into Trip temperature and/or pressure detecting, and send at least one of temperature information and pressure information to the electronic equipment.
According to the second aspect of the embodiment of the present disclosure, a kind of device of control audio output is provided, including:
Receiving module, for receiving audio play instruction, the audio play instruction is used to indicate broadcasting audio file;
Determining module, for when detecting in earphone that the electronic equipment is connected there is any earphone not to be worn on people When on ear, determine that the first earphone, first earphone are the earphone not being worn in human ear;
Output module exports the audio signal of the audio file for the second earphone only into the earphone, described Second earphone is the earphone other than the first earphone described in the earphone.
In a kind of possible realization method, the output module is used for when second earphone is left earphone, only to institute State the second earphone output left channel audio signal;Or,
The output module is used to, when second earphone is right earphone, only export right channel sound to second earphone Frequency signal.
In a kind of possible realization method, the determining module is used for:
Obtain at least one of temperature information and the pressure information of the earphone that the electronic equipment is connected;
When at least one of the temperature information of any earphone and pressure information in the earphone that the electronic equipment is connected When meeting preset condition, the earphone of the preset condition will be met as first earphone.
In a kind of possible realization method, the determining module is used for when any in the earphone that the electronic equipment is connected When the corresponding temperature of temperature information of earphone is not in preset temperature range, temperature is not at the preset temperature range Interior earphone is as first earphone;Or,
The determining module is used to correspond to when the pressure information of any earphone in the earphone that the electronic equipment is connected Pressure when being not in pre-set pressure range, pressure is not at the earphone in the pre-set pressure range as described first Earphone;Or,
The determining module is used to correspond to when the temperature information of any earphone in the earphone that the electronic equipment is connected Temperature be not in the preset temperature range, and the corresponding pressure of pressure information is not in the pre-set pressure range When, temperature is not in the preset temperature range and pressure is not at earphone in the pre-set pressure range as described in First earphone.
In a kind of possible realization method, the determining module is used for:
At least one of temperature information and the pressure information that the chip in the earphone is sent are received, the chip is for connecing Receive the pressure information that the pressure sensor in the temperature information and the earphone that the temperature sensor in the earphone is sent is sent At least one of, the temperature sensor is used to detect the temperature of the earphone local environment, and the pressure sensor is for examining Survey the pressure that the earphone is subject to.
In a kind of possible realization method, described device further includes:
Sending module, the earphone for being connected to the electronic equipment send detection instruction, and the detection instruction is used for The earphone is indicated into trip temperature and/or pressure detecting, and send in temperature information and pressure information extremely to the electronic equipment One item missing.
According to the third aspect of the embodiment of the present disclosure, a kind of device of control audio output is provided, including:
Processor;
Memory for storing the executable instruction of processor;
Wherein, the processor is configured as:
Audio play instruction is received, the audio play instruction is used to indicate broadcasting audio file;
When detect in the earphone that the electronic equipment is connected there is any earphone not to be worn in human ear when, determine One earphone, first earphone are the earphone not being worn in human ear;
The second earphone only into the earphone exports the audio signal of the audio file, and second earphone is described Earphone other than first earphone described in earphone.
According to the fourth aspect of the embodiment of the present disclosure, a kind of computer readable storage medium is provided, it is described computer-readable It is stored with computer program in storage medium, the method described in first aspect is realized when the computer program is executed by processor Step.
The technical scheme provided by this disclosed embodiment can include the following benefits:By receiving audio broadcasting When instruction, whether test earphone is worn on ear, to only carry out audio output to the earphone that is worn on ear, without to The earphone not being worn on ear carries out audio output, avoids unnecessary electrical source consumption.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not The disclosure can be limited.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of the method for control audio output shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of the method for control audio output shown according to an exemplary embodiment.
Fig. 3 is a kind of block diagram of the device of control audio output shown according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of the device of control audio output shown according to an exemplary embodiment.
Fig. 5 is a kind of block diagram of the device 500 of control audio output shown according to an exemplary embodiment.
Specific implementation mode
To keep the purpose, technical scheme and advantage of the disclosure clearer, below in conjunction with attached drawing to disclosure embodiment party Formula is described in further detail.
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of the method for control audio output shown according to an exemplary embodiment, such as Fig. 1 institutes Show, controls the method for audio output in electronic equipment, including the following steps:
In a step 101, audio play instruction is received, which is used to indicate broadcasting audio file.
In a step 102, when detecting in the earphone that the electronic equipment is connected there is any earphone not to be worn on human ear When upper, the first earphone was determined, which is the earphone not being worn in human ear.
In step 103, the second earphone only into the earphone exports the audio signal of the audio file, second earphone For the earphone other than first earphone in the earphone.
In the embodiment of the present disclosure, by the way that when receiving audio play instruction, whether test earphone is worn on ear, from And audio output only is carried out to the earphone being worn on ear, without carrying out audio output to the earphone not being worn on ear, Avoid unnecessary electrical source consumption.
In a kind of possible realization method, which exports the audio letter of the audio file Number, including:
When second earphone is left earphone, only left channel audio signal is exported to second earphone;Or,
When second earphone is right earphone, only right channel audio signal is exported to second earphone.
In a kind of possible realization method, should detect has any earphone not in the earphone that the electronic equipment is connected When being worn in human ear, the first earphone is determined, including:
Obtain at least one of temperature information and the pressure information of the earphone that the electronic equipment is connected;
When at least one of the temperature information of any earphone and pressure information are full in the earphone that the electronic equipment is connected When sufficient preset condition, the earphone of the preset condition will be met as first earphone.
In a kind of possible realization method, deserve the temperature information of any earphone in the earphone that the electronic equipment is connected When meeting preset condition at least one of pressure information, the earphone of the preset condition will be met as first earphone, including:
When the corresponding temperature of the temperature information of any earphone in the earphone that the electronic equipment is connected is not at default temperature When spending in range, temperature is not at the earphone in the preset temperature range as first earphone;Or,
When the corresponding pressure of the pressure information of any earphone in the earphone that the electronic equipment is connected is not at default pressure When within the scope of power, pressure is not at the earphone in the pre-set pressure range as first earphone;Or,
It is preset when the corresponding temperature of the temperature information of any earphone in the earphone that the electronic equipment is connected is not at this In temperature range, and when the corresponding pressure of pressure information is not in the pre-set pressure range, temperature is not at the default temperature In degree range and pressure is not at the earphone in the pre-set pressure range as first earphone.
In a kind of possible realization method, the temperature information and pressure information of the earphone that the acquisition electronic equipment is connected At least one of, including:
At least one of temperature information and the pressure information that the chip in the earphone is sent are received, the chip is for receiving this At least one in the pressure information that pressure sensor in temperature information and the earphone that temperature sensor in earphone is sent is sent , which is used to detect the temperature of the earphone local environment, and the pressure sensor is for detecting what the earphone was subject to Pressure.
In a kind of possible realization method, the temperature information and pressure information of the earphone that the acquisition electronic equipment is connected At least one of before, this method further includes:
The earphone connected to the electronic equipment sends detection instruction, and detection instruction is used to indicate the earphone into trip temperature And/or pressure detecting, and send at least one of temperature information and pressure information to the electronic equipment.
The alternative embodiment that any combination forms the disclosure may be used, herein no longer in above-mentioned all optional technical solutions It repeats one by one.
Fig. 2 is a kind of flow chart of the method for control audio output shown according to an exemplary embodiment, such as Fig. 2 institutes Show, controls the method for audio output in electronic equipment, including the following steps:
In step 201, when receiving audio play instruction, the temperature information for the earphone that electronic equipment is connected is obtained At least one of with pressure information, which is used to indicate broadcasting audio file.
Wherein, which is used to indicate the temperature of earphone local environment, and pressure information is used to indicate what earphone was subject to Pressure.The earphone that electronic equipment is connected may include left earphone and right earphone, and left earphone refers to being worn on the left ear of user Earphone, right earphone refers to the earphone being worn on user's auris dextra piece.The earphone can be In-Ear Headphones, can also be to wear Formula earphone.
In the embodiment of the present disclosure, when user wants to listen audio, the audio file on electronic equipment can be played out Operation triggers audio play instruction.In a kind of possible realization method, electronic equipment obtains the earphone that the electronic equipment is connected Temperature information and at least one of pressure information include:Receive temperature information and pressure information that the chip in the earphone is sent At least one of, the pressure which is used to receive in the temperature information and the earphone that the temperature sensor in the earphone is sent passes At least one of the pressure information that sensor is sent, the temperature sensor are used to detect the temperature of the earphone local environment, the pressure Sensor is for detecting the pressure that the earphone is subject to.
For any earphone, at least one sensing in temperature sensor and pressure sensor can be provided in the earphone Device.In addition, being also provided with chip in the earphone, which is used for will be at least one in the temperature information and pressure information of earphone Item feeds back to electronic equipment.
The case where for temperature sensor is provided only in earphone, electronic equipment can receive the chip in every earphone The temperature information of transmission connects simultaneously for example, electronic equipment can receive the left earphone temperature information of the transmission of the chip in left earphone Receive the right earphone temperature information that the chip in right earphone is sent.Wherein, left earphone temperature information is by the temperature sensing in left earphone The chip being sent to after device detection in left earphone, the left earphone temperature information are used to indicate the temperature of the left earphone, right earphone temperature Degree information is by the chip being sent to after the temperature sensor detection in right earphone in right earphone, and the right earphone temperature information is for referring to Show the temperature of the right earphone.
The case where for pressure sensor is provided only in earphone, electronic equipment can receive the chip in every earphone The pressure information of transmission connects simultaneously for example, electronic equipment can receive the left earphone pressure information of the transmission of the chip in left earphone Receive the right earphone pressure information that the chip in right earphone is sent, wherein left earphone pressure information is passed by the surging in left earphone The chip being sent to after sensor detection in left earphone, the left earphone pressure information are used to indicate the pressure that the left earphone is subject to, right Earphone pressure information is by the chip being sent to after the pressure sensor detection in right earphone in right earphone, the right earphone pressure information It is used to indicate the pressure that the right earphone is subject to.
The case where for temperature sensor and pressure sensor are provided with simultaneously in earphone, electronic equipment can receive often The temperature information and pressure information that chip in earphone is sent, for example, electronic equipment can receive the hair of the chip in left earphone The left earphone temperature information and left earphone pressure information sent, while receiving the right earphone temperature information of the transmission of the chip in right earphone With right earphone pressure information.
It should be noted that the sensor can be in real time into the detection of trip temperature and/or pressure, and the temperature that will be detected Degree information and/or pressure information are sent to chip, by chip by the information Real-time Feedback electron equipment.For example, earphone passes through Temperature residing for the real-time test earphone of temperature sensor, and the temperature information detected is set by chip Real-time Feedback electron It is standby.The pressure that earphone is subject to by the real-time test earphone of pressure sensor, the pressure information detected is anti-in real time by chip It feeds electronic equipment.
Certainly, the sensor can also be in the detection instruction for receiving electronic equipment just into trip temperature and/or pressure Detection, in a kind of possible realization method, electronic equipment can connect when receiving audio play instruction to electronic equipment The earphone that connects sends detection instruction, and detection instruction is used to indicate the earphone into trip temperature and/or pressure detecting, and to the electronics Equipment sends at least one of temperature information and pressure information.For example, electronic equipment can be sent to the chip in every earphone Detection instruction, the chip of earphone can control sensor in earphone into trip temperature and/or pressure when receiving detection instruction Power detects, and at least one of the temperature information detected and pressure information are fed back to electronic equipment.By being sent to earphone The mode for detecting instruction, to trigger the working sensor in earphone so that the sensor in earphone can be needed only in electronic equipment Just into trip temperature or pressure detecting when playing audio, reduce the power consumption of sensor.
In step 202, when the temperature information and pressure information of any earphone in the earphone that the electronic equipment is connected At least one of when meeting preset condition, the earphone of preset condition will be met as the first earphone, which is not wear Earphone in human ear.
The case where for temperature sensor is provided only in earphone, electronic equipment can be received with through the above steps 201 The temperature information of two earphones.In a kind of possible realization method, when any earphone in the earphone that the electronic equipment is connected Temperature information corresponding temperature when being not in preset temperature range, temperature can be not at the preset temperature by electronic equipment Earphone in range is as first earphone.
Wherein, temperature setting when which can be worn on according to earphone in human ear, for example, tester Can maximum temperature be determined from all temperature detected in different times or occasion wears the temperature of earphone and test earphone Degree and minimum temperature are preset using the minimum temperature as the left margin temperature of preset temperature range using the maximum temperature as this The right margin temperature of temperature range, to which the preset temperature range be arranged on an electronic device.Certainly, preset temperature range may be used also To there is other set-up modes, the embodiment of the present disclosure not to limit this.
For example, electronic equipment can receive left earphone temperature information and right earphone temperature information, and judge the two temperature Whether the corresponding temperature of information is in preset temperature range, for example, electronic equipment may determine that the corresponding temperature of temperature information Whether the left margin temperature of preset temperature range and right margin temperature less than preset temperature range are more than, if it is, electronics Equipment can be in the corresponding temperature of temperature information in preset temperature range, if it is not, then electronic equipment can determine temperature The corresponding temperature of degree information is not in preset temperature range.
When the corresponding temperature of the left earphone temperature information is not in preset temperature range, electronic equipment can be by left ear Machine is as the first earphone, namely is to determine that the left earphone is not worn in human ear.Alternatively, when the right earphone temperature information is corresponding When temperature is not in preset temperature range, electronic equipment can be using right earphone as the first earphone, namely is to determine the auris dextra Machine is not worn in human ear.
Certainly, the embodiment of the present disclosure is only illustrated so that an earphone is not worn in human ear as an example, in fact, if left The corresponding temperature of earphone temperature information and the corresponding temperature of right earphone temperature information are not in preset temperature range, then electronics Equipment can determine that two earphones are not worn in human ear.
By adding temperature sensor in earphone, when such earphone is worn in human ear, the temperature sensor meeting of earphone Detect temperature.Whether temperature by confirmly detecting can accurately determine earphone whether in the preset temperature range It is worn in human ear.
The case where for pressure sensor is provided only in earphone, electronic equipment can be received with through the above steps 201 The pressure information of two earphones.In a kind of possible realization method, when any earphone in the earphone that the electronic equipment is connected Pressure information corresponding pressure when being not in pre-set pressure range, pressure is not at the earphone in the pre-set pressure range As first earphone.
Wherein, the pressure setting being subject to when which can be worn on according to earphone in human ear, for example, test Personnel can take different postures to wear the pressure that earphone and test earphone are subject to, and be determined most from all pressure detected Big pressure and minimum pressure, using the minimum pressure as the left margin pressure of pre-set pressure range, using the maximum pressure as this The right margin pressure of pre-set pressure range, to which the pre-set pressure range be arranged on an electronic device.Certainly, pre-set pressure range Can also there are other set-up modes, the embodiment of the present disclosure not to limit this.
For example, electronic equipment can receive left earphone pressure information and right earphone pressure information, and judge the two pressure Whether the corresponding pressure of information is in pre-set pressure range, for example, electronic equipment may determine that the corresponding pressure of pressure information Whether the left margin pressure of pre-set pressure range and right margin pressure less than pre-set pressure range are more than, if it is, electronics Equipment can determine that the corresponding pressure of pressure information is in pre-set pressure range, if it is not, then electronic equipment can determine pressure The corresponding pressure of force information is not in pre-set pressure range.
When pressure indicated by the left earphone pressure information is not in pre-set pressure range, electronic equipment can will be left Earphone is as the first earphone, namely is to determine that the left earphone is not worn in human ear.Alternatively, when the right earphone pressure information corresponds to Pressure when being not in pre-set pressure range, electronic equipment can be using right earphone as the first earphone, namely is to determine the right side Earphone is not worn in human ear.
Certainly, if the corresponding pressure of left earphone pressure information and the corresponding pressure of right earphone pressure information be not at it is pre- If in pressure limit, then electronic equipment can determine that two earphones are not worn in human ear.
By adding pressure sensor in earphone, when such earphone is worn in human ear, ear can give earphone certain The pressure sensor of pressure, earphone can detect the pressure.Whether it is in pre-set pressure range by the pressure confirmly detected It is interior, it can accurately determine whether earphone is worn in human ear.
The case where for temperature sensor and pressure sensor are provided with simultaneously in earphone, electronic equipment can be by above-mentioned Step 201 receives the temperature information and pressure information of two earphones.In a kind of possible realization method, when the electronic equipment institute The corresponding temperature of the temperature information of any earphone is not in the preset temperature range in the earphone of connection, and pressure information pair When the pressure answered is not in the pre-set pressure range, by temperature be not in the preset temperature range and pressure to be not at this pre- If the earphone in pressure limit is as first earphone.
For example, electronic equipment can receive left earphone temperature information, left earphone pressure information, right earphone temperature information and the right side Earphone pressure information, when the corresponding temperature of left earphone temperature information is not in preset temperature range and left earphone pressure information pair When the pressure answered is not in pre-set pressure range, electronic equipment can be using left earphone as the first earphone, namely is to determine this Left earphone is not worn in human ear.Alternatively, when the corresponding temperature of right earphone temperature information is not in preset temperature range and right When the corresponding pressure of earphone pressure information is not in pre-set pressure range, electronic equipment can be using right earphone as the first ear Machine, namely it is to determine that the right earphone is not worn in human ear.Certainly, if the corresponding temperature of left earphone temperature information and right earphone The corresponding temperature of temperature information is not in preset temperature range, and the corresponding pressure of left earphone pressure information and right earphone pressure When the corresponding pressure of force information is not in pre-set pressure range, electronic equipment can determine that two earphones are not worn on people On ear.Pressure that the temperature and pressure sensor detected by combination temperature sensor detects determines whether earphone is worn On ear, the accuracy rate of definitive result can be improved.
It should be noted that above-mentioned steps 201 and step 202 are when detecting in earphone that the electronic equipment is connected have When any earphone is not worn in human ear, a kind of possible realization method of the first earphone is determined.Pass through the temperature according to earphone At least one of information and pressure information determine which earphone is not worn in human ear, whether provide a kind of determining earphone The effective means being worn on ear, it is ensured that the accuracy of definitive result.
In step 203, the second earphone only into the earphone exports the audio signal of the audio file, second earphone For the earphone other than first earphone in the earphone.
Wherein, the audio signal of audio file includes left channel audio signal and right channel audio signal, left channel audio Signal refers to the audio signal of earphone output to the left, and right channel audio signal is directed to the audio signal of right earphone output.Work as electricity When sub- device left earphone output left channel audio signal, if user wears left earphone, the left ear of user can hear sound Frequently;When electronic equipment exports right channel audio signal to right earphone, if user wears right earphone, the auris dextra of user can be with Hear audio;While earphone exports left channel audio signal to electronic equipment to the left, to right earphone output right audio channel letter Number, if user wears left earphone and right earphone simultaneously, the left and right ear of user can hear audio.
In the embodiment of the present disclosure, when any earphone is not worn on ear, show that user does not need to currently use The earphone that do not wear can only increase come the audio for listening electronic equipment to play if the earphone exports audio signal that do not worn to this The consumption powered up.Therefore, in order to avoid unnecessary electrical source consumption, electronic equipment only can export audio to the earphone of wearing Signal, without the earphone exports audio signal that do not worn to this.
In a kind of possible realization method, which exports the audio signal of the audio file Including:When second earphone is left earphone, only left channel audio signal is exported to second earphone;When second earphone is the right side When earphone, only right channel audio signal is exported to second earphone.
When user does not wear right earphone, show that user need not listen the audio of electronic equipment using right earphone, for example, User is listened to music using left earphone, and the scene of external sound is listened using right earphone, and electronic equipment can only ear to the left under the scene Machine exports left channel audio signal, without exporting right channel audio signal to right earphone.
When user does not wear left earphone, show that user need not listen the audio of electronic equipment using left ear, for example, with Family is listened to music using right earphone, and the scene of external sound is listened using left earphone, and electronic equipment can be only to right earphone under the scene Right channel audio signal is exported, without exporting left channel audio signal to the left earphone.By only to the ear being worn on ear Machine exports audio signal can optimize the power consumption of electronic equipment to avoid unnecessary electrical source consumption.
It should be noted that if when two earphones are not worn on ear, electronic equipment can not be to any earphone Exports audio signal.When user does not both wear left earphone, does not wear right earphone yet, show that user need not listen electronic equipment Audio, if user takes earphone but forgets the scene of closing music, electronic equipment can not be to any ear under the scene Machine exports audio signal that is to say that electronic equipment will not carry out the broadcasting of audio file.In this case, electronic equipment can be shown Prompt message, to prompt user to wear earphone.
Said program is when receiving audio play instruction, if electronic equipment detects that any earphone is not worn on On ear, then electronic equipment is only to the earphone exports audio signal being currently worn on ear, without to not being worn on ear currently The process of earphone exports audio signal on piece.It should be noted that in electronic equipment to earphone exports audio signal In the process, if electronic equipment detects that another earphone is worn on ear at any time, electronic equipment can be timely Corresponding audio signal is exported to the another earphone.Certainly, in electronic equipment to the process of an earphone exports audio signal In, if electronic equipment detects that the earphone is not worn on ear at any time, electronic equipment can stop in time to The earphone exports corresponding audio signal, until when detecting that the earphone is worn on ear again, then it is again defeated to the earphone Go out corresponding audio signal.
In the embodiment of the present disclosure, by the way that when receiving audio play instruction, whether test earphone is worn on ear, from And audio output only is carried out to the earphone being worn on ear, without carrying out audio output to the earphone not being worn on ear, Avoid unnecessary electrical source consumption.
Fig. 3 is a kind of block diagram of the device of control audio output shown according to an exemplary embodiment.It, should with reference to Fig. 3 Device includes receiving module 301, determining module 302 and output module 303.
Receiving module 301 is configured as receiving audio play instruction, which is configured as instruction and plays sound Frequency file;
Determining module 302 is configured as when detecting in earphone that the electronic equipment is connected have any earphone not wear When being worn in human ear, the first earphone is determined, which is the earphone not being worn in human ear;
Output module 303 is configured as the audio signal that the second earphone only into the earphone exports the audio file, should Second earphone is the earphone other than first earphone in the earphone.
In a kind of possible realization method, the output module 303 be configured as when second earphone be left earphone when, only to Second earphone exports left channel audio signal;Or,
The output module 303 is configured as, when second earphone is right earphone, only exporting right channel to second earphone Audio signal.
In a kind of possible realization method, which is configured as:
Obtain at least one of temperature information and the pressure information of the earphone that the electronic equipment is connected;
When at least one of the temperature information of any earphone and pressure information are full in the earphone that the electronic equipment is connected When sufficient preset condition, the earphone of the preset condition will be met as first earphone.
In a kind of possible realization method, which is configured as when in the earphone that the electronic equipment is connected When the corresponding temperature of temperature information of any earphone is not in preset temperature range, temperature is not at the preset temperature model Earphone in enclosing is as first earphone;Or,
The determining module 302 is configured as the pressure information pair when any earphone in the earphone that the electronic equipment is connected When the pressure answered is not in pre-set pressure range, pressure is not at the earphone in the pre-set pressure range as first ear Machine;Or,
The determining module 302 is configured as the temperature information pair when any earphone in the earphone that the electronic equipment is connected The temperature answered is not in the preset temperature range, and when the corresponding pressure of pressure information is not in the pre-set pressure range, Temperature is not in the preset temperature range and pressure is not at earphone in the pre-set pressure range as first earphone.
In a kind of possible realization method, which is configured as:
At least one of temperature information and the pressure information that the chip in the earphone is sent are received, which is configured as connecing It receives in the pressure information that the pressure sensor in the temperature information and the earphone that the temperature sensor in the earphone is sent is sent extremely One item missing, the temperature sensor are configured as detecting the temperature of the earphone local environment, which is configured as detecting The pressure that the earphone is subject to.
In a kind of possible realization method, referring to Fig. 4, which further includes:
Sending module 304 is configured as the earphone connected to the electronic equipment and sends detection instruction, which instructs quilt It is configured to indicate the earphone into trip temperature and/or pressure detecting, and send in temperature information and pressure information to the electronic equipment At least one of.
In the embodiment of the present disclosure, by the way that when receiving audio play instruction, whether test earphone is worn on ear, from And audio output only is carried out to the earphone being worn on ear, without carrying out audio output to the earphone not being worn on ear, Avoid unnecessary electrical source consumption.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 5 is a kind of block diagram of the device 500 of control audio output shown according to an exemplary embodiment.For example, dress It can be mobile phone to set 500, computer, digital broadcasting electronic equipment, messaging devices, game console, tablet device, Medical Devices, body-building equipment, the electronic equipments such as personal digital assistant.
With reference to Fig. 5, device 500 may include following one or more components:Processing component 502, memory 504, power supply Component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor module 514, Yi Jitong Believe component 516.
The integrated operation of 502 usual control device 500 of processing component, such as with display, call, data communication, phase Machine operates and record operates associated operation.Processing component 502 may include that one or more processors 520 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 502 may include one or more modules, just Interaction between processing component 502 and other assemblies.For example, processing component 502 may include multi-media module, it is more to facilitate Interaction between media component 508 and processing component 502.
Memory 504 is configured as storing various types of data to support the operation in device 500.These data are shown Example includes instruction for any application program or method that operate on device 500, contact data, and telephone book data disappears Breath, picture, video etc..Memory 504 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 506 provides electric power for the various assemblies of device 500.Power supply module 506 may include power management system System, one or more power supplys and other generated with for device 500, management and the associated component of distribution electric power.
Multimedia component 508 is included in the screen of one output interface of offer between device 500 and user.In some realities It applies in example, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch screen, to receive input signal from the user.Touch panel include one or more touch sensors with Sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and And also detection and touch or the relevant duration and pressure of slide.In some embodiments, multimedia component 508 includes One front camera and/or rear camera.It is preceding when such as screening-mode or video mode when device 500 is in operation mode External multi-medium data can be received by setting camera and/or rear camera.Each front camera and rear camera can Be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 510 is configured as output and/or input audio signal.For example, audio component 510 includes a Mike Wind (MIC), when device 500 is in operation mode, when such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The received audio signal can be further stored in memory 504 or via communication set Part 516 is sent.In some embodiments, audio component 510 further includes a loud speaker, is used for exports audio signal.
I/O interfaces 512 provide interface between processing component 502 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor module 514 includes one or more sensors, and the state for providing various aspects for device 500 is commented Estimate.For example, sensor module 514 can detect the state that opens/closes of device 500, the relative positioning of component, such as component For the display and keypad of device 500, sensor module 514 can be with the position of 500 1 components of detection device 500 or device Set change, the existence or non-existence that user contacts with device 500, the temperature of 500 orientation of device or acceleration/deceleration and device 500 Variation.Sensor module 514 may include proximity sensor, be configured to detect without any physical contact near The presence of object.Sensor module 514 can also include optical sensor, such as CMOS or ccd image sensor, for being answered in imaging With middle use.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure sensor or temperature sensor.
Communication component 516 is configured to facilitate the communication of wired or wireless way between device 500 and other equipment.Device 500 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary implementation In example, communication component 516 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, communication component 516 further includes near-field communication (NFC) module, to promote short range communication.For example, It can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, bluetooth in NFC module (BT) technology and other technologies are realized.
In the exemplary embodiment, device 500 can be believed by one or more application application-specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned control audio output Method.
In the exemplary embodiment, it includes the non-transitorycomputer readable storage medium instructed, example to additionally provide a kind of Such as include the memory 504 of instruction, above-metioned instruction can be executed by the processor 520 of device 500 to complete the above method.For example, Non-transitorycomputer readable storage medium can be read-only memory (ROM), random access memory (RAM), CD-ROM (CD-ROM), tape, floppy disk and optical data storage devices etc..
In the exemplary embodiment, a kind of computer readable storage medium being stored with computer program, example are additionally provided It is such as stored with the memory of computer program, above computer program realizes the control in above-described embodiment when being executed by processor The method of audio output.For example, computer readable storage medium can be read-only memory (ROM), random access memory (RAM), CD-ROM (CD-ROM), tape, floppy disk and optical data storage devices etc..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (10)

1. a kind of method of control audio output, which is characterized in that it is applied to electronic equipment, the method includes:
Audio play instruction is received, the audio play instruction is used to indicate broadcasting audio file;
When detect in the earphone that the electronic equipment is connected there is any earphone not to be worn in human ear when, determine the first ear Machine, first earphone are the earphone not being worn in human ear;
The second earphone only into the earphone exports the audio signal of the audio file, and second earphone is the earphone Described in earphone other than the first earphone.
2. according to the method described in claim 1, it is characterized in that, described in the second earphone output only into the earphone The audio signal of audio file, including:
When second earphone is left earphone, only left channel audio signal is exported to second earphone;Or,
When second earphone is right earphone, only right channel audio signal is exported to second earphone.
3. according to the method described in claim 1, it is characterized in that, described ought detect the earphone that the electronic equipment is connected In when thering is any earphone not to be worn in human ear, determine the first earphone, including:
Obtain at least one of temperature information and the pressure information of the earphone that the electronic equipment is connected;
When at least one of the temperature information of any earphone and pressure information meet in the earphone that the electronic equipment is connected When preset condition, the earphone of the preset condition will be met as first earphone.
4. according to the method described in claim 3, it is characterized in that, any in the earphone connected when the electronic equipment When at least one of temperature information and pressure information of earphone meet preset condition, the earphone that will meet the preset condition is made For first earphone, including:
When the corresponding temperature of the temperature information of any earphone in the earphone that the electronic equipment is connected is not at preset temperature When in range, temperature is not at the earphone in the preset temperature range as first earphone;Or,
When the corresponding pressure of the pressure information of any earphone in the earphone that the electronic equipment is connected is not at preset pressure When in range, pressure is not at the earphone in the pre-set pressure range as first earphone;Or,
When the corresponding temperature of the temperature information of any earphone in the earphone that the electronic equipment is connected is not at described preset In temperature range, and when the corresponding pressure of pressure information is not in the pre-set pressure range, temperature is not at described pre- If in temperature range and pressure is not at the earphone in the pre-set pressure range as first earphone.
5. according to the method described in claim 3, it is characterized in that, the temperature for obtaining the earphone that the electronic equipment is connected At least one of information and pressure information are spent, including:
At least one of temperature information and the pressure information that the chip in the earphone is sent are received, the chip is for receiving institute It states in the pressure information that the pressure sensor in the temperature information and the earphone that the temperature sensor in earphone is sent is sent extremely One item missing, the temperature sensor are used to detect the temperature of the earphone local environment, and the pressure sensor is for detecting institute State the pressure that earphone is subject to.
6. according to the method described in claim 3, it is characterized in that, the temperature for obtaining the earphone that the electronic equipment is connected It spends before at least one of information and pressure information, the method further includes:
The earphone connected to the electronic equipment sends detection instruction, and the detection instruction is used to indicate the earphone and carries out temperature Degree and/or pressure detecting, and send at least one of temperature information and pressure information to the electronic equipment.
7. a kind of device of control audio output, which is characterized in that described device includes:
Receiving module, for receiving audio play instruction, the audio play instruction is used to indicate broadcasting audio file;
Determining module, for when detecting in earphone that the electronic equipment is connected there is any earphone not to be worn on human ear When, determine that the first earphone, first earphone are the earphone not being worn in human ear;
Output module, exports the audio signal of the audio file for the second earphone only into the earphone, and described second Earphone is the earphone other than the first earphone described in the earphone.
8. device according to claim 7, which is characterized in that the determining module is used for:
Obtain at least one of temperature information and the pressure information of the earphone that the electronic equipment is connected;
When at least one of the temperature information of any earphone and pressure information meet in the earphone that the electronic equipment is connected When preset condition, the earphone of the preset condition will be met as first earphone.
9. a kind of device of control audio output, which is characterized in that described device includes:
Processor;
Memory for storing the executable instruction of processor;
Wherein, the processor is configured as:
Audio play instruction is received, the audio play instruction is used to indicate broadcasting audio file;
When detect in the earphone that the electronic equipment is connected there is any earphone not to be worn in human ear when, determine the first ear Machine, first earphone are the earphone not being worn in human ear;
The second earphone only into the earphone exports the audio signal of the audio file, and second earphone is the earphone Described in earphone other than the first earphone.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-6 any one of them method and steps when the computer program is executed by processor.
CN201810306976.XA 2018-04-08 2018-04-08 Control the method and device of audio output Pending CN108549529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810306976.XA CN108549529A (en) 2018-04-08 2018-04-08 Control the method and device of audio output

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810306976.XA CN108549529A (en) 2018-04-08 2018-04-08 Control the method and device of audio output

Publications (1)

Publication Number Publication Date
CN108549529A true CN108549529A (en) 2018-09-18

Family

ID=63514183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810306976.XA Pending CN108549529A (en) 2018-04-08 2018-04-08 Control the method and device of audio output

Country Status (1)

Country Link
CN (1) CN108549529A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151212A (en) * 2018-09-30 2019-01-04 Oppo广东移动通信有限公司 Apparatus control method, device and electronic equipment
CN109413555A (en) * 2018-09-30 2019-03-01 Oppo广东移动通信有限公司 Audio-frequency inputting method, device, earphone and electronic equipment
CN109743652A (en) * 2019-01-09 2019-05-10 屈云波 Headset control method, earphone and computer readable storage medium
CN109765784A (en) * 2019-01-11 2019-05-17 深圳市迷购网络科技有限公司 Headset control method, earphone and computer readable storage medium
WO2020063065A1 (en) * 2018-09-30 2020-04-02 Oppo广东移动通信有限公司 Audio transmission method and apparatus, electronic device, and storage medium
CN115119098A (en) * 2022-08-30 2022-09-27 荣耀终端有限公司 Audio playing control method, TWS earphone and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101232743A (en) * 2007-01-24 2008-07-30 鸿富锦精密工业(深圳)有限公司 Audio playing device and used earphone, automatic control method
CN101488081A (en) * 2008-01-14 2009-07-22 鸿富锦精密工业(深圳)有限公司 Audio device and its playing apparatus and method
CN104010071A (en) * 2013-02-26 2014-08-27 三星电子株式会社 Application control method and apparatus for mobile terminal, earphone device and application control system
CN105491469A (en) * 2014-09-15 2016-04-13 Tcl集团股份有限公司 Method and system for controlling audio output mode based on wearing earphone state
US20160259618A1 (en) * 2004-07-06 2016-09-08 Sony Corporation Playback system, headphones, playback apparatus and method, and recording medium and program for controlling playback apparatus and method
CN107484082A (en) * 2017-08-08 2017-12-15 广东小天才科技有限公司 A kind of method and user terminal based on sound channel control audio signal transmission

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160259618A1 (en) * 2004-07-06 2016-09-08 Sony Corporation Playback system, headphones, playback apparatus and method, and recording medium and program for controlling playback apparatus and method
CN101232743A (en) * 2007-01-24 2008-07-30 鸿富锦精密工业(深圳)有限公司 Audio playing device and used earphone, automatic control method
CN101488081A (en) * 2008-01-14 2009-07-22 鸿富锦精密工业(深圳)有限公司 Audio device and its playing apparatus and method
CN104010071A (en) * 2013-02-26 2014-08-27 三星电子株式会社 Application control method and apparatus for mobile terminal, earphone device and application control system
CN105491469A (en) * 2014-09-15 2016-04-13 Tcl集团股份有限公司 Method and system for controlling audio output mode based on wearing earphone state
CN107484082A (en) * 2017-08-08 2017-12-15 广东小天才科技有限公司 A kind of method and user terminal based on sound channel control audio signal transmission

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151212A (en) * 2018-09-30 2019-01-04 Oppo广东移动通信有限公司 Apparatus control method, device and electronic equipment
CN109413555A (en) * 2018-09-30 2019-03-01 Oppo广东移动通信有限公司 Audio-frequency inputting method, device, earphone and electronic equipment
WO2020063065A1 (en) * 2018-09-30 2020-04-02 Oppo广东移动通信有限公司 Audio transmission method and apparatus, electronic device, and storage medium
CN109151212B (en) * 2018-09-30 2021-03-12 Oppo广东移动通信有限公司 Equipment control method and device and electronic equipment
CN109743652A (en) * 2019-01-09 2019-05-10 屈云波 Headset control method, earphone and computer readable storage medium
CN109765784A (en) * 2019-01-11 2019-05-17 深圳市迷购网络科技有限公司 Headset control method, earphone and computer readable storage medium
CN115119098A (en) * 2022-08-30 2022-09-27 荣耀终端有限公司 Audio playing control method, TWS earphone and storage medium
CN115119098B (en) * 2022-08-30 2022-12-27 荣耀终端有限公司 Audio playing control method, TWS earphone and storage medium

Similar Documents

Publication Publication Date Title
CN108549529A (en) Control the method and device of audio output
CN105451111B (en) Earphone control method for playing back, device and terminal
CN104902059A (en) Call reminding method and device
CN105262452A (en) Method and apparatus for adjusting volume, and terminal
CN105138319B (en) Event-prompting method and device
CN104598130A (en) Mode switching method, terminal, wearable equipment and device
CN106161781A (en) Method for regulation of sound volume and device
CN104318934A (en) Method, terminal, wearable device and play device for closing multimedia file
CN104636110B (en) Control the method and device of volume
CN106095401A (en) Informing message treatment method and device
CN104301877A (en) Short message prompting method and device
CN105511749A (en) Method and device for equipment control
CN107493500A (en) Multimedia resource player method and device
CN106454644A (en) Audio playing method and device
CN104935729B (en) Audio-frequency inputting method and device
CN105704317A (en) Antenna parameter adjustment method and apparatus, and electronic device
CN106453838B (en) Volume adjusting method and device
CN103986999A (en) Method, device and terminal equipment for detecting earphone impedance
CN105468236A (en) Message prompting method and apparatus and terminal
CN105708609A (en) User snore reminding method, device and system
CN104378715A (en) Device and method for lowering earphone POP sound
CN108462784A (en) In Call method of adjustment and device
CN106060296A (en) Terminal control method, device and system
CN107682538A (en) The display methods and device of application interface
CN106941635A (en) Audio amplifier connection method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180918

RJ01 Rejection of invention patent application after publication