CN108605067A - Play the method and mobile terminal of audio - Google Patents

Play the method and mobile terminal of audio Download PDF

Info

Publication number
CN108605067A
CN108605067A CN201680080680.XA CN201680080680A CN108605067A CN 108605067 A CN108605067 A CN 108605067A CN 201680080680 A CN201680080680 A CN 201680080680A CN 108605067 A CN108605067 A CN 108605067A
Authority
CN
China
Prior art keywords
loudspeaker
mobile terminal
audio
blocked
sound outlet
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.)
Granted
Application number
CN201680080680.XA
Other languages
Chinese (zh)
Other versions
CN108605067B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN108605067A publication Critical patent/CN108605067A/en
Application granted granted Critical
Publication of CN108605067B publication Critical patent/CN108605067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/03Constructional features of telephone transmitters or receivers, e.g. telephone hand-sets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers

Abstract

A kind of method and mobile terminal playing audio, to improve the efficiency of mobile terminal playing audio.Including:Determine that audio is currently played in mobile terminal;Determine whether the sound outlet of the loud speaker of mobile terminal is blocked;In the case where determining that the sound outlet of loud speaker is blocked, audio is played using the receiver of mobile terminal;In the case where determining that the sound outlet of loud speaker is not blocked, audio is played using loud speaker.

Description

Play the method and mobile terminal of audio Technical field
The present invention relates to methods and mobile terminal that audio is played in field of terminal more particularly to field of terminal.
Background technique
In the prior art, the sound outlet of the loudspeaker of mobile terminal designs frame or the back side in mobile terminal more.For example, as shown in Figure 1, many mainstream mobile phones are by loudspeaker design in mobile phone bottom frame.But this design method also brings along obvious problem in some scenarios: user is when using mobile terminal, if the sound quality that will lead to the audio of loudspeaker broadcasting is affected since holding mode shelters from the sound outlet of loudspeaker.For example, palm can be tightly stifled by the sound outlet of loudspeaker, causes sound very little very bored, influences user experience as shown in Fig. 2, user's transverse screen holds mobile phone when seeing video or playing game.
Summary of the invention
The present invention provides a kind of methods and mobile terminal for playing audio, to improve the efficiency of mobile terminal playing audio.
In a first aspect, providing a kind of method for playing audio, comprising: determine that audio is currently played in mobile terminal;Determine whether the sound outlet of the loudspeaker of the mobile terminal is blocked;In the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal;In the case where determining that the sound outlet of the loudspeaker is not blocked, the audio is played using the loudspeaker.
In the case where mobile terminal playing audio, whether the sound outlet of detection loudspeaker is blocked, and in the case where detecting that the sound outlet of loudspeaker is blocked, plays the audio using earpiece, to compensate the broadcast sound volume of the audio, the efficiency of mobile terminal playing audio is improved.
In one possible implementation, audio is currently played to determine that the loudspeaker is being currently used in the mobile terminal and playing the audio in the determining mobile terminal, whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising: the expectation for obtaining the audio plays waveform;Obtain the actual play waveform of the audio;Waveform and the actual play waveform are played according to the expectation, determines whether the sound outlet of the loudspeaker is blocked.
In the case where mobile terminal playing audio, the actual play waveform of audio is obtained, and by comparing The actual play waveform of audio and expectation play the difference size between waveform, determine whether the sound outlet of loudspeaker is blocked, improve the detection efficiency of mobile terminal.
In one possible implementation, the expectation waveform for obtaining the audio, comprising: obtain the audio from the audio buffer of the mobile terminal and play waveform in the expectation of target time section;The actual play waveform for obtaining the audio, comprising: the audio is obtained in the actual play waveform of the target time section by the microphone in the mobile terminal.
In one possible implementation, described that waveform and the actual play waveform are played according to the expectation, determine whether the sound outlet of the loudspeaker is blocked, comprising: determine that the expectation plays the amplitude of waveform;Determine the amplitude of the actual play waveform;The amplitude of waveform and the amplitude of the actual play waveform are played according to the expectation, determines whether the outlet of the loudspeaker is blocked.
In one possible implementation, described that waveform and the actual play waveform are played according to the expectation, determine whether the sound outlet of the loudspeaker is blocked, comprising: determine that the expectation plays the low frequency region energy of waveform;Determine the low frequency region energy of the actual play waveform;The low frequency region energy of waveform and the low frequency region energy of the actual play waveform are played according to the expectation, determines whether the outlet of the loudspeaker is blocked.
In one possible implementation, audio is currently played to determine that the loudspeaker is being currently used in the mobile terminal and playing the audio in the determining mobile terminal, whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising: passes through the atmospheric pressure value in the intracavitary portion of sound that baroceptor obtains the loudspeaker;In the case where the atmospheric pressure value is greater than air pressure threshold value, determine that the sound outlet of the loudspeaker is blocked;In the case where the atmospheric pressure value is less than or equal to the air pressure threshold value, determine that the sound outlet of the loudspeaker is not blocked.
In one possible implementation, audio is currently played to determine that the loudspeaker is being currently used in the mobile terminal and playing the audio in the determining mobile terminal, whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising: passes through the sound pressure level in the intracavitary portion of sound that sound pressure sensor obtains the loudspeaker;In the case where the sound pressure level is greater than acoustic pressure threshold value, determine that the sound outlet of the loudspeaker is blocked;In the case where the sound pressure level is less than or equal to the acoustic pressure threshold value, determine that the sound outlet of the loudspeaker is not blocked.
In one possible implementation, whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising: determines the target range between object and the sound outlet of the loudspeaker by range sensor;In the case where the target range is less than distance threshold, the luminous flux in the intracavitary portion of sound of the loudspeaker is determined by ambient light sensor;In the case where the luminous flux is less than luminous flux threshold value, Determine that the sound outlet of the loudspeaker is blocked.
In one possible implementation, whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising: the pressure value of the sound cavity outer wall of the loudspeaker is determined by pressure sensor;In the case where the pressure value is greater than pressure threshold, determine that the sound outlet of the loudspeaker is blocked;In the case where the pressure value is less than or equal to the pressure threshold, determine that the sound outlet of the loudspeaker is not blocked.
In one possible implementation, it is described in the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal, comprising: in the case where playing the audio using the earpiece, increases the output power of the earpiece.
In one possible implementation, described in the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal, comprising: plays the audio jointly using the earpiece and the loudspeaker.
In one possible implementation, it is described in the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal, it include: to play the audio jointly using the earpiece and the loudspeaker in the case where the remaining capacity of the mobile terminal is greater than power threshold;In the case where the remaining capacity of the mobile terminal is less than or equal to the power threshold, the earpiece is used only and plays the audio.
In one possible implementation, audio is currently played to determine that the earpiece is being currently used in the mobile terminal and playing the audio in the determining mobile terminal;The method also includes: in the case where determining that the sound outlet of the loudspeaker is not blocked, the earpiece is stopped using to play the audio.
In one possible implementation, whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising: whether the sound outlet of the loudspeaker according to cycle detection is blocked.
Second aspect, provides a kind of mobile terminal, and the mobile terminal includes the module for executing the method for first aspect.Based on the same inventive concept, the principle solved the problems, such as due to the mobile terminal is corresponding with the scheme in the design of the method for first aspect, and the implementation of the mobile terminal may refer to the implementation of method, and overlaps will not be repeated.
The third aspect, provides a kind of mobile terminal, and the mobile terminal includes memory, processor.The memory is for storing program, and the processor is for executing program.When the method that described program is performed, and the processor is used to execute first aspect.Based on the same inventive concept, the principle solved the problems, such as due to the mobile terminal is corresponding with the scheme in the design of the method for first aspect, the reality of the mobile terminal The implementation for the method for may refer to is applied, overlaps will not be repeated.
Fourth aspect, provide a kind of System on Chip/SoC, including input interface, output interface, at least one processor, memory, the input interface, output interface, the processor and memory are directly connected by bus, the processor is used to execute the code in the memory, when the code is performed, the processor realizes the method in first aspect.Based on the same inventive concept, the principle solved the problems, such as due to the System on Chip/SoC is corresponding with the scheme in the design of the method for first aspect, and the implementation of the System on Chip/SoC may refer to the implementation of method, and overlaps will not be repeated.
5th aspect, provide a kind of computer-readable medium, the computer-readable medium storage is used for the program code that terminal executes, said program code is used to execute the instruction of the method for first aspect, based on the same inventive concept, since the principle that the System on Chip/SoC solves the problems, such as is corresponding with the scheme in the design of the method for first aspect, the implementation of the System on Chip/SoC may refer to the implementation of method, and overlaps will not be repeated.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, the drawings to be used in the description of the embodiments or prior art will be briefly described below, apparently, drawings in the following description are only some embodiments of the invention, for those of ordinary skill in the art, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the schematic diagram of mobile terminal in the prior art.
Fig. 2 is the schematic diagram in the prior art for holding mobile terminal.
Fig. 3 is the block schematic illustration of the mobile terminal of the embodiment of the present invention.
Fig. 4 is the flow chart of the method for the broadcasting audio of another embodiment of the present invention.
Fig. 5 is the flow chart of the method for the broadcasting audio of another embodiment of the present invention.
Fig. 6 is the flow chart of the method for the broadcasting audio of yet another embodiment of the invention.
Fig. 7 is the flow chart of the method for the broadcasting audio of yet another embodiment of the invention.
Fig. 8 is the flow chart of the method for the broadcasting audio of further embodiment of this invention.
Fig. 9 is the flow chart of the method for the broadcasting audio of further embodiment of this invention.
Figure 10 is the block schematic illustration of the mobile terminal of further embodiment of this invention.
Figure 11 is the block schematic illustration of the mobile terminal of further embodiment of this invention.
Figure 12 is the block schematic illustration of the System on Chip/SoC of further embodiment of this invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is a part of the embodiments of the present invention, rather than whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art's every other embodiment obtained without making creative work, all should belong to the scope of protection of the invention.
It will also be understood that, in embodiments of the present invention, mobile terminal may include mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, point-of-sale terminal), vehicle-mounted computer etc..Mobile terminal can be referred to as user equipment (User Equipment, referred to as " UE "), terminal (Terminal), mobile station (Mobile Station, referred to as " MS "), Deng, the mobile terminal can be through wireless access network (Radio Access Network, referred to as " RAN ") it is communicated with one or more core nets, such as, mobile terminal can be mobile phone (or being " honeycomb " phone), computer etc. with mobile terminal, such as, mobile terminal can also be portable, pocket, hand-held, built-in computer or vehicle-mounted mobile device, they exchange voice and/or data with wireless access network.The present invention does not limit this.
Fig. 3 shows the block diagram that the present invention implements the part-structure of relevant mobile terminal.As shown in figure 3, the mobile terminal 300 includes processor 310, memory 320, power supply 330, the components such as voicefrequency circuit 340, loudspeaker 350 and microphone 360, earpiece 370.It will be understood by those skilled in the art that mobile terminal structure shown in Fig. 3 does not constitute the restriction to mobile terminal, it may include perhaps combining certain components than illustrating more or fewer components and perhaps splitting certain components or different component layouts.
As shown in Figure 3, processor 310 is the control centre of mobile terminal 300, utilize the various pieces of various interfaces and the entire mobile terminal of connection, by running or executing the software program and/or module that are stored in memory 320, and call the data being stored in memory 320, the various functions and processing data for executing mobile terminal 300, to carry out whole control to mobile phone.Wherein, the method for playing audio of the embodiment of the present invention can be executed by processor 310.
Voicefrequency circuit 340, loudspeaker 350, microphone 360, earpiece 370 can provide the audio interface between user and mobile terminal 300.Voicefrequency circuit the audio data received can be converted into analog signal (such as, processor 310 reads audio data into the memory of mobile terminal 300 from memory 320, voicefrequency circuit can receive audio data from the memory of mobile terminal under the control of processor 310), it is transferred to loudspeaker 350 or earpiece 370, voice signal output is converted to by loudspeaker 350 or earpiece 370;On the other hand, the voice signal of collection is converted to analog signal by microphone 360, is converted to audio data after being received by voicefrequency circuit 340, then audio data is exported to memory 320 further to locate Reason.
As described above, the sound outlet of the loudspeaker of mobile terminal in the prior art designs at the back side of mobile terminal or frame more, the sound outlet that this design method makes user loudspeaker occur when transverse screen holds mobile phone is blocked, and then influences to play the quality of audio.
Regarding to the issue above, the embodiment of the invention provides a kind of methods and mobile terminal for playing audio, in the case where mobile terminal playing audio, whether the sound outlet of the loudspeaker of real-time detection mobile terminal is blocked, in the case where the sound outlet of loudspeaker is blocked, the audio is played using the earpiece of mobile terminal, to improve the efficiency of mobile terminal playing audio, and improves user experience.
In embodiments of the present invention, in the case where mobile terminal playing audio, whether the sound outlet of real-time detection loudspeaker is blocked, and in the case where detecting that the sound outlet of loudspeaker is blocked, the audio is played using earpiece, to compensate the broadcast sound volume of the audio, the efficiency and user experience of mobile terminal playing audio are improved.
It will be appreciated by those of skill in the art that earpiece is substantially similar device with loudspeaker, the device for playing audio is contributed to, the main distinction is that output power is different (under normal conditions, the output power that the output power of loudspeaker is greater than earpiece).So can use compensation of the earpiece realization to the outer playback amount of loudspeaker.
Fig. 4 is the flow diagram of the method 400 of the broadcasting audio of the embodiment of the present invention, as shown in figure 4, this method 400 can include: by mobile terminal execution, this method 400
401, determine that audio is currently played in mobile terminal;
In 401 parts, above-mentioned determining mobile terminal is currently played audio, may include:
I. determine that mobile terminal is currently used only loudspeaker and plays audio;
II. determine that mobile terminal currently passes through loudspeaker and earpiece plays audio jointly;
III. determine that mobile terminal is currently used only earpiece and plays audio.
The method that audio is currently played in above-mentioned determining mobile terminal, the voicefrequency circuit that can be processor (or operating system) the detection mobile terminal of mobile terminal is in running order, and then determines that audio is currently played in mobile terminal.It will be understood by those skilled in the art that control centre of the processor (or operating system) of mobile terminal as mobile terminal, can control voicefrequency circuit using some hardware (loudspeaker or earpiece) and carries out audio broadcasting.I.e. processor (or operating system) can recorde and determine that voicefrequency circuit currently carries out the device of audio broadcasting.By taking Android system as an example, above-mentioned logic and ability can realize in framework (framework) level of operating system, meanwhile, Android system can be the open corresponding interface of audio frequency controller of upper layer application, upper layer application applies calling interface by calling accordingly, and realization passes through loudspeaking Device audio stream plays pass through earpiece audio stream plays or pass through the logics such as loudspeaker and earpiece audio stream plays, the unlatching of device is by realizing using calling interface, so using that can also determine currently which device to be playing audio by, processor (or operating system) is used as final execution unit, can know the current state of voicefrequency circuit, earpiece, loudspeaker by the driving level of more bottom.In addition, whether application program can also in the open state by some current device of application programming interface (Application Programming Interface, API) inquiry of Android system offer.
It is alternatively possible to be currently whether to play audio using loudspeaker according to cycle detection mobile terminal.
402, determine whether the sound outlet of the loudspeaker of the mobile terminal is blocked;
It should be understood that the sound outlet of above-mentioned loudspeaker is also known as the acoustic aperture, or the aperture of referred to as loudspeaker out of loudspeaker.
Optionally, whether the sound outlet of above-mentioned determining loudspeaker is blocked, and can be according to whether the sound outlet of cycle detection loudspeaker is blocked.
Specifically, the scheme that whether is blocked of sound outlet of loudspeaker mainly point two types are determined in the embodiment of the present invention, first kind scheme is the difference size between the waveform played according to the waveform and expectation of loudspeaker actual play, determines whether the sound outlet of loudspeaker is blocked.Such method does not need to do the extension of hardware aspect, using flexible.Whether the second class scheme is that sensor is arranged inside or around the sound chamber of loudspeaker, be blocked by the sound outlet of sensor measurement loudspeaker.Wherein, sensor may include at least one of lower sensor: sound pressure sensor, baroceptor, range sensor, ambient light sensor or pressure sensor.Sensor in the embodiment of the present invention also may include other kinds of sensor, and this is not limited by the present invention.It is hereinafter described in this step and determines loudspeaker sound exports the specific method whether being blocked.
A. determine whether speaker outlet is blocked according to the broadcasting waveform of audio.
Optionally, as an example, it determines whether the sound outlet of loudspeaker is blocked in 402 parts, can be, in the case where 401 parts determine that the currently used loudspeaker of mobile terminal plays the audio, the expectation for obtaining the audio plays waveform;Obtain the actual play waveform of the audio;Waveform and the actual play waveform are played according to the expectation, determines whether the sound outlet of the loudspeaker is blocked.Wherein, the embodiment of the present invention determines that mobile terminal is currently used only loudspeaker and plays the audio suitable for 401 parts, or determines the case where currently used loudspeaker of mobile terminal and earpiece play the audio simultaneously.
In the case where the sound openings of loudspeaker are blocked, the amplitude of the actual play waveform of audio will be less than the amplitude of expectation broadcasting waveform.The amplitude that waveform can be played by expectation is greater than the waveforms amplitude of actual play, and then determines that the sound outlet of loudspeaker is blocked.Alternatively, by determining that expectation plays waveform Amplitude is less than or equal to the amplitude of actual play waveform, and then determines that the sound outlet of loudspeaker is not blocked.Optionally, above-mentioned amplitude can be average amplitude.Alternatively, " Occlusion effect " can be generated in the case where the sound outlet of loudspeaker is blocked, the sound energy value of the low frequency region of the audio played is caused to improve, " Occlusion effect " is more serious, and what the sound energy value of low frequency region was promoted is just more obvious.The low frequency region energy of expectation broadcasting waveform can be greater than by determining the low frequency region energy of actual play waveform, and then determine that the sound outlet of loudspeaker is blocked, or the low frequency region energy by determining actual play waveform is less than or equal to expectation and plays the low frequency range energy of waveform, and then determines that the sound outlet of loudspeaker is not blocked.
Optionally, the expectation of the above-mentioned acquisition audio plays waveform, comprising: obtains the audio from the audio buffer of the mobile terminal and plays waveform in the expectation of target time section;The actual play waveform of the above-mentioned acquisition audio, comprising: the audio is obtained in the actual play waveform of the target time section by the microphone in the mobile terminal.
For example, obtain audio expectation play waveform, can be mobile terminal processor is obtained from the audio buffer of mobile terminal audio real-time waveform data copy, and combine current system sound volume rank, generate expectation broadcasting waveform Wave data.The actual play waveform of audio is obtained, the processor that can be mobile terminal picks up current ambient sound by microphone, and handles the ambient sound of pickup, to obtain the Wave data of the actual play waveform of audio.Above two Wave data is subjected to time synchronization, intercepts the Wave data of target time section respectively.
Such as, the amplitude of the expectation broadcasting waveform of above-mentioned acquisition and the Wave data of actual play waveform can be compared, if the amplitude of actual play waveform is less than the amplitude that expectation plays waveform, it can then determine that the sound outlet of the loudspeaker is blocked, if the amplitude of actual play waveform is more than or equal to the amplitude that expectation plays waveform, it can determine that the sound outlet of the loudspeaker is not blocked.
Optionally, above-mentioned that waveform and the actual play waveform are played according to the expectation, determine whether the sound outlet of the loudspeaker is blocked, comprising: determine that the expectation plays the low frequency region energy of waveform;Determine the low frequency region energy of the actual play waveform;The low frequency region energy of waveform and the low frequency region energy of the actual play waveform are played according to the expectation, determines whether the outlet of the loudspeaker is blocked.
For example, above-mentioned determining expectation plays the low frequency region energy of waveform, it can be and the Wave data that the expectation of above-mentioned acquisition plays waveform and actual play waveform is respectively converted into frequency spectrum data.And the low frequency region energy of the frequency spectrum data of two kinds of waveforms is calculated separately according to frequency spectrum data.
B. determine whether the sound outlet of loudspeaker is blocked by sensor.
Optionally, as an example, determine whether the sound outlet of loudspeaker is blocked in 402 parts, It may include: to pass through the atmospheric pressure value (or sound pressure level) that baroceptor (or sound pressure sensor) obtains the intracavitary portion of sound of the loudspeaker in the case where 401 parts determine that loudspeaker broadcasting audio is being currently used in mobile terminal;In the case where the atmospheric pressure value (or sound pressure level) is greater than air pressure threshold value (or acoustic pressure threshold value), determine that the sound outlet of the loudspeaker is blocked;In the case where the atmospheric pressure value (or sound pressure level) is less than or equal to the air pressure threshold value (or acoustic pressure threshold value), determine that the sound outlet of the loudspeaker is not blocked.Wherein, the present invention implements to determine that mobile terminal is currently used only loudspeaker and plays audio suitable for 401 parts, or determines the case where currently used loudspeaker of mobile terminal and earpiece play audio jointly.
Wherein, the baroceptor or the sound pressure sensor can be located at the intracavitary portion of sound of the loudspeaker.In the case where the sound outlet of loudspeaker is blocked, the acoustic pressure in the intracavitary portion of the sound of loudspeaker or air pressure will increase.So whether predetermined threshold can be greater than according to atmospheric pressure value or sound pressure level, determine whether the sound outlet of loudspeaker is blocked.Above-mentioned atmospheric pressure value (or sound pressure level) can be the average value of atmospheric pressure value (or sound pressure level).
Optionally, as an example, whether the sound outlet of above-mentioned determining loudspeaker is blocked, comprising: determines the target range between the object and the sound outlet of the loudspeaker by range sensor;In the case where the target range is less than distance threshold, determine that the sound outlet of the loudspeaker is blocked;In the case where the target is specifically greater than distance threshold, determine that the sound outlet of the loudspeaker is not blocked.
Wherein, above-mentioned range sensor can be located at the intracavitary portion of sound of the loudspeaker, and whether have object close to the sound outlet of loudspeaker, the target range in the case where having detected that object is close, between further detection object and the sound outlet of loudspeaker if being periodically detected.
Optionally, in the case where the sound outlet of loudspeaker is blocked, the luminous flux in the intracavitary portion of the sound of loudspeaker will become smaller, ambient light sensor can be set in the sound intracavitary portion of loudspeaker, the luminous flux inside speaker cavity is detected by ambient light sensor, to determine whether the outlet of loudspeaker is blocked.For example, determining that the sound outlet of loudspeaker is blocked in the case where above-mentioned luminous flux is less than luminous flux threshold value;In the case where above-mentioned luminous flux is greater than luminous flux threshold value, determine that the sound outlet of loudspeaker is not blocked.
Alternatively it is also possible to determine whether the sound outlet of the loudspeaker is blocked jointly by range sensor and ambient light sensor.For example, determining the luminous flux in the intracavitary portion of sound of the loudspeaker by the ambient light sensor in the case where determining that target range is less than distance threshold by range sensor;In the case where the luminous flux is less than luminous flux threshold value, determine that the sound outlet of the loudspeaker is blocked.
Pressure in the case where the sound outlet of loudspeaker is blocked on the sound cavity outer wall of loudspeaker will increase in the case where not being blocked compared to the sound outlet of loudspeaker.Can loudspeaker sound cavity outer wall or Pressure sensor is arranged in surrounding, and the pressure characteristic of the sound cavity outer wall of loudspeaker is detected by pressure sensor, determines whether the sound outlet of loudspeaker is blocked.
Optionally, as an example, whether the sound outlet of the above-mentioned determination loudspeaker is blocked, comprising: the pressure value of the sound cavity outer wall of the loudspeaker is determined by pressure sensor;In the case where the pressure value is greater than pressure threshold, determine that the sound outlet of the loudspeaker is blocked.In the case where the pressure value is less than or equal to the pressure threshold, determine that the sound outlet of the loudspeaker is not blocked.Wherein, above-mentioned pressure value can be the average value of pressure value.
It will be appreciated by those skilled in the art that above-mentioned acoustic pressure threshold value, air pressure threshold value, distance threshold, luminous flux threshold value or pressure threshold value can be chosen according to practical application, the embodiment of the present invention is not construed as limiting this.For example, can determine above-mentioned each threshold value according to the volume-level of currently playing audio.
It should be understood that audio may include two types, one is class audio frequency is played, for example, the audio or mobile terminal of mobile terminal playing audio file or video file output use certain audios applied and exported when (such as game);There are also a kind of audio that can be conversational class, for example, the audio that mobile terminal exports in voice, video call process.Determine that mobile terminal is playing audio and refers to playing the first class audio frequency in above-mentioned 401 part under normal circumstances.And in the case where the audio of mobile terminal playing conversational class, it can determine that the audio is played using loudspeaker and (can be and played jointly using loudspeaker broadcasting or loudspeaker and earpiece) first, then can further use sensor and determine whether the sound outlet of loudspeaker is blocked.Since the microphone of mobile terminal is also applied in voice and video call, the actual play waveform of the audio obtained with microphone may be inaccurate, influence the judgment accuracy whether being blocked to the sound outlet of loudspeaker, so the audio of conversational class is not suitable for determining whether the sound outlet of loudspeaker is blocked using according to the broadcasting waveform of audio, and it is suitable for determining whether the sound outlet of loudspeaker is blocked using sensor.
403, in the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal;
Optionally, the above-mentioned earpiece using the mobile terminal plays the audio, comprising: plays the audio jointly using the earpiece and the loudspeaker, or earpiece is used only and plays the audio.
For example, in this step, may include:
If I. determining in 401 parts, mobile terminal is currently used only loudspeaker and plays audio, can choose and enables earpiece broadcasting audio, and mute speaker;Or it enables earpiece and loudspeaker while playing audio.
If II. determining in 401 parts, the currently used loudspeaker of mobile terminal and earpiece play audio jointly, can choose and continue that loudspeaker and earpiece is kept to play audio jointly;Or it can only be protected with mute speaker Earpiece is stayed to play audio.
If III. determining in 401 parts, mobile terminal is currently used only earpiece and plays audio, earpiece can be kept to play audio, or enabling loudspeaker and earpiece play audio jointly.For example, in the detection in last period, however, it is determined that the sound openings of mobile terminal are blocked, and mobile terminal can be used only earpiece and be played audio with mute speaker.In the detection in this period, in the case where determining that the sound openings of mobile terminal are blocked, loudspeaker can also be opened and earpiece plays audio jointly.
Optionally, the above-mentioned earpiece using the mobile terminal plays the audio, can increase the output power of the earpiece in the case where playing the audio using the earpiece.Wherein, for example, in general, the default output power of earpiece is not peak power output, in this step, the output power of earpiece can be increased to peak power output or the output power greater than default output power.Alternatively, can also be extended to hardware, increases dedicated amplifier and the output power of earpiece is amplified.
Optionally, the above-mentioned earpiece using the mobile terminal plays the audio, further includes: in the case where the remaining capacity of the mobile terminal is greater than power threshold, plays the audio jointly using the earpiece and the loudspeaker;In the case where the remaining capacity of the mobile terminal is less than or equal to the power threshold, the earpiece is used only and plays the audio.For example, in the case where determining that the remaining capacity of mobile terminal is less than power threshold, if mobile terminal plays audio using loudspeaker and earpiece, mute speaker only retains earpiece and plays audio in this step.If mobile terminal is used only earpiece and plays audio, continue to keep playing audio using earpiece.If mobile terminal is used only loudspeaker and plays audio, starts earpiece and play audio, simultaneously close off loudspeaker.It will be appreciated by those skilled in the art that the value of above-mentioned power threshold can determine that this is not limited by the present invention according to practical application.
In embodiments of the present invention, in the case where mobile terminal playing audio, in the case where determining that the sound outlet of loudspeaker is blocked, the mode for playing audio is determined according to the remaining capacity size of mobile terminal, the efficiency for improving the broadcasting audio of mobile terminal, has saved the resource of mobile terminal.
404, in the case where determining that the sound outlet of the loudspeaker is not blocked, the audio is played using the loudspeaker.
Optionally, the above-mentioned loudspeaker using the mobile terminal plays the audio, comprising: loudspeaker is used only and plays the audio.For example, in this step, comprising:
If I. determining in 401 parts, mobile terminal is currently used only loudspeaker and plays audio, can continue that loudspeaker is kept to play audio.
If II. determining in 401 parts, the currently used loudspeaker of mobile terminal and earpiece play audio jointly, can close earpiece, and loudspeaker is used only and plays audio.
If III. determining in 401 parts, mobile terminal is currently used only earpiece and plays audio, can enable loudspeaker and play audio, and close earpiece.
As described above, determining that mobile terminal is being currently used earpiece and plays audio, comprising: determine that mobile terminal is currently used only earpiece and plays audio, or determine that mobile terminal plays audio using loudspeaker and earpiece jointly.Audio is currently played to determine that earpiece is being currently used in mobile terminal and playing the audio in the determining mobile terminal, the method also includes: in the case where determining that the sound outlet of the loudspeaker is not blocked, the earpiece is stopped using to play the audio.
Below in conjunction with Fig. 5 to Fig. 9, the embodiment of the present invention is introduced in further detail.It should be noted that the embodiment of Fig. 5 to Fig. 9 is used for the purpose of helping skilled in the art to understand the embodiment of the present invention.And specific value or concrete scene illustrated by the embodiment of the present invention have to being limited to.Those skilled in the art are according to the example of given Fig. 5 to Fig. 9, it is clear that can carry out the modification or variation of various equivalences, such modification or variation are also fallen into the range of the embodiment of the present invention.
Fig. 5 is the flow chart of the method according to an embodiment of the present invention for playing audio.The method of Fig. 5 can be by mobile terminal execution.The method of Fig. 5 determines whether the sound outlet of loudspeaker is blocked by detecting the amplitude of the actual play waveform of audio.The specific steps of which are as follows:
501, determine that mobile terminal is used loudspeaker and plays audio;
502, the copy for obtaining to mobile terminal period the real-time waveform data in audio buffer generates Wave data W1 in conjunction with the volume-level of currently playing audio;
503, current environment sound is picked up by the microphone in mobile terminal, obtains Wave data W2;
504, the Wave data W2 is filtered, remove useless ambient noise, obtain Wave data W3 (such as, be bottom microphone (i.e. close to the microphone of loudspeaker) pick up mainly " loudspeaker sound+ambient noise ", top microphone (i.e. from the farther away microphone of loudspeaker) pick up mainly " ambient noise ", according to existing " diamylose (double MIC) noise reduction algorithm " principle, it is superimposed after two-way voice signal is carried out reverse phase, ambient noise can be eliminated);
505, W1 and W3 are subjected to time synchronization, intercept the waveshape average amplitude of nearest one section of specific duration respectively, the average amplitude of W1 is subtracted to the average amplitude of W3, obtain difference D (or compared to obtain ratio E);
506, judge whether difference D (or ratio E) is greater than preset threshold;
If 507-a, difference D (or ratio E) are greater than preset threshold, it is determined that the sound outlet of loudspeaker is blocked;Execute step 508.
If 507-b, difference D (or ratio E) are less than or equal to preset threshold, if further the current only loudspeaker of judgement is playing audio, continue only to be played by loudspeaker;If currently playing audio together by loudspeaker and earpiece, the output of earpiece is closed, is changed to only be played by loudspeaker;Then return step 502 continue cycling through detection.
508, the audio is played using earpiece, wherein can enhance the output power of earpiece, at this point, earpiece and loudspeaker play identical audio data parallel.Then return step 502 continue cycling through execution above-mentioned steps, until detecting that mobile terminal stops playing audio.
In embodiments of the present invention, in the case where mobile terminal playing audio, the amplitude of waveform is played by the amplitude and expectation that obtain the actual play waveform of audio, the difference size for the amplitude for playing waveform according to the amplitude of actual play waveform and expectation judges whether the sound outlet of loudspeaker is blocked, and the broadcast mode of mobile terminal is determined according to judging result, improve the detection efficiency of the efficiency of mobile terminal playing audio, user experience and mobile terminal.
Wherein, enhancing for the output power of earpiece, it can be based on existing earpiece hardware (earpiece is substantially also a Microspeaker), most high-grade (general earpiece default output power is not most high-grade) temporarily is promoted to its output power, its volume upper limit is made to get a promotion.Hardware can also be extended, increase dedicated amplifier (such as, it can be power amplifier), promoted using output power of the amplifier to earpiece (such as, 5 times or more can generally be promoted), so that its output volume upper limit is can be close to the volume upper limit of loudspeaker.
Fig. 6 is the flow chart of the method according to another embodiment of the present invention for playing audio.The method of Fig. 6 determines whether the sound outlet of loudspeaker is blocked by the frequency spectrum data of the actual play waveform of audio.In method shown in fig. 6, detailed description related with Fig. 5 can be referred to the same or similar content of Fig. 5, details are not described herein again.The specific steps of which are as follows:
601, determine that mobile terminal is used loudspeaker and plays audio;
602, the copy for obtaining to mobile terminal period the real-time waveform data in audio buffer generates Wave data W1 in conjunction with the volume-level of currently playing audio, and Wave data W1 is converted to frequency spectrum data F1;
603, current environment sound is picked up by the microphone in mobile terminal, obtains Wave data W2, and Wave data W2 is converted into frequency spectrum data F2;
604, the Wave data F2 is filtered, removes useless ambient noise, obtain Wave data F3;
605, F1 and F3 are compared, obtains the difference of the low frequency region energy between F3 and F1 D (or ratio E);
606, judge whether difference D (or ratio E) is greater than preset threshold, that is, judge whether F3 in low frequency region energy value has apparent enhancing relative to F1.
Wherein, based on above-mentioned " Occlusion effect ", if the sound outlet of loudspeaker is blocked, the low frequency region energy of F3 can be dramatically increased.
If 607-a, difference D (or ratio E) are greater than preset threshold, it is determined that the sound outlet of loudspeaker is blocked;Execute step 608.
If 607-b, difference D (or ratio E) are less than or equal to preset threshold, if further the current only loudspeaker of judgement is playing audio, continue only to be played by loudspeaker;If currently playing audio together by loudspeaker and earpiece, the output of earpiece is closed, is changed to only be played by loudspeaker;Then return step 602 continue cycling through detection.
608, the audio is played using earpiece, wherein can enhance the output power of earpiece, at this point, earpiece and loudspeaker play identical audio data parallel.Then return step 602 continue cycling through execution above-mentioned steps, until detecting that mobile terminal stops playing audio.
In embodiments of the present invention, in the case where mobile terminal playing audio, the low frequency region energy of waveform is played by the low frequency region energy and expectation that obtain the actual play waveform of audio, judge whether the sound outlet of loudspeaker is blocked according to the difference size of above-mentioned two low frequency region energy, and the broadcast mode of mobile terminal is determined according to judging result, improve the detection efficiency of the efficiency of mobile terminal playing audio, user experience and mobile terminal.
Fig. 7 is the flow chart of the method according to another embodiment of the present invention for playing audio.The method of Fig. 7 determines whether the sound outlet of loudspeaker is blocked by the acoustic pressure or air pressure for detecting the intracavitary portion of sound of loudspeaker.In method shown in Fig. 7, detailed description related with Fig. 5 or Fig. 6 can be referred to the same or similar content of Fig. 5 or Fig. 6, details are not described herein again.The specific steps of which are as follows:
701, determine that mobile terminal is used loudspeaker and plays audio;
702, ambient pressure/acoustic pressure is periodically detected by speaker intracavitary baroceptor/sound pressure sensor;
703, determination ought for the previous period in air pressure/acoustic pressure mean value;
704, judge whether air pressure/acoustic pressure mean value is greater than air pressure/acoustic pressure threshold value (above-mentioned air pressure/acoustic pressure threshold value can be determined according to the volume-level of currently playing audio);
If 705-a, air pressure/acoustic pressure mean value are greater than air pressure/acoustic pressure threshold value, it is determined that the sound openings of current speaker are blocked;Execute step 706.
If 705-b, air pressure/acoustic pressure mean value are less than air pressure/acoustic pressure threshold value, it is determined that the sound openings of current speaker are not blocked.It can further judge to continue only to be played by loudspeaker if current only loudspeaker is playing audio;If currently playing audio together by loudspeaker and earpiece, the output of earpiece is closed, is changed to only be played by loudspeaker;Then return step 702 continue cycling through detection.
706, the audio is played using earpiece, wherein can enhance the output power of earpiece, at this point, earpiece and loudspeaker play identical audio data parallel.Then return step 702 continue cycling through execution above-mentioned steps, until detecting that mobile terminal stops playing audio.
In embodiments of the present invention, in the case where mobile terminal playing audio, by the atmospheric pressure value or sound pressure level that obtain the intracavitary portion of sound of loudspeaker, judge whether the sound outlet of loudspeaker is blocked according to atmospheric pressure value or sound pressure level, and the broadcast mode of mobile terminal is determined according to judging result, improve the detection efficiency of the efficiency of mobile terminal playing audio, user experience and mobile terminal.
Fig. 8 is the flow chart of the method according to another embodiment of the present invention for playing audio.The method of Fig. 8 determines whether the sound outlet of loudspeaker is blocked by range sensor and ambient light sensor.In method shown in Fig. 8, with the same or similar content of Fig. 5 to Fig. 7 can with reference to Fig. 5 into Fig. 7 related detailed description, details are not described herein again.The specific steps of which are as follows:
801, determine that mobile terminal is playing audio;
802, the sound openings of object proximity loudspeaker are detected whether by the intracavitary range sensor of speaker, and when detecting object, determine object to loudspeaker sound openings target range;
803, determine whether target range is less than distance threshold;When being less than distance threshold, step 804 is executed;When if more than distance threshold, 805-b is thened follow the steps;
804, when target range is less than distance threshold, pass through the intracavitary luminous flux of the sound of ambient light sensor detection loudspeaker;
If 805-a, luminous flux are less than luminous flux threshold value, it is determined that the sound openings of current speaker are blocked;Execute step 706.
If 805-b, target range are greater than distance threshold or if luminous flux is greater than luminous flux threshold value, it is determined that the sound openings of current speaker are not blocked;It can further judge to continue only to be played by loudspeaker if current only loudspeaker is playing audio;If currently playing audio together by loudspeaker and earpiece, the output of earpiece is closed, is changed to only be played by loudspeaker;Then return step 802 continue cycling through detection.
806, the audio is played using earpiece, wherein can enhance the output power of earpiece, at this point, earpiece and loudspeaker play identical audio data parallel.Then return step 802 continue cycling through execution above-mentioned steps, until detecting that mobile terminal stops playing audio.
In embodiments of the present invention, in the case where mobile terminal playing audio, by the atmospheric pressure value or sound pressure level that obtain the intracavitary portion of sound of loudspeaker, judge whether the sound outlet of loudspeaker is blocked according to atmospheric pressure value or sound pressure level, and the broadcast mode of mobile terminal is determined according to judging result, improve the efficiency of mobile terminal playing audio, the detection efficiency of user experience and mobile terminal.
Fig. 9 is the flow chart of the method according to another embodiment of the present invention for playing audio.The method of Fig. 9 determines whether the sound outlet of loudspeaker is blocked by detecting the pressure of the sound cavity outer wall of loudspeaker.In method shown in Fig. 9, with the same or similar content of Fig. 5 to Fig. 8 can with reference to Fig. 5 into Fig. 8 related detailed description, details are not described herein again.The specific steps of which are as follows:
901, determine that mobile terminal is playing audio;
902, the pressure value of speaker cavity outer wall is detected by pressure sensor;
903, determine whether pressure value is greater than pressure threshold, which can determine according to the volume-level of currently playing audio;
If 904-a, pressure value are greater than pressure threshold, it is determined that the sound openings of current speaker are blocked;Execute step 905.
If 904-b, pressure value are less than pressure threshold, it is determined that the sound openings of current speaker are not blocked.It can further judge to continue only to be played by loudspeaker if current only loudspeaker is playing audio;If currently playing audio together by loudspeaker and earpiece, the output of earpiece is closed, is changed to only be played by loudspeaker;Then return step 902 continue cycling through detection.
905, the audio is played using earpiece, wherein can enhance the output power of earpiece, at this point, earpiece and loudspeaker play identical audio data parallel.Then return step 902 continue cycling through execution above-mentioned steps, until detecting that mobile terminal stops playing audio.
In embodiments of the present invention, in the case where mobile terminal playing audio, by the pressure value for obtaining the sound cavity outer wall of loudspeaker, judge whether the sound outlet of loudspeaker is blocked according to pressure value, and the broadcast mode of mobile terminal is determined according to judging result, improve the detection efficiency of the efficiency of mobile terminal playing audio, user experience and mobile terminal.
The method that the broadcasting audio of the embodiment of the present invention is described in detail above in association with Fig. 1 to Fig. 9, below in conjunction with Figure 10 to the mobile terminal of Figure 11 the present invention is described in detail embodiment.
Figure 10 is the schematic block diagram of the mobile terminal of the embodiment of the present invention.It should be understood that the terminal 1000 of Figure 10 is able to carry out each step of method of the Fig. 3 into Fig. 9, in order to avoid repeating, and will not be described here in detail, and terminal 1000 includes:
First determining module 1010, for determining that audio is currently played in the mobile terminal;
Second determining module 1020, for determining whether the sound outlet of loudspeaker of the mobile terminal is blocked;
Execution module 1030, for playing the audio using the earpiece of the mobile terminal in the case where determining that the sound outlet of the loudspeaker is blocked;
The execution module 1030 is also used in the case where determining that the sound outlet of the loudspeaker is not blocked, plays the audio using the loudspeaker.
Based on the same inventive concept, the principle solved the problems, such as due to the mobile terminal is similar to the method in embodiment of the present invention method, and the implementation of the terminal may refer to the implementation of method, and overlaps will not be repeated.
In the case where mobile terminal playing audio, whether the sound outlet of real-time detection loudspeaker is blocked, and in the case where detecting that the sound outlet of loudspeaker is blocked, the audio is played using earpiece, to compensate the broadcast sound volume of the audio, the efficiency of mobile terminal playing audio is improved, and improves user experience.
Figure 11 is the schematic block diagram of the mobile terminal of the embodiment of the present invention.It should be understood that the mobile terminal in Figure 11 is able to carry out each step of method of the Fig. 3 into Fig. 9, in order to avoid repeating, and will not be described here in detail, and mobile terminal 1100 includes:
Memory 1110, for storing program;
Processor 1120, for executing the program stored in the memory 1110, when described program is performed, the processor 1120 is for determining that audio is currently played in mobile terminal 1100;Determine whether the sound outlet of the loudspeaker of the mobile terminal 1100 is blocked;In the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal 1100;In the case where determining that the sound outlet of the loudspeaker is not blocked, the audio is played using the loudspeaker.
Based on the same inventive concept, the principle solved the problems, such as due to the mobile terminal is similar to the method in embodiment of the present invention method, and the implementation of the terminal may refer to the implementation of method, and overlaps will not be repeated.
In the case where mobile terminal playing audio, whether the sound outlet of real-time detection loudspeaker is blocked, and in the case where detecting that the sound outlet of loudspeaker is blocked, the audio is played using earpiece, to compensate the broadcast sound volume of the audio, the efficiency of mobile terminal playing audio is improved, and improves user experience.
Figure 12 is the schematic diagram of the System on Chip/SoC of the embodiment of the present invention.The System on Chip/SoC 1200 of Figure 12 include input interface 1210, output interface 1220, at least one processor 1230, memory 1240, the input interface 1210, output interface 1220, the processor 1230 and memory 1240 it Between be connected by bus, the processor 1230 is used to execute code in the memory 1240, and when the code is performed, the processor 1230 realizes method of the Fig. 3 into Fig. 9.
In addition, the terms " system " and " network " are often used interchangeably herein.The terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates may exist three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
It should be understood that in embodiments of the present invention, " B corresponding with A " indicates that B is associated with A, B can be determined according to A.It is also to be understood that determining that B is not meant to determine B only according to A according to A, B can also be determined according to A and/or other information.
Those of ordinary skill in the art may be aware that, unit and algorithm steps described in conjunction with the examples disclosed in the embodiments of the present disclosure, it can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the interchangeability of hardware and software, each exemplary composition and step are generally described according to function in the above description.These functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Professional technician can use different methods to achieve the described function each specific application, but such implementation should not be considered as beyond the scope of the present invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, system, the specific work process of device and unit of foregoing description can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods may be implemented in other ways.Such as, the apparatus embodiments described above are merely exemplary, such as, the division of the unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed mutual coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit, be also possible to electricity, the connection of mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member for this, and component shown as a unit may or may not be physical unit, it can and it is in one place, or may be distributed over multiple network units.It can select some or all of unit therein according to the actual needs to realize the purpose of the embodiment of the present invention.
In addition, the functional units in various embodiments of the present invention may be integrated into one processing unit, it is also possible to each unit and physically exists alone, is also possible to two or more units and is integrated in one unit.Above-mentioned integrated unit both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, can store in a non-volatile computer read/write memory medium.Based on this understanding, technical solution of the present invention substantially the part that contributes to existing technology in other words, or all or part of the technical solution can be embodied in the form of software products, the computer software product is stored in a non-volatile memory medium, it uses including some instructions so that a computer equipment (can be personal computer, server or the network equipment etc.) execute all or part of the steps of each embodiment this method of the present invention.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), the various media that can store program code such as magnetic or disk.
Technical characteristic and description in the above a certain embodiment, in order to keep application documents succinctly clear, it is possible to understand that be suitable for other embodiments, no longer repeated one by one in other embodiments.
It is described above; only a specific embodiment of the invention; but scope of protection of the present invention is not limited thereto; anyone skilled in the art is in the technical scope disclosed by the present invention; various equivalent modifications or substitutions can be readily occurred in, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (42)

  1. A method of playing audio characterized by comprising
    Determine that audio is currently played in mobile terminal;
    Determine whether the sound outlet of the loudspeaker of the mobile terminal is blocked;
    In the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal;
    In the case where determining that the sound outlet of the loudspeaker is not blocked, the audio is played using the loudspeaker.
  2. The method as described in claim 1, which is characterized in that the determining mobile terminal is currently played audio and the loudspeaker broadcasting audio is being currently used for the determining mobile terminal,
    Whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising:
    The expectation for obtaining the audio plays waveform;
    Obtain the actual play waveform of the audio;
    Waveform and the actual play waveform are played according to the expectation, determines whether the sound outlet of the loudspeaker is blocked.
  3. Method according to claim 2, which is characterized in that the expectation for obtaining the audio plays waveform, comprising:
    The audio, which is obtained, from the audio buffer of the mobile terminal plays waveform in the expectation of target time section;
    The actual play waveform for obtaining the audio, comprising:
    The audio is obtained in the actual play waveform of the target time section by the microphone in the mobile terminal.
  4. Method as claimed in claim 2 or claim 3, which is characterized in that it is described that waveform and the actual play waveform are played according to the expectation, determine whether the sound outlet of the loudspeaker is blocked, comprising:
    Determine that the expectation plays the amplitude of waveform;
    Determine the amplitude of the actual play waveform;
    The amplitude of waveform and the amplitude of the actual play waveform are played according to the expectation, determines whether the outlet of the loudspeaker is blocked.
  5. Method as claimed in claim 2 or claim 3, which is characterized in that it is described that waveform and the actual play waveform are played according to the expectation, determine whether the sound outlet of the loudspeaker is blocked, comprising:
    Determine that the expectation plays the low frequency region energy of waveform;
    Determine the low frequency region energy of the actual play waveform;
    The low frequency region energy of waveform and the low frequency region energy of the actual play waveform are played according to the expectation, determines whether the outlet of the loudspeaker is blocked.
  6. The method as described in claim 1, which is characterized in that the determining mobile terminal is currently played audio and the loudspeaker broadcasting audio is being currently used for the determining mobile terminal,
    Whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising:
    Pass through the atmospheric pressure value in the intracavitary portion of sound that baroceptor obtains the loudspeaker;
    In the case where the atmospheric pressure value is greater than air pressure threshold value, determine that the sound outlet of the loudspeaker is blocked;
    In the case where the atmospheric pressure value is less than or equal to the air pressure threshold value, determine that the sound outlet of the loudspeaker is not blocked.
  7. The method as described in claim 1, which is characterized in that the determining mobile terminal is currently played audio and the loudspeaker broadcasting audio is being currently used for the determining mobile terminal,
    Whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising:
    Pass through the sound pressure level in the intracavitary portion of sound that sound pressure sensor obtains the loudspeaker;
    In the case where the sound pressure level is greater than acoustic pressure threshold value, determine that the sound outlet of the loudspeaker is blocked;
    In the case where the sound pressure level is less than or equal to the acoustic pressure threshold value, determine that the sound outlet of the loudspeaker is not blocked.
  8. The method as described in claim 1, which is characterized in that whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising:
    The target range between object and the sound outlet of the loudspeaker is determined by range sensor;
    In the case where the target range is less than distance threshold, the luminous flux in the intracavitary portion of sound of the loudspeaker is determined by ambient light sensor;
    In the case where the luminous flux is less than luminous flux threshold value, determine that the sound outlet of the loudspeaker is blocked.
  9. The method as described in claim 1, which is characterized in that whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising:
    The pressure value of the sound cavity outer wall of the loudspeaker is determined by pressure sensor;
    In the case where the pressure value is greater than pressure threshold, determine that the sound outlet of the loudspeaker is blocked;
    In the case where the pressure value is less than or equal to the pressure threshold, determine that the sound outlet of the loudspeaker is not blocked.
  10. Method as claimed in any one of claims 1-9 wherein, which is characterized in that it is described in the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal, comprising:
    In the case where playing the audio using the earpiece, increase the output power of the earpiece.
  11. Method as described in any one of claims 1 to 10, which is characterized in that it is described in the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal, comprising:
    The audio is played jointly using the earpiece and the loudspeaker.
  12. Method as described in any one of claims 1 to 10, which is characterized in that it is described in the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal, comprising:
    In the case where the remaining capacity of the mobile terminal is greater than power threshold, the audio is played jointly using the earpiece and the loudspeaker;
    In the case where the remaining capacity of the mobile terminal is less than or equal to the power threshold, the earpiece is used only and plays the audio.
  13. Method as described in any one of claims 1 to 12, which is characterized in that the determining mobile terminal is currently played audio and the earpiece broadcasting audio is being currently used for the determining mobile terminal, the method also includes:
    In the case where determining that the sound outlet of the loudspeaker is not blocked, the earpiece is stopped using to play the audio.
  14. Method as described in any one of claims 1 to 13, which is characterized in that whether the sound outlet of the loudspeaker of the determination mobile terminal is blocked, comprising:
    Whether the sound outlet of the loudspeaker according to cycle detection is blocked.
  15. A kind of mobile terminal playing audio, which is characterized in that the mobile terminal includes:
    First determining module, for determining that audio is currently played in the mobile terminal;
    Second determining module, for determining whether the sound outlet of loudspeaker of the mobile terminal is blocked;
    Execution module, for playing the audio using the earpiece of the mobile terminal in the case where determining that the sound outlet of the loudspeaker is blocked;
    The execution module is also used in the case where determining that the sound outlet of the loudspeaker is not blocked, The audio is played using the loudspeaker.
  16. Mobile terminal as claimed in claim 15, which is characterized in that first determining module is specifically used for determining that the mobile terminal is being currently used the loudspeaker and plays the audio;The expectation that second determining module is specifically used for obtaining the audio plays waveform;And obtain the actual play waveform of the audio;And waveform and the actual play waveform are played according to the expectation, determine whether the sound outlet of the loudspeaker is blocked.
  17. Mobile terminal as claimed in claim 16, which is characterized in that second determining module is specifically used for obtaining the audio from the audio buffer of the mobile terminal in the expectation broadcasting waveform of target time section;And the audio is obtained in the actual play waveform of the target time section by the microphone in the mobile terminal.
  18. Mobile terminal as described in claim 16 or 17, which is characterized in that second determining module is specifically used for the amplitude for determining that the expectation plays waveform;And determine the amplitude of the actual play waveform;And the amplitude of waveform and the amplitude of the actual play waveform are played according to the expectation, determine whether the outlet of the loudspeaker is blocked.
  19. Mobile terminal as described in claim 16 or 17, which is characterized in that second determining module is specifically used for the low frequency region energy for determining that the expectation plays waveform;And determine the low frequency region energy of the actual play waveform;And the low frequency region energy of waveform and the low frequency region energy of the actual play waveform are played according to the expectation, determine whether the outlet of the loudspeaker is blocked.
  20. Mobile terminal as claimed in claim 15, which is characterized in that first determining module is specifically used for determining that the mobile terminal is being currently used the loudspeaker and plays the audio;Second determining module is specifically used for the atmospheric pressure value in the intracavitary portion of sound for obtaining the loudspeaker by baroceptor;In the case where the atmospheric pressure value is greater than air pressure threshold value, determine that the sound outlet of the loudspeaker is blocked;In the case where the atmospheric pressure value is less than or equal to the air pressure threshold value, determine that the sound outlet of the loudspeaker is not blocked.
  21. Mobile terminal as claimed in claim 15, which is characterized in that first determining module is specifically used for determining that the mobile terminal is being currently used the loudspeaker and plays the audio;Second determining module is specifically used for the sound pressure level in the intracavitary portion of sound for obtaining the loudspeaker by sound pressure sensor;In the case where the sound pressure level is greater than acoustic pressure threshold value, determine that the sound outlet of the loudspeaker is blocked;In the case where the sound pressure level is less than or equal to the acoustic pressure threshold value, determine that the sound outlet of the loudspeaker is not blocked.
  22. Mobile terminal as claimed in claim 15, which is characterized in that second determining module Specifically for determining the target range between object and the sound outlet of the loudspeaker by range sensor;In the case where the target range is less than distance threshold, the luminous flux in the intracavitary portion of sound of the loudspeaker is determined by ambient light sensor;In the case where the luminous flux is less than luminous flux threshold value, determine that the sound outlet of the loudspeaker is blocked.
  23. Mobile terminal as claimed in claim 15, which is characterized in that second determining module is specifically used for determining the pressure value of the sound cavity outer wall of the loudspeaker by pressure sensor;In the case where the pressure value is greater than pressure threshold, determine that the sound outlet of the loudspeaker is blocked;In the case where the pressure value is less than or equal to the pressure threshold, determine that the sound outlet of the loudspeaker is not blocked.
  24. Mobile terminal as described in any one of claim 15 to 23, it is characterized in that, in the case where second determining module determines that the sound outlet of the loudspeaker is blocked, the execution module is specifically used for increasing the output power of the earpiece in the case where playing the audio using the earpiece.
  25. Mobile terminal as described in any one of claim 15 to 24, it is characterized in that, in the case where second determining module determines that the sound outlet of the loudspeaker is blocked, the execution module is specifically used for playing the audio jointly using the earpiece and the loudspeaker.
  26. Mobile terminal as described in any one of claim 15 to 24, it is characterized in that, in the case where second determining module determines that the sound outlet of the loudspeaker is blocked, the execution module is specifically used for playing the audio jointly using the earpiece and the loudspeaker in the case where the remaining capacity of the mobile terminal is greater than power threshold;And in the case where the remaining capacity of the mobile terminal is less than or equal to the power threshold, the earpiece is used only and plays the audio.
  27. Mobile terminal as described in any one of claim 15 to 26, it is characterized in that, first determining module is specifically used for determining that the mobile terminal is being currently used the earpiece and plays the audio, in the case that the execution module is specifically for determining that the sound outlet of the loudspeaker is not blocked in second determining module, the earpiece is stopped using to play the audio.
  28. Mobile terminal as described in any one of claim 15 to 27, which is characterized in that whether the sound outlet that second determining module is specifically used for the loudspeaker according to cycle detection is blocked.
  29. A kind of mobile terminal characterized by comprising
    Memory, the memory is for storing program;
    Processor, for executing program, when described program is performed, the processor is used for the processor: determining that audio is currently played in the mobile terminal;Determine whether the sound outlet of the loudspeaker of the mobile terminal is blocked;In the case where determining that the sound outlet of the loudspeaker is blocked, the audio is played using the earpiece of the mobile terminal;It is not blocked in the sound outlet for determining the loudspeaker In the case where, the audio is played using the loudspeaker.
  30. Mobile terminal as claimed in claim 29, which is characterized in that the processor is specifically used for determining that the mobile terminal is being currently used the loudspeaker and plays the audio;The expectation for obtaining the audio plays waveform;Obtain the actual play waveform of the audio;Waveform and the actual play waveform are played according to the expectation, determines whether the sound outlet of the loudspeaker is blocked.
  31. Mobile terminal as claimed in claim 30, which is characterized in that the processor is specifically used for obtaining the audio from the audio buffer of the mobile terminal in the expectation broadcasting waveform of target time section;The audio is obtained in the actual play waveform of the target time section by the microphone in the mobile terminal.
  32. Mobile terminal as described in claim 30 or 31, which is characterized in that the processor is specifically used for the amplitude for determining that the expectation plays waveform;Determine the amplitude of the actual play waveform;The amplitude of waveform and the amplitude of the actual play waveform are played according to the expectation, determines whether the outlet of the loudspeaker is blocked.
  33. Mobile terminal as described in claim 30 or 31, which is characterized in that the processor is specifically used for the low frequency region energy for determining that the expectation plays waveform;Determine the low frequency region energy of the actual play waveform;The low frequency region energy of waveform and the low frequency region energy of the actual play waveform are played according to the expectation, determines whether the outlet of the loudspeaker is blocked.
  34. Mobile terminal as claimed in claim 29, which is characterized in that the processor is specifically used for determining that the mobile terminal is being currently used the loudspeaker and plays the audio;Pass through the atmospheric pressure value in the intracavitary portion of sound that baroceptor obtains the loudspeaker;In the case where the atmospheric pressure value is greater than air pressure threshold value, determine that the sound outlet of the loudspeaker is blocked;In the case where the atmospheric pressure value is less than or equal to the air pressure threshold value, determine that the sound outlet of the loudspeaker is not blocked.
  35. Mobile terminal as claimed in claim 29, which is characterized in that the processor is specifically used for determining that the mobile terminal is being currently used the loudspeaker and plays the audio;Pass through the sound pressure level in the intracavitary portion of sound that sound pressure sensor obtains the loudspeaker;In the case where the sound pressure level is greater than acoustic pressure threshold value, determine that the sound outlet of the loudspeaker is blocked;In the case where the sound pressure level is less than or equal to the acoustic pressure threshold value, determine that the sound outlet of the loudspeaker is not blocked.
  36. Mobile terminal as claimed in claim 29, which is characterized in that the processor is specifically used for determining the target range between object and the sound outlet of the loudspeaker by range sensor;In the case where the target range is less than distance threshold, the luminous flux in the intracavitary portion of sound of the loudspeaker is determined by ambient light sensor;In the case where the luminous flux is less than luminous flux threshold value, the loudspeaker is determined Sound outlet be blocked.
  37. Mobile terminal as claimed in claim 29, which is characterized in that the processor is specifically used for determining the pressure value of the sound cavity outer wall of the loudspeaker by pressure sensor;In the case where the pressure value is greater than pressure threshold, determine that the sound outlet of the loudspeaker is blocked;In the case where the pressure value is less than or equal to the pressure threshold, determine that the sound outlet of the loudspeaker is not blocked.
  38. Mobile terminal as described in any one of claim 29 to 37, which is characterized in that the processor is specifically used for increasing the output power of the earpiece in the case where playing the audio using the earpiece.
  39. Mobile terminal as described in any one of claim 29 to 38, which is characterized in that the processor is specifically used for playing the audio jointly using the earpiece and the loudspeaker.
  40. Mobile terminal as described in any one of claim 29 to 39, which is characterized in that the processor is specifically used for playing the audio jointly using the earpiece and the loudspeaker in the case where the remaining capacity of the mobile terminal is greater than power threshold;In the case where the remaining capacity of the mobile terminal is less than or equal to the power threshold, the earpiece is used only and plays the audio.
  41. Mobile terminal as described in any one of claim 29 to 40, which is characterized in that the processor is specifically used for determining that the mobile terminal is being currently used the earpiece and plays the audio;In the case where determining that the sound outlet of the loudspeaker is not blocked, the earpiece is stopped using to play the audio.
  42. Mobile terminal as described in any one of claim 29 to 41, which is characterized in that whether the sound outlet that the processor is specifically used for the loudspeaker according to cycle detection is blocked.
CN201680080680.XA 2016-04-29 2016-04-29 Method for playing audio and mobile terminal Active CN108605067B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/080759 WO2017185351A1 (en) 2016-04-29 2016-04-29 Method for playing audio and mobile terminal

Publications (2)

Publication Number Publication Date
CN108605067A true CN108605067A (en) 2018-09-28
CN108605067B CN108605067B (en) 2021-06-08

Family

ID=60160648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201680080680.XA Active CN108605067B (en) 2016-04-29 2016-04-29 Method for playing audio and mobile terminal

Country Status (2)

Country Link
CN (1) CN108605067B (en)
WO (1) WO2017185351A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788891A (en) * 2020-12-30 2021-05-11 维沃移动通信有限公司 Electronic device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580141B (en) * 2019-08-07 2022-09-30 上海摩软通讯技术有限公司 Mobile terminal

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040253995A1 (en) * 2003-06-13 2004-12-16 Fujitsu Limited Mobile terminal
JP2005094313A (en) * 2003-09-17 2005-04-07 Klab Inc Portable terminal
CN101222713A (en) * 2008-02-04 2008-07-16 深圳华为通信技术有限公司 Electricity output control method, device and terminal
US20090298430A1 (en) * 2003-04-15 2009-12-03 Kwok Wai Cheung Directional communication systems
CN101808259A (en) * 2009-02-13 2010-08-18 倚天资讯股份有限公司 Loudspeaker output control method
EP2429155A1 (en) * 2010-09-13 2012-03-14 HTC Corporation Mobile electronic device and sound playback method thereof
CN103501375A (en) * 2013-09-16 2014-01-08 华为终端有限公司 Method and device for controlling sound effect
CN203813943U (en) * 2014-04-24 2014-09-03 广州三星通信技术研究有限公司 Portable terminal
CN104104346A (en) * 2014-07-14 2014-10-15 深圳市中兴移动通信有限公司 Method and device for improving audio playing effect of mobile terminal
CN104135574A (en) * 2014-08-21 2014-11-05 广东欧珀移动通信有限公司 Silent mode switching method and device for mobile terminal
CN105100330A (en) * 2015-08-26 2015-11-25 广东欧珀移动通信有限公司 Method and mobile terminal for optimizing equipment sound effect
CN105224280A (en) * 2015-09-25 2016-01-06 联想(北京)有限公司 Control method, device and electronic equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090298430A1 (en) * 2003-04-15 2009-12-03 Kwok Wai Cheung Directional communication systems
US20040253995A1 (en) * 2003-06-13 2004-12-16 Fujitsu Limited Mobile terminal
JP2005094313A (en) * 2003-09-17 2005-04-07 Klab Inc Portable terminal
CN101222713A (en) * 2008-02-04 2008-07-16 深圳华为通信技术有限公司 Electricity output control method, device and terminal
CN101808259A (en) * 2009-02-13 2010-08-18 倚天资讯股份有限公司 Loudspeaker output control method
EP2429155A1 (en) * 2010-09-13 2012-03-14 HTC Corporation Mobile electronic device and sound playback method thereof
CN103501375A (en) * 2013-09-16 2014-01-08 华为终端有限公司 Method and device for controlling sound effect
CN203813943U (en) * 2014-04-24 2014-09-03 广州三星通信技术研究有限公司 Portable terminal
CN104104346A (en) * 2014-07-14 2014-10-15 深圳市中兴移动通信有限公司 Method and device for improving audio playing effect of mobile terminal
CN104135574A (en) * 2014-08-21 2014-11-05 广东欧珀移动通信有限公司 Silent mode switching method and device for mobile terminal
CN105100330A (en) * 2015-08-26 2015-11-25 广东欧珀移动通信有限公司 Method and mobile terminal for optimizing equipment sound effect
CN105224280A (en) * 2015-09-25 2016-01-06 联想(北京)有限公司 Control method, device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788891A (en) * 2020-12-30 2021-05-11 维沃移动通信有限公司 Electronic device
CN112788891B (en) * 2020-12-30 2022-07-15 维沃移动通信有限公司 Electronic device

Also Published As

Publication number Publication date
CN108605067B (en) 2021-06-08
WO2017185351A1 (en) 2017-11-02

Similar Documents

Publication Publication Date Title
US10003885B2 (en) Use of an earpiece acoustic opening as a microphone port for beamforming applications
CN108632431B (en) Audio capture with multiple microphones
CN110970057B (en) Sound processing method, device and equipment
CN109559763B (en) Real-time digital audio signal sound mixing method and device
US20170126192A1 (en) Method, device, and computer-readable medium for adjusting volume
US9668048B2 (en) Contextual switching of microphones
WO2015154424A1 (en) Method and system for determining main microphone and auxiliary microphone among multiple microphones
US9818423B2 (en) Method of improving sound quality and headset thereof
EP3660660A1 (en) Processing method for sound effect of recording and mobile terminal
US20180373489A1 (en) Audio stream processing method, mobile terminal and storage medium
WO2016086633A1 (en) Method and apparatus for adaptively adjusting speech recognition rate, and storage medium
US10628119B2 (en) Sound effect processing method and mobile terminal
WO2017215629A1 (en) Sound effect configuration method and related device
CN111883156A (en) Audio processing method and device, electronic equipment and storage medium
CN108377290A (en) A kind of audio stream processing method and mobile terminal and medium product
CN108605067A (en) Play the method and mobile terminal of audio
WO2015131634A1 (en) Audio noise reduction method and terminal
US9118292B2 (en) Bell sound outputting apparatus and method thereof
CN105450880A (en) Speech signal processing method and speech signal processing device
CN104469250A (en) Information processing method and electronic devices
CN113905302A (en) Method and device for triggering prompt message and earphone
CN113660599A (en) Loudspeaker control method and device, mobile terminal and storage medium
CN112911466B (en) Method and device for selecting sound receiving unit, terminal and electronic equipment
JP2017022699A (en) Voice signal extraction input device for smart device
CN114745635A (en) Information processing 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
GR01 Patent grant
GR01 Patent grant