WO2021129835A1 - 音量控制方法、设备及计算机可读存储介质 - Google Patents

音量控制方法、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2021129835A1
WO2021129835A1 PCT/CN2020/139608 CN2020139608W WO2021129835A1 WO 2021129835 A1 WO2021129835 A1 WO 2021129835A1 CN 2020139608 W CN2020139608 W CN 2020139608W WO 2021129835 A1 WO2021129835 A1 WO 2021129835A1
Authority
WO
WIPO (PCT)
Prior art keywords
speaker
volume
mode
electronic device
output
Prior art date
Application number
PCT/CN2020/139608
Other languages
English (en)
French (fr)
Inventor
于海琛
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2021129835A1 publication Critical patent/WO2021129835A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • 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
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups

Definitions

  • the present invention relates to the field of communication technology, and in particular to a volume control method, equipment and computer-readable storage medium.
  • dual speakers can perform dual-channel output to achieve a stereo effect.
  • dual-speaker mobile phones are divided into two forms, the first is that the dual speakers are located at the bottom of the phone, and the second is that there is a speaker at the bottom of the phone and the top of the phone.
  • most dual-speaker mobile phones adopt the second form.
  • the speaker installed on the top of the mobile phone when using the mobile phone to make and receive calls, it is used as a receiver, and when playing video or music, it is used as a speaker.
  • Embodiments of the present invention provide a volume control method, device, and computer-readable storage medium, so as to solve problems caused by excessively long working hours or excessive output volume in the earpiece mode when the speaker is switched from the earpiece mode to the speaker mode.
  • an embodiment of the present invention provides a volume control method, which is applied to an electronic device, the electronic device includes a first speaker, wherein the working mode of the first speaker includes a speaker mode and an earpiece mode, and the method includes:
  • the first volume is associated with the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • an embodiment of the present invention further provides an electronic device, the electronic device includes a first speaker, wherein the working mode of the first speaker includes a speaker mode and an earpiece mode, and the electronic device includes:
  • the first receiving module is configured to receive the first input when the first speaker is in the earpiece mode
  • a first processing module configured to switch the first speaker to a speaker mode in response to the first input, and set the output volume of the first speaker to a first volume
  • the first volume is associated with the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • an embodiment of the present invention also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor executes the computer program as described above. The steps in the method of the first aspect described.
  • an embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the method of the first aspect described above is implemented A step of.
  • the first speaker when the first speaker is in the earpiece mode, the first input is received, and in response to the first input, the first speaker is switched to the speaker mode, and the first speaker The output volume of is set to a first volume, where the first volume is associated with the working duration or output volume of the first speaker in the earpiece mode. Therefore, by using the solution of the embodiment of the present invention, when the first speaker is switched from the earpiece mode to the speaker mode, the first volume of the speaker can be set according to the working time or output volume of the first speaker when the first speaker is in the earpiece mode, thereby protecting hearing , Improve user experience.
  • FIG. 1 is one of the flowcharts of a volume control method provided by an embodiment of the present invention
  • FIG. 3 is the third flow chart of the volume control method provided by the embodiment of the present invention.
  • Figure 4 is one of the structural diagrams of the electronic device provided by the embodiment of the present invention.
  • Fig. 5 is a second structural diagram of an electronic device provided by an embodiment of the present invention.
  • FIG. 1 is a flowchart of a volume control method provided by an embodiment of the present invention, which is applied to an electronic device.
  • the electronic device includes a first speaker, wherein the working mode of the first speaker includes a speaker mode and an earpiece mode. As shown in Figure 1, it includes the following steps:
  • Step 101 When the first speaker is in the earpiece mode, receive a first input.
  • the first speaker being in the earpiece mode includes a working mode of the speaker when the electronic device is used to answer a call.
  • the first input may be a click, touch, or other operation.
  • the first speaker when the first speaker is being used to output the sound signal of the media file, if there is an incoming call, the first speaker may pause outputting the sound signal. After that, in response to the user's incoming call input, the user uses the electronic device to make a call, and the electronic device is in a call state. At this time, the speaker is in handset mode. When the call is completed and the user needs to hang up, the first input is sent to the electronic device, and correspondingly, the electronic device can receive the first input of the user.
  • the media file may be music, video, etc.
  • the speaker is in the earpiece mode.
  • the first input can be sent to the electronic device, and correspondingly, the electronic device can receive the first input of the user.
  • Step 102 In response to the first input, switch the first speaker to a speaker mode, and set the output volume of the first speaker to a first volume.
  • the first volume is associated with the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • the first volume is negatively related to the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • the value of the first volume may be any value as long as it satisfies the above conditions. For example, the longer the working time or the higher the output volume when the first speaker is in the earpiece mode, the lower the first volume. In this way, the output volume when the speaker is in the earpiece mode can be distinguished from the first volume, and the effect of the output volume when the speaker is in the earpiece mode on the user's ears is fully considered, so as to better protect the hearing.
  • the first speaker when the first speaker is in the earpiece mode, the first input is received, and in response to the first input, the first speaker is switched to the speaker mode, and the first speaker The output volume of is set to a first volume, where the first volume is associated with the working duration or output volume of the first speaker in the earpiece mode. Therefore, by using the solution of the embodiment of the present invention, when the first speaker is switched from the earpiece mode to the speaker mode, the first volume of the speaker can be set according to the working time or output volume of the first speaker when the first speaker is in the earpiece mode, thereby protecting hearing , Improve user experience.
  • the above-mentioned volume control method can be applied to electronic devices, such as: mobile phones, tablet computers (Tablet Personal Computer), laptop computers (Laptop Computer), personal digital assistants (personal digital assistant, PDA), mobile Internet Device (Mobile Internet Device, MID) or Wearable Device (Wearable Device), etc.
  • electronic devices such as: mobile phones, tablet computers (Tablet Personal Computer), laptop computers (Laptop Computer), personal digital assistants (personal digital assistant, PDA), mobile Internet Device (Mobile Internet Device, MID) or Wearable Device (Wearable Device), etc.
  • FIG. 2 is a flowchart of a volume control method provided by an embodiment of the present invention, which is applied to an electronic device.
  • the electronic device includes a first speaker, wherein the working mode of the first speaker includes a speaker mode and an earpiece mode. As shown in Figure 2, it includes the following steps:
  • Step 201 When the first speaker is in the speaker mode and the output volume of the first speaker is the second volume, receive a second input.
  • the first speaker when the first speaker is being used to output a sound signal of a media file, the first speaker is in a speaker mode.
  • the output volume of the first speaker can be detected by the volume detection module of the electronic device, and the second volume can be set according to actual needs.
  • the second input can be a click, touch, or other operation.
  • Step 202 In response to the second input, switch the first speaker to the earpiece mode.
  • the speaker is switched to the earpiece mode through the user's second input, so that the working mode of the speaker can meet the requirements of the user, and the situation that the working mode of the speaker is wrong due to misoperation can be avoided.
  • Step 203 When the first speaker is in the earpiece mode, receive a first input.
  • Step 204 In response to the first input, switch the first speaker to a speaker mode, and set the output volume of the first speaker to a first volume.
  • the first volume is associated with the working time or output volume of the first speaker when the first speaker is in the earpiece mode. Specifically, the first volume is negatively related to the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • step 203 and step 204 can refer to the description of step 101 and step 102 described above.
  • the first volume when the output volume of the first speaker in the earpiece mode is greater than the preset volume or the working duration is greater than the preset duration, the first volume is less than the second volume.
  • the preset duration or preset volume can be set as required. That is to say, in the embodiment of the present invention, in addition to being associated with the working duration or output volume of the first speaker in the earpiece mode, the value of the first volume needs to be less than the second volume, so as to further avoid the speaker due to the working mode. The instantaneous loudness caused by the switching of, protects hearing.
  • the first speaker when the first speaker is in the earpiece mode, the first input is received, and in response to the first input, the first speaker is switched to the speaker mode, and the first speaker The output volume of is set to a first volume, where the first volume is associated with the working duration or output volume of the first speaker in the earpiece mode. Therefore, by using the solution of the embodiment of the present invention, when the first speaker is switched from the earpiece mode to the speaker mode, the first volume of the speaker can be set according to the working time or output volume of the first speaker when the first speaker is in the earpiece mode, thereby protecting hearing , Improve user experience.
  • FIG. 3 is a flowchart of a volume control method provided by an embodiment of the present invention, which is applied to an electronic device.
  • the electronic device includes a first speaker and a second speaker, wherein the working mode of the first speaker includes a speaker mode and an earpiece mode. As shown in Figure 3, it includes the following steps:
  • Step 301 Receive a first input when the first speaker is in the earpiece mode.
  • Step 302 In response to the first input, switch the first speaker to a speaker mode.
  • the first volume is associated with the working time or output volume of the first speaker when the first speaker is in the earpiece mode. Specifically, the first volume is negatively related to the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • Step 303 Output a first channel signal through the first speaker, and output a second channel signal through the second speaker.
  • the first channel signal may be, for example, a left channel signal
  • the second channel signal may be, for example, a right channel signal.
  • Step 304 Set the output volume of the first speaker to the first volume.
  • step 301 For the related description of step 301, step 302, and 304, refer to the description of step 101 and step 102.
  • Step 305 When the distance between the first speaker and the target part of the user is less than the distance between the second speaker and the target part, turn off the first speaker.
  • the target part may be, for example, the user's ear, and the target distance may be set as required.
  • the infrared sensor or the screen sensor in the electronic device can be used to obtain the distance between each speaker and the target part. It is more convenient and faster to obtain the distance between the ear and the electronic device through an infrared sensor or a screen sensor. For example, when the distance between the first speaker and the ear of the user is smaller than the distance between the second speaker and the ear, the first speaker may be turned off.
  • Step 306 Output the first channel signal and the second channel signal through the second speaker.
  • the first speaker when the first speaker is in the earpiece mode, the first input is received, and in response to the first input, the first speaker is switched to the speaker mode, and the first speaker The output volume of is set to a first volume, where the first volume is associated with the working duration or output volume of the first speaker in the earpiece mode. Therefore, by using the solution of the embodiment of the present invention, when the first speaker is switched from the earpiece mode to the speaker mode, the first volume of the speaker can be set according to the working time or output volume of the first speaker when the first speaker is in the earpiece mode, thereby protecting hearing , Improve user experience. At the same time, switching the output of the first speaker and the second speaker can improve the sound broadcast effect.
  • the method may further include:
  • the first speaker is turned on, and the first channel signal is output through the first speaker, and the signal of the first channel is output through the second speaker. Output the second channel signal.
  • the preset distance can be set as required.
  • the method may further include: receiving a second input when the first speaker is in the speaker mode and the output volume of the first speaker is the second volume; The second input switches the first speaker to the earpiece mode; wherein, when the output volume of the first speaker in the earpiece mode is greater than the preset volume or the working duration is greater than the preset duration, the The first volume is less than the second volume.
  • the second input may be, for example, a click, a touch input, or the like.
  • the preset volume or the preset time can be set according to actual needs. In this way, the problem that the working mode of the speaker does not meet the needs of the user due to misoperation can be prevented.
  • FIG. 4 is a structural diagram of an electronic device provided by an embodiment of the present invention.
  • the electronic device includes a first speaker, and the working mode of the first speaker includes a speaker mode and an earpiece mode.
  • the electronic device 400 includes:
  • the first receiving module 401 is configured to receive a first input when the first speaker is in the earpiece mode; the first adjusting module 402 is configured to switch the first speaker to Speaker mode, and set the output volume of the first speaker to the first volume;
  • the first volume is associated with the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • the first volume is negatively related to the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • the electronic device further includes:
  • the second receiving module is configured to receive a second input when the first speaker is in the speaker mode and the output volume of the first speaker is the second volume;
  • a second processing module configured to switch the first speaker to earpiece mode in response to the second input
  • the first volume is less than the second volume.
  • the electronic device further includes a second speaker; the electronic device further includes:
  • a third processing module configured to output a first channel signal through the first speaker, and a second channel signal through the second speaker;
  • a fourth processing module configured to turn off the first speaker when the distance between the first speaker and the target part of the user is less than the distance between the second speaker and the target part;
  • the fifth processing module is configured to output a first channel signal and a second channel signal through the second speaker.
  • the electronic device further includes:
  • a sixth processing module configured to turn on the first speaker when the distance between the target part and the first speaker is greater than a preset distance
  • the seventh processing module is configured to output a first channel signal through the first speaker, and a second channel signal through the second speaker.
  • the electronic device 400 can implement various processes implemented by the electronic device in the foregoing method embodiments, and to avoid repetition, details are not described herein again.
  • the electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, and a display unit 506 , User input unit 507, interface unit 508, memory 509, processor 510, power supply 511 and other components.
  • a radio frequency unit 501 for a radio frequency unit
  • a network module 502 for a radio frequency unit
  • an audio output unit 503 an input unit 504
  • a sensor 505 and a display unit 506
  • User input unit 507 is not constitute a limitation on the electronic device.
  • the electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. Layout.
  • electronic devices include, but are not limited to, mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted mobile terminals, wearable devices, and pedometers.
  • the electronic device includes a first speaker, wherein the working mode of the first speaker includes a speaker mode and an earpiece mode.
  • the radio frequency unit 501 is configured to receive the first input when the first speaker is in the earpiece mode;
  • the processor 510 is configured to switch the first speaker to a speaker mode in response to the first input, and set the output volume of the first speaker to the first volume;
  • the first volume is associated with the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • the first speaker when the first speaker is in the earpiece mode, the first input is received, and in response to the first input, the first speaker is switched to the speaker mode, and the first speaker The output volume of is set to a first volume, where the first volume is associated with the working duration or output volume of the first speaker in the earpiece mode. Therefore, by using the solution of the embodiment of the present invention, when the first speaker is switched from the earpiece mode to the speaker mode, the first volume of the speaker can be set according to the working time or output volume of the first speaker when the first speaker is in the earpiece mode, thereby protecting hearing , Improve user experience.
  • the first volume is negatively related to the working time or output volume of the first speaker when the first speaker is in the earpiece mode.
  • the processor 510 is further configured to receive a second input when the first speaker is in a speaker mode and the output volume of the first speaker is a second volume; in response to the first speaker The second input is to switch the first speaker to the earpiece mode; wherein, when the output volume of the first speaker in the earpiece mode is greater than the preset volume or the working duration is greater than the preset duration, the first speaker The volume is less than the second volume.
  • the processor 510 is further configured to: after the first speaker is switched to the speaker mode, the method further includes: outputting a first channel signal through the first speaker, and outputting a second channel signal through the second speaker. Channel signal; when the distance between the first speaker and the user's target part is less than the distance between the second speaker and the target part, turn off the first speaker; output the first speaker through the second speaker Channel signal and second channel signal.
  • the processor 510 is further configured to, when the distance between the target part and the first speaker is greater than a preset distance, turn on the first speaker; and output through the first speaker The first channel signal outputs the second channel signal through the second speaker.
  • the radio frequency unit 501 can be used for receiving and sending signals in the process of sending and receiving information or talking. Specifically, after receiving the downlink data from the base station, it is processed by the processor 510; Uplink data is sent to the base station.
  • the radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.
  • the electronic device provides users with wireless broadband Internet access through the network module 502, such as helping users to send and receive emails, browse web pages, and access streaming media.
  • the audio output unit 503 can convert the audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as sound. Moreover, the audio output unit 503 may also provide audio output related to a specific function performed by the electronic device 500 (for example, call signal reception sound, message reception sound, etc.).
  • the audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
  • the input unit 504 is used to receive audio or video signals.
  • the input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042.
  • the graphics processor 5041 is configured to monitor images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. Data is processed.
  • the processed image frame may be displayed on the display unit 506.
  • the image frame processed by the graphics processor 5041 may be stored in the memory 509 (or other storage medium) or sent via the radio frequency unit 501 or the network module 502.
  • the microphone 5042 can receive sound, and can process such sound into audio data.
  • the processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 501 for output in the case of a telephone call mode.
  • the electronic device 500 further includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor includes an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light.
  • the proximity sensor can close the display panel 5061 and the display panel 5061 when the electronic device 500 is moved to the ear. / Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games) , Magnetometer posture calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 505 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
  • the display unit 506 is used to display information input by the user or information provided to the user.
  • the display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • the user input unit 507 may be used to receive inputted number or character information, and generate key signal input related to user settings and function control of the electronic device.
  • the user input unit 507 includes a touch panel 5071 and other input devices 5072.
  • the touch panel 5071 also called a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 5071 or near the touch panel 5071. operating).
  • the touch panel 5071 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 510, the command sent by the processor 510 is received and executed.
  • the touch panel 5071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the user input unit 507 may also include other input devices 5072.
  • other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
  • the touch panel 5071 can be overlaid on the display panel 5061.
  • the touch panel 5071 detects a touch operation on or near it, it is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 determines the type of the touch event according to the touch.
  • the type of event provides corresponding visual output on the display panel 5061.
  • the touch panel 5071 and the display panel 5061 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated
  • the implementation of the input and output functions of the electronic device is not specifically limited here.
  • the interface unit 508 is an interface for connecting an external device and the electronic device 500.
  • the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (Input/Output, I/O) port, video I/O port, headphone port, etc.
  • the interface unit 508 can be used to receive input (for example, data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic device 500 or can be used to connect the electronic device 500 to an external device. Transfer data between devices.
  • the memory 509 can be used to store software programs and various data.
  • the memory 509 may mainly include a storage program area and a storage data area.
  • the storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
  • the memory 509 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the processor 510 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, runs or executes software programs and/or modules stored in the memory 509, and calls data stored in the memory 509 , Perform various functions of electronic equipment and process data, so as to monitor the electronic equipment as a whole.
  • the processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem The processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 510.
  • the electronic device 500 may also include a power source 511 (such as a battery) for supplying power to various components.
  • a power source 511 such as a battery
  • the power source 511 may be logically connected to the processor 510 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. And other functions.
  • the electronic device 500 includes some functional modules not shown, which will not be repeated here.
  • the embodiment of the present invention also provides an electronic device, including a processor 510, a memory 509, and a computer program stored on the memory 509 and running on the processor 510.
  • an electronic device including a processor 510, a memory 509, and a computer program stored on the memory 509 and running on the processor 510.
  • the computer program is executed by the processor 510,
  • Each process in the foregoing volume control method embodiment is implemented, and the same technical effect can be achieved. In order to avoid repetition, details are not repeated here.
  • the embodiment of the present invention also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, each process of the above-mentioned volume control method embodiment is realized, and the same technology can be achieved. The effect, in order to avoid repetition, will not be repeated here.
  • the computer-readable storage medium such as read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk, or optical disk, etc.
  • the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes a number of instructions to enable an electronic device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Telephone Function (AREA)

Abstract

本发明公开了一种音量控制方法、设备及计算机可读存储介质,涉及通信技术领域。该方法包括:在所述第一扬声器处于听筒模式的情况下,接收第一输入;响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量;其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。

Description

音量控制方法、设备及计算机可读存储介质
相关申请的交叉引用
本申请主张在2019年12月27日在中国提交的中国专利申请号No.201911373390.6的优先权,其全部内容通过引用包含于此。
技术领域
本发明涉及通信技术领域,尤其涉及一种音量控制方法、设备及计算机可读存储介质。
背景技术
随着技术的迅速发展,具有双扬声器的电子设备产品越来越多。以手机为例,双扬声器可以进行双声道输出,从而实现立体声效果。
一般情况下双扬声器的手机分为两种形式,第一种是双扬声器均位于手机底部,第二种则是手机底部和手机上方各有一个扬声器。目前来说,大部分双扬声器手机都是采用第二种的形式。对于设置于手机上方的扬声器来说,在利用手机接打电话的时候,它用作听筒,而在播放视频或音乐时,它用作扬声器。
在使用这种上下分离式的双扬声器手机时,可能会有如下场景:用户在利用手机外放观看视频或者听音乐的过程中,如果用户需要接听电话,手机上方的扬声器将被触发当作听筒。通话结束后,手机上方的扬声器被瞬间切换作为扬声器。外放的声音会经常“炸掉”用户的耳朵。这会对用户的听力造成一定程度的破坏,从而影响用户的使用体验。
发明内容
本发明实施例提供一种音量控制方法、设备及计算机可读存储介质,以解决扬声器在从听筒模式切换到扬声器模式时,由于在听筒模式下的工作时长过长或者输出音量过大而造成对用户听力的影响所带来的用户体验差的问题。
第一方面,本发明实施例提供了一种音量控制方法,应用于电子设备,所述电子设备包括第一扬声器,其中,第一扬声器的工作模式包括扬声器模式和听筒模式,所述方法包括:
在所述第一扬声器处于听筒模式的情况下,接收第一输入;
响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量;
其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。
第二方面,本发明实施例还提供一种电子设备,所述电子设备包括第一扬声器,其中,第一扬声器的工作模式包括扬声器模式和听筒模式,所述电子设备包括:
第一接收模块,用于在所述第一扬声器处于听筒模式的情况下,接收第一输入;
第一处理模块,用于响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量;
其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。
第三方面,本发明实施例还提供一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述的第一方面的方法中的步骤。
第四方面,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如上所述的第一方面的方法中的步骤。
在本发明实施例中,当第一扬声器处于听筒模式的情况下,接收第一输入,并响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量,其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。因此,利用本发明实施例的方案,当第一扬声器在从听筒模式切换为扬声器模式时,可根据第一扬声器处于听筒模式时的工作时长或输出音量设置扬声器的第一音量,从而 可保护听力,提高用户体验。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的音量控制方法的流程图之一;
图2是本发明实施例提供的音量控制方法的流程图之二;
图3是本发明实施例提供的音量控制方法的流程图之三;
图4是本发明实施例提供的电子设备的结构图之一;
图5是本发明实施例提供的电子设备的结构图之二。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参见图1,图1是本发明实施例提供的音量控制方法的流程图,应用于电子设备。所述电子设备包括第一扬声器,其中,第一扬声器的工作模式包括扬声器模式和听筒模式。如图1所示,包括以下步骤:
步骤101、在所述第一扬声器处于听筒模式的情况下,接收第一输入。
其中,所述第一扬声器处于听筒模式包括利用电子设备接听通话时扬声器的工作模式。该第一输入可以是点击、触摸等操作。
在实际应用中,例如,当正在利用第一扬声器输出媒体文件的声音信号时,若有来电,则第一扬声器可以暂停输出声音信号。之后,响应于用户的接通来电输入,用户利用电子设备进行通话,电子设备处于通话状态。此时,扬声器处于听筒模式。当通话完毕,用户需要挂断时,向电子设备发送第一输入,相应的,电子设备可接收用户的第一输入。其中,所述媒体文件可以 是音乐、视频等。
又例如,当用户利用社交软件进行语音通话时,扬声器处于听筒模式。当通话完毕,用户需要挂断语音通话时,可向电子设备发送第一输入,相应的,电子设备可接收用户的第一输入。
步骤102、响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量。
其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。具体的,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量负相关。第一音量的值可以是个任意的值,只要其满足上述条件即可。例如,第一扬声器处于听筒模式时的工作时长越长或输出音量越高,则所述第一音量越小。通过这种方式,可将扬声器处于听筒模式时的输出音量和第一音量相区别,且充分考虑了扬声器处于听筒模式时的输出音量对用户耳部的影响,从而更好的保护听力。
在本发明实施例中,当第一扬声器处于听筒模式的情况下,接收第一输入,并响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量,其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。因此,利用本发明实施例的方案,当第一扬声器在从听筒模式切换为扬声器模式时,可根据第一扬声器处于听筒模式时的工作时长或输出音量设置扬声器的第一音量,从而可保护听力,提高用户体验。
本发明实施例中,上述音量控制法可以应用于电子设备,例如:手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digital assistant,PDA)、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。
参见图2,图2是本发明实施例提供的音量控制方法的流程图,应用于电子设备。所述电子设备包括第一扬声器,其中,第一扬声器的工作模式包括扬声器模式和听筒模式。如图2所示,包括以下步骤:
步骤201、在第一扬声器处于扬声器模式,且所述第一扬声器的输出音量为第二音量的情况下,接收第二输入。
在实际应用中,例如,当正在利用第一扬声器输出媒体文件的声音信号时,第一扬声器处于扬声器模式。其中,第一扬声器的输出音量可以通过电子设备的音量检测模块检测出,且可根据实际需要设置第二音量的大小。该第二输入可以是点击、触摸等操作。
步骤202、响应于所述第二输入,将所述第一扬声器切换为听筒模式。
在本发明实施例中,通过用户的第二输入将扬声器切换为听筒模式,可使得扬声器的工作模式符合用户的要求,避免由于误操作而产生的扬声器工作模式错误的情况。
步骤203、在所述第一扬声器处于听筒模式的情况下,接收第一输入。
步骤204、响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量。
其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。具体的,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量负相关。
其中,步骤203和步骤204的描述可参照前述步骤101和步骤102的描述。
在本发明实施例中,在所述第一扬声器处于听筒模式时的输出音量大于预设音量或所述工作时长大于预设时长的情况下,所述第一音量小于所述第二音量。所述预设时长或者预设音量可根据需要设置。也就是说,在本发明实施例中,第一音量的值除了和第一扬声器处于听筒模式时的工作时长或输出音量相关联之外,还需小于第二音量,从而进一步避免扬声器由于工作模式的切换所造成的瞬间音量过大的现象,保护听力。
在本发明实施例中,当第一扬声器处于听筒模式的情况下,接收第一输入,并响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量,其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。因此,利用本发明实施例的方案,当第一扬声器在从听筒模式切换为扬声器模式时,可根据第一扬声器处于听筒模式时的工作时长或输出音量设置扬声器的第一音量,从而可保护听力,提高用户体验。
参见图3,图3是本发明实施例提供的音量控制方法的流程图,应用于电子设备。所述电子设备包括第一扬声器和第二扬声器,其中,第一扬声器的工作模式包括扬声器模式和听筒模式。如图3所示,包括以下步骤:
步骤301、在第一扬声器处于听筒模式的情况下,接收第一输入。
步骤302、响应于所述第一输入,将所述第一扬声器切换为扬声器模式。
其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。具体的,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量负相关。
步骤303、通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号。
其中,第一声道信号例如可以是左声道信号,第二声道信号例如可以是右声道信号。通过这种方式,可提高电子设备的声音播出效果。
步骤304、将所述第一扬声器的输出音量设置为第一音量。
其中,步骤301、步骤302、304的相关的描述可参照前述步骤101和步骤102的描述。
步骤305、在所述第一扬声器与用户的目标部位的距离小于所述第二扬声器与所述目标部位的距离的情况下,关闭所述第一扬声器。
其中,所述目标部位例如可以是用户的耳部,所述目标距离可根据需要设置。在实际应用中,可利用所述电子设备中的红外传感器或者屏幕传感器,获取各扬声器和目标部位之间的距离。通过红外传感器或者屏幕传感器,获取所述耳部和所述电子设备之间的距离,更加方便、快捷。例如,当第一扬声器和用户的耳部之间的距离小于第二扬声器和耳部之间的距离时,可关闭第一扬声器。
步骤306、通过所述第二扬声器输出第一声道信号和第二声道信号。
在本发明实施例中,当第一扬声器处于听筒模式的情况下,接收第一输入,并响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量,其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。因此,利用本发明实施例的方案,当第一扬声器在从听筒模式切换为扬声器模式时,可根据第一 扬声器处于听筒模式时的工作时长或输出音量设置扬声器的第一音量,从而可保护听力,提高用户体验。同时,切换第一扬声器和第二扬声器的输出,可提高声音的播出效果。
在图3所示的实施例的基础上,所述方法还可包括:
在所述目标部位与所述第一扬声器之间的距离大于预设距离的情况下,打开所述第一扬声器,并通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号。其中,预设距离可根据需要设置。通过切换第一扬声器和第二扬声器的输出信号,可为用户提供更为丰富的声音信号,从而进一步提高用户体验。
在上述实施例中,在步骤301之前,还可包括:在所述第一扬声器处于扬声器模式,且所述第一扬声器的输出音量为第二音量的情况下,接收第二输入;响应于所述第二输入,将所述第一扬声器切换为听筒模式;其中,在所述第一扬声器处于听筒模式时的输出音量大于预设音量或所述工作时长大于预设时长的情况下,所述第一音量小于所述第二音量。其中,所述第二输入例如可以是点击、触摸输入等。所述预设音量或者所述预设时间可根据实际需要设置。通过这种方式,可防止由于误操作而导致的扬声器工作模式不符合用户需求的问题。
参见图4,图4是本发明实施例提供的电子设备的结构图,所述电子设备包括第一扬声器,其中,第一扬声器的工作模式包括扬声器模式和听筒模式。如图4所示,电子设备400包括:
第一接收模块401,用于在所述第一扬声器处于听筒模式的情况下,接收第一输入;第一调整模块402,用于响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量;
其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。
可选的,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量负相关。
可选的,所述电子设备还包括:
第二接收模块,用于在所述第一扬声器处于扬声器模式,且所述第一扬 声器的输出音量为第二音量的情况下,接收第二输入;
第二处理模块,用于响应于所述第二输入,将所述第一扬声器切换为听筒模式;
其中,在所述第一扬声器处于听筒模式时的输出音量大于预设音量或所述工作时长大于预设时长的情况下,所述第一音量小于所述第二音量。
可选的,所述电子设备还包括第二扬声器;所述电子设备还包括:
第三处理模块,用于通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号;
第四处理模块,用于在所述第一扬声器与用户的目标部位的距离小于所述第二扬声器与所述目标部位的距离的情况下,关闭所述第一扬声器;
第五处理模块,用于通过所述第二扬声器输出第一声道信号和第二声道信号。
可选的,所述电子设备还包括:
第六处理模块,用于在所述目标部位与所述第一扬声器之间的距离大于预设距离的情况下,打开所述第一扬声器;
第七处理模块,用于通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号。
电子设备400能够实现上述方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。
图5为实现本发明实施例的一种电子设备的硬件结构示意图,该电子设备500包括但不限于:射频单元501、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、处理器510、以及电源511等部件。本领域技术人员可以理解,图5中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载移动终端、可穿戴设备、以及计步器等。
所述电子设备包括第一扬声器,其中,第一扬声器的工作模式包括扬声器模式和听筒模式。其中,射频单元501,用于在所述第一扬声器处于听筒 模式的情况下,接收第一输入;
其中,处理器510,用于响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量;
其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。
在本发明实施例中,当第一扬声器处于听筒模式的情况下,接收第一输入,并响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量,其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。因此,利用本发明实施例的方案,当第一扬声器在从听筒模式切换为扬声器模式时,可根据第一扬声器处于听筒模式时的工作时长或输出音量设置扬声器的第一音量,从而可保护听力,提高用户体验。
可选的,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量负相关。
可选的,所述处理器510还用于,在所述第一扬声器处于扬声器模式,且所述第一扬声器的输出音量为第二音量的情况下,接收第二输入;响应于所述第二输入,将所述第一扬声器切换为听筒模式;其中,在所述第一扬声器处于听筒模式时的输出音量大于预设音量或所述工作时长大于预设时长的情况下,所述第一音量小于所述第二音量。
可选的,所述处理器510还用于,将所述第一扬声器切换为扬声器模式之后,还包括:通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号;在所述第一扬声器与用户的目标部位的距离小于所述第二扬声器与所述目标部位的距离的情况下,关闭所述第一扬声器;通过所述第二扬声器输出第一声道信号和第二声道信号。
可选的,所述处理器510还用于,在所述目标部位与所述第一扬声器之间的距离大于预设距离的情况下,打开所述第一扬声器;通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号。
应理解的是,本发明实施例中,射频单元501可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理 器510处理;另外,将上行的数据发送给基站。通常,射频单元501包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元501还可以通过无线通信系统与网络和其他设备通信。
电子设备通过网络模块502为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。
音频输出单元503可以将射频单元501或网络模块502接收的或者在存储器509中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元503还可以提供与电子设备500执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元503包括扬声器、蜂鸣器以及受话器等。
输入单元504用于接收音频或视频信号。输入单元504可以包括图形处理器(Graphics Processing Unit,GPU)5041和麦克风5042,图形处理器5041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元506上。经图形处理器5041处理后的图像帧可以存储在存储器509(或其它存储介质)中或者经由射频单元501或网络模块502进行发送。麦克风5042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元501发送到移动通信基站的格式输出。
电子设备500还包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板5061的亮度,接近传感器可在电子设备500移动到耳边时,关闭显示面板5061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器505还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。
显示单元506用于显示由用户输入的信息或提供给用户的信息。显示单元506可包括显示面板5061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板5061。
用户输入单元507可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元507包括触控面板5071以及其他输入设备5072。触控面板5071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板5071上或在触控面板5071附近的操作)。触控面板5071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器510,接收处理器510发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板5071。除了触控面板5071,用户输入单元507还可以包括其他输入设备5072。具体地,其他输入设备5072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
进一步的,触控面板5071可覆盖在显示面板5061上,当触控面板5071检测到在其上或附近的触摸操作后,传送给处理器510以确定触摸事件的类型,随后处理器510根据触摸事件的类型在显示面板5061上提供相应的视觉输出。虽然在图5中,触控面板5071与显示面板5061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板5071与显示面板5061集成而实现电子设备的输入和输出功能,具体此处不做限定。
接口单元508为外部装置与电子设备500连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(Input/Output,I/O)端口、视频I/O端口、耳机端口等等。接口单元508可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到 的输入传输到电子设备500内的一个或多个元件或者可以用于在电子设备500和外部装置之间传输数据。
存储器509可用于存储软件程序以及各种数据。存储器509可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器509可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器510是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器509内的软件程序和/或模块,以及调用存储在存储器509内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器510可包括一个或多个处理单元;优选的,处理器510可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器510中。
电子设备500还可以包括给各个部件供电的电源511(比如电池),优选的,电源511可以通过电源管理系统与处理器510逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
另外,电子设备500包括一些未示出的功能模块,在此不再赘述。
优选的,本发明实施例还提供一种电子设备,包括处理器510,存储器509,存储在存储器509上并可在所述处理器510上运行的计算机程序,该计算机程序被处理器510执行时实现上述音量控制方法实施例中的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述音量控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意 在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台电子设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。

Claims (14)

  1. 一种音量控制方法,应用于电子设备,所述电子设备包括第一扬声器,其中,所述第一扬声器的工作模式包括扬声器模式和听筒模式,所述方法包括:
    在所述第一扬声器处于听筒模式的情况下,接收第一输入;
    响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量;
    其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。
  2. 根据权利要求1所述的方法,其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量负相关。
  3. 根据权利要求1所述的方法,其中,所述在所述第一扬声器处于听筒模式的情况下,接收第一输入之前,所述方法还包括:
    在所述第一扬声器处于扬声器模式,且所述第一扬声器的输出音量为第二音量的情况下,接收第二输入;
    响应于所述第二输入,将所述第一扬声器切换为听筒模式;
    其中,在所述第一扬声器处于听筒模式时的输出音量大于预设音量或所述工作时长大于预设时长的情况下,所述第一音量小于所述第二音量。
  4. 根据权利要求1所述方法,其中,所述电子设备还包括第二扬声器;
    将所述第一扬声器切换为扬声器模式之后,还包括:
    通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号;
    在所述将所述第一扬声器的输出音量设置为第一音量之后,所述方法还包括:
    在所述第一扬声器与用户的目标部位的距离小于所述第二扬声器与所述目标部位的距离的情况下,关闭所述第一扬声器;
    通过所述第二扬声器输出第一声道信号和第二声道信号。
  5. 根据权利要求4所述的方法,其中,所述通过所述第二扬声器输出第 一声道信号和第二声道信号之后,所述方法还包括:
    在所述目标部位与所述第一扬声器之间的距离大于预设距离的情况下,打开所述第一扬声器;
    通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号。
  6. 一种电子设备,所述电子设备包括第一扬声器,其中,所述第一扬声器的工作模式包括扬声器模式和听筒模式,所述电子设备包括:
    第一接收模块,用于在所述第一扬声器处于听筒模式的情况下,接收第一输入;
    第一处理模块,用于响应于所述第一输入,将所述第一扬声器切换为扬声器模式,并将所述第一扬声器的输出音量设置为第一音量;
    其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量相关联。
  7. 根据权利要求6所述的电子设备,其中,所述第一音量与所述第一扬声器处于听筒模式时的工作时长或输出音量负相关。
  8. 根据权利要求6所述的电子设备,其中,所述电子设备还包括:
    第二接收模块,用于在所述第一扬声器处于扬声器模式,且所述第一扬声器的输出音量为第二音量的情况下,接收第二输入;
    第二处理模块,用于响应于所述第二输入,将所述第一扬声器切换为听筒模式;
    其中,在所述第一扬声器处于听筒模式时的输出音量大于预设音量或所述工作时长大于预设时长的情况下,所述第一音量小于所述第二音量。
  9. 根据权利要求8所述的电子设备,其中,所述电子设备还包括第二扬声器;
    所述电子设备还包括:
    第三处理模块,用于通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号;
    第四处理模块,用于在所述第一扬声器与用户的目标部位的距离小于所述第二扬声器与所述目标部位的距离的情况下,关闭所述第一扬声器;
    第五处理模块,用于通过所述第二扬声器输出第一声道信号和第二声道信号。
  10. 根据权利要求9所述的电子设备,其中,所述电子设备还包括:
    第六处理模块,用于在所述目标部位与所述第一扬声器之间的距离大于预设距离的情况下,打开所述第一扬声器;
    第七处理模块,用于通过所述第一扬声器输出第一声道信号,通过所述第二扬声器输出第二声道信号。
  11. 一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至5任一项所述的音量控制方法中的步骤。
  12. 一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述的音量控制方法中的步骤。
  13. 一种计算机程序产品,所述程序产品被至少一个处理器执行以实现如权利要求1至5中任一项所述的音量控制方法。
  14. 一种电子设备,所述电子设备被配置为执行如权利要求1至5中任一项所述的音量控制方法。
PCT/CN2020/139608 2019-12-27 2020-12-25 音量控制方法、设备及计算机可读存储介质 WO2021129835A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911373390.6 2019-12-27
CN201911373390.6A CN111093137B (zh) 2019-12-27 2019-12-27 一种音量控制方法、设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2021129835A1 true WO2021129835A1 (zh) 2021-07-01

Family

ID=70398350

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/139608 WO2021129835A1 (zh) 2019-12-27 2020-12-25 音量控制方法、设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN111093137B (zh)
WO (1) WO2021129835A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111093137B (zh) * 2019-12-27 2021-07-06 维沃移动通信有限公司 一种音量控制方法、设备及计算机可读存储介质
CN111770416B (zh) * 2020-06-22 2022-08-02 维沃移动通信有限公司 扬声器控制方法、装置及电子设备
CN112181352A (zh) * 2020-10-10 2021-01-05 展讯通信(深圳)有限公司 电子设备及其音量控制方法、存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060285677A1 (en) * 2005-06-16 2006-12-21 Casio Hitachi Mobile Communications Co., Ltd. Mobile terminal device, computer-readable recording medium, and computer data signal
CN101409744A (zh) * 2008-11-27 2009-04-15 深圳华为通信技术有限公司 移动终端及其提高通话质量的方法
CN106162429A (zh) * 2015-03-25 2016-11-23 美律电子(深圳)有限公司 移动装置与其操作方法
CN111093137A (zh) * 2019-12-27 2020-05-01 维沃移动通信有限公司 一种音量控制方法、设备及计算机可读存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458339A (zh) * 2012-06-01 2013-12-18 联想(北京)有限公司 一种音频输出控制方法及电子设备
CN103442101A (zh) * 2013-08-01 2013-12-11 业成光电(深圳)有限公司 电子装置、电子装置的外壳及其制造方法
CN103873632B (zh) * 2014-02-19 2017-01-18 联想(北京)有限公司 一种信息处理方法与电子设备
CN104780260A (zh) * 2015-03-30 2015-07-15 陆俊 一种移动终端音量控制的方法及移动终端
CN105657128A (zh) * 2016-03-22 2016-06-08 上海斐讯数据通信技术有限公司 一种手机及其智能调整通话音量的方法
US10318758B2 (en) * 2016-12-14 2019-06-11 Blackberry Limited Selectable privacy modes
CN107360326B (zh) * 2017-07-17 2020-07-03 北京小米移动软件有限公司 终端音量调节处理方法及音量调节终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060285677A1 (en) * 2005-06-16 2006-12-21 Casio Hitachi Mobile Communications Co., Ltd. Mobile terminal device, computer-readable recording medium, and computer data signal
CN101409744A (zh) * 2008-11-27 2009-04-15 深圳华为通信技术有限公司 移动终端及其提高通话质量的方法
CN106162429A (zh) * 2015-03-25 2016-11-23 美律电子(深圳)有限公司 移动装置与其操作方法
CN111093137A (zh) * 2019-12-27 2020-05-01 维沃移动通信有限公司 一种音量控制方法、设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN111093137B (zh) 2021-07-06
CN111093137A (zh) 2020-05-01

Similar Documents

Publication Publication Date Title
WO2021098678A1 (zh) 投屏控制方法及电子设备
US11848773B2 (en) Transmit antenna switching method and terminal device
US11635939B2 (en) Prompting method and mobile terminal
WO2021109907A1 (zh) 应用分享方法、第一电子设备及计算机可读存储介质
WO2020238635A1 (zh) 移动终端及出音口的切换方法
WO2021017763A1 (zh) 事件处理方法、终端设备及计算机可读存储介质
WO2021204045A1 (zh) 音频的控制方法及电子设备
US11604567B2 (en) Information processing method and terminal
WO2021129835A1 (zh) 音量控制方法、设备及计算机可读存储介质
EP3691235A1 (en) Display method and mobile terminal
US11936474B2 (en) Transmission antenna switching method and terminal device
WO2021063249A1 (zh) 电子设备的控制方法及电子设备
WO2021098705A1 (zh) 显示方法及电子设备
WO2021109925A1 (zh) 应用分享方法、电子设备及计算机可读存储介质
WO2021129529A1 (zh) 设备切换方法及相关设备
WO2019201271A1 (zh) 通话处理方法及移动终端
WO2021077908A1 (zh) 参数调节方法和电子设备
WO2020220990A1 (zh) 受话器控制方法及终端
WO2021136141A1 (zh) 播放方法及电子设备
CN111432071B (zh) 通话控制方法及电子设备
WO2021104251A1 (zh) 控制方法及第一电子设备
WO2020199986A1 (zh) 视频通话方法及终端设备
WO2021078096A1 (zh) 受话器控制方法、装置和电子设备
WO2021197311A1 (zh) 音量调节显示方法及电子设备
WO2021238844A1 (zh) 音频输出方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20905841

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20905841

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.01.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20905841

Country of ref document: EP

Kind code of ref document: A1