CN117119349A - Volume control method, graphic interface and related device - Google Patents

Volume control method, graphic interface and related device Download PDF

Info

Publication number
CN117119349A
CN117119349A CN202310475336.2A CN202310475336A CN117119349A CN 117119349 A CN117119349 A CN 117119349A CN 202310475336 A CN202310475336 A CN 202310475336A CN 117119349 A CN117119349 A CN 117119349A
Authority
CN
China
Prior art keywords
volume
audio
electronic device
output
amplitude
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310475336.2A
Other languages
Chinese (zh)
Inventor
罗干
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310475336.2A priority Critical patent/CN117119349A/en
Publication of CN117119349A publication Critical patent/CN117119349A/en
Pending legal-status Critical Current

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback
    • 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
    • H04R2430/01Aspects of volume control, not necessarily automatic, in sound systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Acoustics & Sound (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application provides a volume control method, a graphical interface and a related device. In the method, when the electronic equipment detects that the volume is set to be large and the loudspeaker is adopted to output the audio, the electronic equipment amplifies the amplitude of the middle-high frequency part in the audio signal to be output and then outputs the amplified amplitude through the loudspeaker. Therefore, the human ear is more sensitive to the middle and high frequencies, and the user can obviously feel the audio output effect louder only by slightly amplifying the amplitude of the middle and high frequency part in the audio signal to be output, so that the user experience is improved.

Description

Volume control method, graphic interface and related device
Technical Field
The present application relates to the field of terminals, and in particular, to a volume control method, a graphical interface, and a related device.
Background
After the user turns the volume of the electronic device to a large volume, the heard sound is still not loud, and then the user can hear unclear content. How to solve the problem is a urgent problem to be solved.
Disclosure of Invention
The application provides a volume control method, a graphical interface and a related device. In the method, when the electronic equipment detects that the volume is set to be large and the loudspeaker is adopted to output the audio, the electronic equipment amplifies the amplitude of the middle-high frequency part in the audio signal to be output and then outputs the amplified amplitude through the loudspeaker. Therefore, the human ear is more sensitive to the middle and high frequencies, and the user can obviously feel the audio output effect louder only by slightly amplifying the amplitude of the middle and high frequency part in the audio signal to be output, so that the user experience is improved.
In a first aspect, the present application provides a volume control method, including: receiving a first operation for adjusting a volume from a first volume to a second volume, the second volume being greater than the first volume; amplifying the whole amplitude of the first audio to obtain a second audio; amplifying the audio amplitude in the preset frequency range in the second audio to obtain a third audio; the third audio is output through a speaker.
After the method provided in the first aspect is implemented, when the loudspeaker is adopted to output the audio at a large volume, the amplitude of the middle-high frequency part can be further amplified on the basis of integrally amplifying the amplitude of the audio to be output. In this way, the human ear is more sensitive to the middle and high frequencies, so that the user can obviously feel that the audio output effect is louder only by slightly amplifying the amplitude of the middle and high frequency part in the audio signal to be output, and the user experience is further improved
With reference to the method provided in the first aspect, the first volume is less than or equal to a volume threshold and the second volume is greater than the volume threshold; amplifying the overall amplitude of the first audio specifically includes: and amplifying the whole amplitude of the first audio according to the gain corresponding to the volume threshold.
In this way, the volume can be divided into a volume threshold and a standard volume range below the volume threshold, and a large volume range above the volume threshold. When the volume is in a large volume range and the loudspeaker is adopted to output the audio, the amplitude of the audio to be output can be amplified integrally, and then the amplitude of the middle-high frequency part is amplified further. The user's demand for the loudness of the audio output is satisfied.
The method provided in connection with the first aspect, the volume threshold being a maximum volume adjustable on the electronic device for the external audio device.
Therefore, when the loudspeaker is adopted to output the audio, the volume level larger than the maximum adjustable volume of the external audio equipment can be set, and the loudness of the loudspeaker when the audio is externally played can be further improved, so that the user experience is improved.
With reference to the method provided in the first aspect, amplifying the audio amplitude in the preset frequency range in the second audio specifically includes: and amplifying the audio amplitude in the preset frequency range in the second audio according to the gain corresponding to the second volume.
With reference to the method provided in the first aspect, before amplifying the audio amplitude in the preset frequency range in the second audio, the method further includes performing any one of the following: receiving an operation for selecting use of the speaker; or, in the case that the external audio device is not accessed, an operation for playing the media audio is received.
In this way, the user can select the speaker to output audio through a variety of modes of operation.
With reference to the method provided in the first aspect, after receiving a first operation for adjusting the volume from the first volume to the second volume, the method further includes: and displaying first prompt information, wherein the first prompt information is used for prompting a user that the high volume mode is started.
Therefore, the aim of timely prompting the user to turn on the large volume can be achieved in a prompting information mode, and the user experience is improved.
With reference to the method provided in the first aspect, after receiving a first operation for adjusting the volume from the first volume to the second volume, the method further includes: displaying the volume adjustment indication bar, and switching the display state of the volume adjustment indication bar from the first state to the second state; the first state includes: displaying a first color corresponding to the first volume in a first area in the volume adjustment indication bar; the second state includes: displaying a first color corresponding to the volume threshold in a second area in the volume adjustment indication bar, and displaying a second color corresponding to the second volume in a third area in the volume adjustment indication bar; the second region is greater than or equal to the first region.
Therefore, the aim of timely prompting the user to turn on the large volume can be achieved through the state of the volume adjustment indication strip, and the user experience is improved.
With reference to the method provided in the first aspect, after receiving a first operation for adjusting the volume from the first volume to the second volume, the method further includes: receiving a second operation for adjusting the volume from the second volume to a third volume, the third volume being smaller than the second volume; amplifying the whole amplitude of the fourth audio to obtain a fifth audio; the fifth audio is output through the speaker.
Thus, in a scene where a speaker is employed and audio is output at a large volume, the volume may be turned down according to a user operation to trigger the exit from the large volume mode.
With reference to the method provided in the first aspect, the third volume is less than or equal to a volume threshold and the second volume is greater than the volume threshold; amplifying the overall amplitude of the fourth audio specifically includes: and amplifying the whole amplitude of the fourth audio according to the gain corresponding to the third volume.
In this way, the audio can be amplified according to the gain corresponding to the volume after the volume is reduced, and the loudness of the audio output after the volume is reduced.
The method provided in connection with the first aspect, the volume threshold being a maximum volume adjustable on the electronic device for the external audio device.
Therefore, when the loudspeaker is adopted to output the audio, the volume level larger than the maximum adjustable volume of the external audio equipment can be set, and the loudness of the loudspeaker when the audio is externally played can be further improved, so that the user experience is improved.
With reference to the method provided in the first aspect, after receiving a second operation for adjusting the volume from the second volume to a third volume, the method further includes: and displaying second prompt information, wherein the second prompt information is used for prompting the user that the high volume mode is exited.
Therefore, the aim of timely prompting the user to quit the large volume can be achieved in a prompting information mode, and the user experience is improved.
With reference to the method provided in the first aspect, after receiving a second operation for adjusting the volume from the second volume to a third volume, the method further includes: displaying the volume adjustment indication bar, and switching the display state of the volume adjustment indication bar from the second state to the third state; the second state includes: displaying a first color corresponding to the volume threshold in a second area in the volume adjustment indication bar, and displaying the second volume second color in a third area in the volume adjustment indication bar; the third state includes: displaying a first color corresponding to the third volume in a fourth area in the volume adjustment indication bar; the fourth region is less than or equal to the second region.
Therefore, the aim of timely prompting the user to quit the large volume can be achieved through the state of the volume adjustment indication strip, and the user experience is improved.
With reference to the method provided in the first aspect, after receiving a first operation for adjusting the volume from the first volume to the second volume, the method further includes: determining to select an external audio device to output audio; amplifying the whole amplitude of the sixth audio to obtain a seventh audio; and outputting the seventh audio through an external audio device.
In this way, in a scenario where a speaker is used and audio is output at a high volume, the audio output device may be switched to the external audio device according to the user operation, and then the exit from the high volume mode is triggered.
With reference to the method provided in the first aspect, amplifying the overall amplitude of the sixth audio specifically includes: and amplifying the whole amplitude of the sixth audio according to the gain corresponding to the fourth volume, wherein the fourth volume is the volume set when the audio is output through the external audio equipment last time.
Thus, after the audio device is switched, the volume set by the switched audio device in last use is adopted by default to amplify the audio to be played.
In combination with the method provided in the first aspect, the selecting a peripheral device to output audio is determined in particular by: accessing the external equipment; or selecting the external device from the accessed devices as an audio output device.
In this way, the selection of a peripheral device to output audio may be determined in a variety of ways, improving the feasibility of the application.
In combination with the method provided in the first aspect, after determining to select the peripheral device to output audio, the method further includes: and displaying second prompt information, wherein the second prompt information is used for prompting the user that the high volume mode is exited.
Therefore, the aim of timely prompting the user to quit the large volume can be achieved in a prompting information mode, and the user experience is improved.
In combination with the method provided in the first aspect, after determining to select the peripheral device to output audio, the method further includes: displaying the volume adjustment indication bar, and switching the display state of the volume adjustment indication bar from the second state to the fourth state; the second state includes: displaying a first color corresponding to the volume threshold in a second area in the volume adjustment indication bar, and displaying a second color corresponding to the second volume in the second area in the volume adjustment indication bar; the fourth state includes: displaying the first color corresponding to the fourth volume in a fifth area in the volume adjustment indication bar; the fifth region is less than or equal to the second region.
Therefore, the aim of timely prompting the user to turn on the large volume can be achieved through the state of the volume adjustment indication strip, and the user experience is improved.
In combination with the method provided in the first aspect, after determining to select the peripheral device to output audio, the method further includes: determining to select the speaker to output audio; amplifying the whole amplitude of the eighth audio to obtain a ninth audio; amplifying the audio amplitude in the preset frequency range in the ninth audio to obtain tenth audio; the tenth audio is output through the speaker.
In this way, in a scene of using a speaker and outputting audio at a high volume, after switching the audio output device to the external audio device, the audio output device is switched back to the speaker, so that the mode of re-entering the high volume is automatically triggered.
With reference to the method provided in the first aspect, amplifying the overall amplitude of the eighth audio specifically includes: and amplifying the whole amplitude of the eighth audio according to the gain corresponding to the volume threshold.
The method provided in connection with the first aspect, the volume threshold being a maximum volume adjustable on the electronic device for the external audio device.
With reference to the method provided in the first aspect, amplifying the audio amplitude in the preset frequency range in the ninth audio specifically includes: and amplifying the audio amplitude in the preset frequency range in the ninth audio according to the gain corresponding to the second volume.
With the method provided in the first aspect, after determining to select the speaker to output audio, the method further includes: and displaying first prompt information, wherein the first prompt information is used for prompting a user that the high volume mode is started.
With the method provided in the first aspect, the selection of the speaker to output audio is determined in particular by: pulling out the external audio equipment; alternatively, the speaker is selected from the devices that have been accessed as the audio output device.
With reference to the method provided in the first aspect, the preset frequency range is a range corresponding to the medium-high frequency.
Therefore, the human ear is more sensitive to the middle and high frequencies, and the user can obviously feel the audio output effect louder only by slightly amplifying the amplitude of the middle and high frequency part in the audio signal to be output, so that the user experience is improved.
In combination with the method provided in the first aspect, the speaker is further connected to a power amplifier circuit, and when audio with an amplitude greater than a threshold value is input to the power amplifier circuit and a path of the speaker, distortion occurs in audio output by the speaker.
Therefore, aiming at the speakers and the power amplifier circuits with poor amplifying capability, by enlarging the amplitude of the middle-high frequency part, noise generated by exceeding the capabilities of the speakers and the power amplifier circuits can be avoided, the loudness of audio output can be improved, and the user experience is improved.
With reference to the method provided in the first aspect, amplifying the overall amplitude of the first audio specifically includes: the audio manager AudioFlinger amplifies the overall amplitude of the first audio according to the gain corresponding to the volume threshold.
With reference to the method provided in the first aspect, the amplifying the audio amplitude in the preset frequency range in the second audio includes: and amplifying the audio amplitude in the preset frequency range in the second audio by calling an algorithm module according to the gain corresponding to the second volume.
In a second aspect, the present application provides an electronic device comprising one or more audio output devices, a screen, a memory, one or more processors; the memory is coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors call to cause the electronic device to perform the method as described in any of the first aspects.
In a third aspect, the present application provides a chip for application to an electronic device, the chip comprising one or more audio output devices, one or more processors for invoking computer instructions to cause the electronic device to perform a method as described in any of the first aspects.
In a fourth aspect, the present application provides a computer readable storage medium comprising instructions which, when run on an electronic device, cause the electronic device to perform a method as described in any of the first aspects.
Drawings
Fig. 1 is a schematic diagram of switching relationships between several audio output scenarios according to an embodiment of the present application;
fig. 2 is a schematic diagram of a graphical interface in which "speaker & standard volume" and "speaker & loud volume" are switched to each other according to an embodiment of the present application;
fig. 3 is a schematic diagram of a graphical interface in a scenario of switching from "speaker & loud" to "earphone & standard loud" according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a graphical interface in a "earphone & standard volume" switch back to "speaker & loud" scenario provided by an embodiment of the present application;
fig. 5 is a schematic diagram of a graphical interface in a scene of switching from "speaker & loud" to "sound & standard loud" according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a graphical interface in a "speaker & loud" scene switched back by "sound & standard loud" in accordance with an embodiment of the present application;
fig. 7 is a flow chart of a volume control method according to an embodiment of the present application;
FIG. 8 is an OS interaction diagram provided by an embodiment of the present application;
FIG. 9 is another OS interaction diagram provided by an embodiment of the present application;
fig. 10 is a schematic diagram of an electronic device software architecture according to an embodiment of the present application;
fig. 11 is a schematic diagram of an electronic device hardware architecture according to an embodiment of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly and thoroughly described below with reference to the accompanying drawings. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the described embodiments of the application may be combined with other embodiments.
The term "User Interface (UI)" in the following embodiments of the present application is a media interface for interaction and information exchange between an application program or an operating system and a user, which enables conversion between an internal form of information and a form acceptable to the user. The user interface is a source code written in a specific computer language such as java, extensible markup language (extensible markup language, XML) and the like, and the interface source code is analyzed and rendered on the electronic equipment to finally be presented as content which can be identified by a user. A commonly used presentation form of the user interface is a graphical user interface (graphic user interface, GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It may be a visual interface element of text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc., displayed in a display of the electronic device.
First, the related concepts related to the present application will be described:
frequency: the frequency refers to the level of sound pitch perceived by the human ear. The frequency range of sound that the human ear can hear is 20Hz-20KHz. Wherein the human ear is more sensitive to sound of medium and high frequencies (1280 Hz-2560 Hz), i.e. the human ear hears a higher loudness of sound at medium and high frequencies than at low frequencies, given other factors.
Loudness: loudness refers to the intensity of sound perceived by the human ear, which is a subjective sensation of the size of sound by a person. The magnitude of the loudness heard by the human ear is affected by factors such as distance, amplitude, etc. The farther the distance traveled, the less loudness for the same sound; when the propagation distance is fixed, the larger the amplitude of the sound, the larger the loudness. In addition, the magnitude of the loudness is also related to sound intensity, frequency, but the loudness changes with sound pressure, frequency are not simple linear relationships. By analyzing the existing equal-loudness curves, the loudness of sounds with the same sound pressure but different frequencies is different. For example, two sounds with 60dB sound pressure, one with 100Hz frequency and the other with 1000Hz frequency, sound with the human ear sounding 1000Hz louder than the 100Hz sound. To make a sound with a frequency of 100Hz sound as loud as a sound with a frequency of 1000Hz and a sound pressure of 60dB, the sound pressure of a sound with a frequency of 100Hz is to be 67dB.
Volume: the volume corresponds to the loudness, and the volume refers to a setting parameter applied in the electronic device for controlling the loudness of the output audio, and when the volume setting of the electronic device is higher, the loudness of the sound output by the electronic device is higher.
Audio clipping: audio clipping refers to when an audio signal is amplified (corresponding to amplitude amplification of the audio signal) beyond a maximum limit of a certain node (e.g., a power amplifier circuit, a speaker) during the process of inputting the audio signal to the speaker, so that peaks and troughs in the waveform of the amplified audio are "shaved off", and thus, when the speaker plays the audio after clipping distortion, harsh and unnatural noise is generated.
High volume: the loud volume may also be referred to as a loud volume. In the present application, loud volume is a relative concept, not a limitation of a specific value. In particular, loud volume refers to a higher volume than a conventional, general purpose volume that can be provided by an electronic device. When the performance of the audio devices (power amplifier circuit, speaker) provided by different electronic devices is different, the conventional general volume that can be provided is different, so that the volume value represented by the loud volume may also be different for different electronic devices. By way of example, some electronic devices may currently provide a volume control level of 0-15, and others may provide a volume control level of 0-14. Thus, for the former electronic device, a volume greater than 15 levels, such as 16 levels, would belong to a large volume, which 15 levels may also be referred to as a volume threshold; for the latter electronic device. A volume greater than 14 levels, e.g., 15 levels, belongs to a large volume, and the volume of the 14 levels may also be referred to as a volume threshold. The present application is not limited by the names, specific values, etc. of the loud volumes, and detailed explanations have been made with respect to the relative concepts characterized by the loud volumes.
Standard volume: the standard volume refers to a conventional, universal volume that can be provided by current electronic devices. As before, different electronic devices can provide different standard volumes, e.g., some electronic devices can provide levels of 0-15, and others can provide levels of 0-14. If the volume is set to be larger than the conventional and universal volume which can be provided by the electronic equipment, the problems of clipping distortion and the like of the audio output by the electronic equipment are caused, noise is further generated, and the user experience is reduced.
As can be seen from the description of the above concepts, in an application scenario where an electronic device outputs audio, in order to avoid noise, the volume level is generally limited. That is, the user may turn the volume of the electronic device to the highest, and the loudness of the audio output by the electronic device may still not be loud, so that the sound effect expected by the user cannot be achieved.
In order to solve the above problems, the present application provides a volume control method, a graphical interface and a related device. In the method, when the electronic equipment detects that the volume is set to be large and the loudspeaker is adopted to output the audio, the electronic equipment amplifies the amplitude of the middle-high frequency part in the audio signal to be output and then outputs the amplified amplitude through the loudspeaker.
After the method provided by the application is implemented, the human ear is more sensitive to the middle and high frequencies, so that the user can obviously feel that the audio output effect is louder only by slightly amplifying the amplitude of the middle and high frequency part in the audio signal to be output, and the frequency of the voice of the person speaking and singing is mostly in the middle and high frequencies, therefore, the user can hear the content represented by the voice in the output audio, and the user experience is further improved.
Next, a scene to which the volume control method provided by the present application is applied will be described.
Because the electronic device adopts different audio devices and outputs audio in scenes with different volume settings, the output loudness requirements of users are different. For example, when the electronic device outputs audio using a peripheral device (which may also be referred to as an external audio device, such as a wired earphone, a bluetooth earphone, or a sound box), the electronic device provides sound volume in a standard volume range sufficient for the user to hear and hear clear content because the earphone is in close contact with the human ear and the amplification function of the sound box is capable of further amplifying the audio, whereas when the electronic device outputs audio using a speaker, the highest sound volume in the standard volume range cannot cause the user to hear or hear clear content because the human ear is relatively far from the electronic device and the amplification function of the speaker is not as good as that of the sound box.
Therefore, the present application further divides the scenes in which audio is output using speakers into two scenes of standard volume and large volume. The scene of the output audio by using the earphone and the sound equipment is only defined as the scene of standard volume.
Referring to fig. 1, fig. 1 illustrates a schematic diagram of a switching relationship of several audio output scenarios.
As shown in fig. 1, several audio output scenes are exemplarily shown, respectively, and a direct switching relationship of the audio output scenes.
The audio output scene specifically comprises:
a scene that adopts a speaker and outputs audio in a standard volume range is denoted as "speaker & standard volume"; a scene that adopts a speaker and outputs audio in a large volume range is denoted as "speaker & large volume"; a scene of outputting audio in a standard volume range by adopting headphones (including wired headphones and Bluetooth headphones) is recorded as 'headphones & standard volume'; a scene in which sound is used and audio is output in a standard volume range is referred to as "sound & standard volume".
The switching relation of the audio output scene specifically comprises:
when the electronic equipment is in a 'loudspeaker & standard volume' scene, if the electronic equipment is used for turning up the volume, for example, turning into a large volume range, the electronic equipment is switched to the 'loudspeaker & large volume' scene; if the electronic device again turns the volume down, for example, to within the standard volume range, the electronic device switches back to the "speaker & standard volume" scenario. In other examples of the application, when the electronic device is turning up the volume while using the speaker to output audio, the electronic device may switch from a "speaker & loud" scenario, i.e., enable the loud mode, i.e., without restricting the volume of the electronic device to be turned up beyond a volume threshold, i.e., to be within a loud volume range.
When the electronic equipment is in a 'loudspeaker & large volume' scene, if the electronic equipment switches the audio equipment to the earphone, the electronic equipment is switched to a 'earphone & standard volume' scene; if the electronic equipment switches the audio equipment back to the loudspeaker, the electronic equipment switches to a 'loudspeaker & large volume' scene;
when the electronic equipment is in a 'loudspeaker & large volume' scene, if the electronic equipment switches the audio equipment to sound, the electronic equipment switches to a 'sound & standard volume' scene; if the electronic device switches the audio device back to the speaker, the electronic device switches to the "speaker & loud" scene.
In the above scene change, when the electronic device is switched to output audio in the "speaker & loud" scene, the electronic device may turn on the loud mode to output audio in the loud mode, where the loud mode includes: the amplitude of the middle-high frequency part in the audio signal to be output is amplified and then output through a loudspeaker. When the electronic device is switched from the 'speaker & loud' scene to any other scene, the turning off the loud mode is equivalent to outputting audio in a standard mode, and the standard mode comprises: the amplitude of the audio signal to be output is amplified integrally and then output through a loudspeaker. The amplitude amplification factor in the standard mode is smaller than that of the medium-high frequency part in the large volume mode. For the method for turning on the large volume mode, reference may be made to the description of the method flow hereinafter, which is not repeated here.
Fig. 1 illustrates only a few audio output scenarios, but may include more output scenarios, such as "earpiece & standard volume" scenarios, where both the earpiece and speaker are built-in devices belonging to the electronic device, rather than peripheral devices. Typically, electronic devices output audio by default in some scenarios and by default in other scenarios using headphones. For example, speakers are used to output audio when the electronic device plays media audio, and handsets are used by default to output audio when the electronic device plays pass audio. Media audio includes, but is not limited to: audio output by the electronic device during playing of music, video, games. While call audio is electronic equipment including but not limited to: and a conversation sound played in the conversation process. Because the electronic equipment adopts the earphone to output the audio, the requirement of the user on the output loudness is not high, and the mode of large volume is not needed to be adopted for outputting the earphone output audio, namely the application mainly relates to a volume control method of a loudspeaker on the media audio, so that the 'earphone & standard volume' scene is not repeated in detail.
In addition to the switching relationships of several audio output scenes shown in fig. 1, other more switching relationships may be included, for example, direct switching of "earphone & standard volume" scenes and "stereo & standard volume" scenes, direct switching of "speaker & standard volume" scenes and "earphone & standard volume" scenes, and so on. Since the present application is mainly related to turning on the loud mode to output audio in the "speaker & loud" scene, the switching to the "speaker & loud" scene or the switching from the "speaker & loud" scene to other scenes is mainly introduced.
Next, a graphical interface schematic under the switching audio output scene provided by the present application will be described in connection with UI embodiments.
Referring to fig. 2, fig. 2 illustrates a graphical interface diagram in which "speaker & standard volume" and "speaker & loud volume" are switched to each other.
A in fig. 2 is a user interface of the electronic device when outputting audio at "speaker & standard volume". The user interface may be a drop down status bar interface provided by a desktop, a main interface, or an interface provided by any other application. The interface may include a volume adjustment indicator 211, and the present application is not limited to other contents included in the interface.
The volume adjustment indicator 211 may display the adjusted volume indication information according to the volume adjustment operation input by the user. When the volume adjustment is higher, the more the selected state 211A in the volume adjustment instruction bar 211 occupies, which corresponds to the higher the instruction volume level. When the volume is turned up to the highest level (e.g., level 15) within the standard volume range, the area occupied by the selected state 211A in the volume adjustment instruction bar 211 is shown as a in fig. 2.
The volume indicated by a in fig. 2 may also be referred to as a first volume, which may be smaller than the volume threshold, i.e. 15 steps, in addition to being equal to the volume threshold, i.e. 15 steps.
The state of the volume adjustment indicator bar 211 shown in a of fig. 2 is a first state, and the first state includes: and displaying a first color corresponding to the first volume in a first area in the volume adjustment indication bar, namely displaying a selected state 211.
The operation for adjusting the volume may be an up operation acting on the volume key or a sliding operation acting on the volume adjustment indicator 211, which is not limited in the embodiment of the present application.
The aforementioned operation of turning up the volume key or the sliding operation on the volume adjustment instruction bar 211 may also be referred to as a first operation.
When the electronic apparatus detects an operation to turn up the volume (a slide-up operation on the volume adjustment instruction bar 211) in the state of the highest volume level within the standard volume range shown in fig. 2 a, the electronic apparatus switches to a scene where audio is output under "speaker & high volume".
B in fig. 2 is a user interface of the electronic device when outputting audio at "speaker & loud" volume. The interface may be a drop down status bar interface provided by a desktop, a main interface, or an interface provided by any other application. The interface may include a volume adjustment indicator 211 and an audio output mode prompt 212, and the present application is not limited to other contents included in the interface.
The volume adjustment indicator 211 continues to display a selected state 211B above the selected state 211A, where the selected state 211B is used to indicate that the volume level reaches a high volume (e.g., 16 th level). Further, the selected state 211A and the selected state 211B are different, for example, in an actual user interface, the color of the selected state 211A may be blue and the color of the selected state 211B may be orange.
The volume indicated by b in fig. 2 above may also be referred to as a second volume, which is greater than the volume threshold, i.e. greater than 15 steps.
The state of the volume adjustment indicator bar 211 shown in b of fig. 2 is a second state, and the second state includes: displaying a first color corresponding to the volume threshold in a second area of the volume adjustment indicator (i.e., a selected state 211A), and displaying a second color corresponding to the second volume in a third area of the volume adjustment indicator (i.e., a selected state 211B); the second area is larger than or equal to the first area, and when the first volume is smaller than a volume threshold value, the second area is larger than the first area; when the first volume is equal to the volume threshold, the second area is equal to the first area.
The audio output mode alert 212 (which may also be referred to as a first alert) may include, for example, an alert that the "loud mode is on". The loud volume mode includes: the amplitude of the middle-high frequency part (namely, the part in the preset frequency range) in the audio signal to be output is amplified and then output through a loudspeaker. For a specific implementation of turning on the loud volume mode, reference may be made to the description of OS interaction hereinafter, which is not repeated here.
When the electronic device detects a second operation of turning down the volume, for example, turning down the volume from the aforementioned second volume to a third volume, in the high volume state shown in fig. 2 b, the electronic device switches back to the scene of outputting audio at "speaker & standard volume".
C in fig. 2 is a user interface of the electronic device when outputting audio at "speaker & standard volume". The user interface may be a drop down status bar interface provided by a desktop, a main interface, or an interface provided by any other application. The interface may include a volume adjustment indicator 211 and an audio output mode prompt 213, and the present application is not limited to other contents included in the interface.
The selected state of the volume adjustment indicator 211 may be the same as or different from that of fig. 2 a, depending on the operation of volume down, and when the operation of volume down is used to continuously decrease the volume by more levels, the area occupied by the selected state 211A of the volume adjustment indicator 211 in c of fig. 2 is smaller than the area occupied by a of fig. 2.
The volume indicated by c in fig. 2 above may also be referred to as a third volume, which is less than the volume threshold.
The state of the volume adjustment indicator bar 211 shown in c in fig. 2 is a third state, and the third state includes: displaying a first color corresponding to the volume threshold in a fourth area (i.e., selected state 211A) of the volume adjustment indicator, wherein the fourth area is smaller than or equal to the first area, and when the third volume is smaller than the volume threshold, the fourth area is smaller than the second area; when the first volume is equal to the volume threshold, the fourth area is equal to the second area.
Wherein the audio output mode prompt 213 (which may also be referred to as a second prompt) may contain a prompt such as "the loud mode has been exited".
The user interface shown in fig. 2 is merely exemplary, and in other embodiments of the present application, the user interface shown in fig. 2 may further include more or less information, such as the volume adjustment indicator bar 211, the audio output mode prompt 212, or the audio output mode prompt 213 may not be included. This is because the volume adjustment indicator bar 211 is typically displayed for a period of time after the electronic device receives an operation to adjust the volume. The audio output mode alert 212 is typically displayed for a period of time after the electronic device switches to a "speaker & loud" scene. The audio output mode prompt 213 is typically displayed for a period of time after the electronic device switches from a "speaker & standard volume" scene to the other scene.
Referring to fig. 3, fig. 3 illustrates a graphical interface diagram in a "speaker & loud" switch to "headphone & standard loud" scenario.
A in fig. 3 is another user interface of the electronic device when outputting audio at "speaker & loud" volume. The user interface may be a drop down status bar interface provided by a desktop. The interface may include an audio device card 311, and the present application is not limited to other contents included in the interface.
Where the audio device card 311 displays the audio device currently being employed, such as a speaker.
When the electronic device detects an operation on the audio device card 311 in the user interface shown in fig. 3 a, other audio devices available for switching are displayed.
B in fig. 3 is another user interface of the electronic device when outputting audio at "speaker & loud" volume. The user interface is an audio switching interface displayed in response to a user's operation on the audio device card 311. The audio switching interface contains one or more available audio devices, such as speakers, that are currently in use, and other peripheral devices that may be used, such as device a and device B. Device a may be a headset and device B may be an audio device. In addition, the peripheral device may be other wired earphone, bluetooth earphone, or sound device, etc. that are connected to the electronic device in advance.
When the electronic device detects an operation acting on device a in b in fig. 3 in the "speaker & large volume" scene, the electronic device switches to the scene in which audio is output in the "headphone & standard volume".
C in fig. 3 is a user interface of the electronic device when outputting audio at "earphone & standard volume". The user interface may include a volume adjustment indicator 211, an audio output mode prompt 213, and optionally, a prompt indicating that the device a has been switched to, and the like.
Wherein the selected state of the volume adjustment indicator bar 211 depends on the volume level (which may also be referred to as the fourth volume) of the last time the audio was outputted with the earphone. For example, a small area of the selected state 211A, as indicated by c in fig. 3, indicates that the volume level is low, for example, level 5.
The volume indicated by c in fig. 3 may also be referred to as a fourth volume.
The state of the volume adjustment indicator bar 211 shown in c in fig. 3 is a fourth state, and the fourth state includes: and displaying a first color corresponding to the volume threshold value (namely, a selected state 211A) in a fifth area in the volume adjustment indication bar. The fifth area is smaller than or equal to the second area, and when the fourth volume is smaller than a volume threshold value, the second area is larger than the fifth area; when the fourth volume is equal to the volume threshold, the second area is equal to the fifth area.
Wherein the audio output mode prompt 213 (which may also be referred to as a second prompt) may contain a prompt such as "the loud mode has been exited".
When the electronic device detects an operation for turning up the volume in the "earphone & standard volume" scene, the electronic device adjusts the area occupied by the selected state 211A of the volume adjustment indicator 211, and accordingly increases the loudness of the output audio. And the electronic equipment does not continuously increase the loudness of the output audio until the electronic equipment detects that the volume is adjusted to be higher than the highest volume in the standard volume range. Alternatively, however, the electronic device may adjust the area occupied by the selected state 211B of the volume adjustment indicator bar 211, such as the area occupied by the selected state 211B shown in fig. 3 d. Optionally, the electronic device may also display a prompt 214 for prompting the user that the earphone volume is too high, to pay attention to healthy ears, etc.
Referring to fig. 4, fig. 4 illustrates a graphical interface diagram in a "headphones & standard volume" switch back to a "speaker & loud" scene.
A in fig. 4 is another user interface of the electronic device when outputting audio at "earphone & standard volume". The user interface may be a drop down status bar interface provided by a desktop. The interface may include an audio device card 311, and the present application is not limited to other contents included in the interface.
Where audio device card 311 displays the audio device currently being employed, such as device a described above with respect to fig. 3.
When the electronic device detects an operation on the audio device card 311 in the user interface shown in fig. 4 a, other audio devices available for switching are displayed.
B in fig. 4 is another user interface of the electronic device when outputting audio at "earphone & standard volume". The user interface is an audio switching interface displayed in response to a user's operation on the audio device card 311. The audio switching interface contains one or more available audio devices, such as device a, which is currently in use, and other speakers that may be used, as well as peripheral devices, such as device B, which may be audio. In addition, the peripheral device may be other wired earphone, bluetooth earphone, or sound device, etc. that are connected to the electronic device in advance.
When the electronic device detects the operation of the speaker in b in fig. 4 under the "earphone & standard volume" scene, the electronic device switches to the use of the speaker to output audio.
C in fig. 4 is a user interface of the electronic device when outputting audio at "speaker & loud" level. The user interface may include a volume adjustment indicator 211, an audio output mode prompt 212, optionally, a prompt indicating that a speaker has been switched, etc., and the present application is not limited to other contents included in the user interface.
Wherein the selected state of the volume adjustment indicator bar 211 depends on the volume level of the last time the audio was output with the speaker. For example, the area of the selected state 211B shown as c in fig. 4 indicates that the volume level reaches the highest, for example, 16 th level.
The audio output mode prompt 212 may include, for example, a prompt that "loud mode is on". The loud volume mode includes: the amplitude of the middle-high frequency part in the audio signal to be output is amplified and then output through a loudspeaker. For a specific implementation of turning on the loud volume mode, reference may be made to the description of OS interaction hereinafter, which is not repeated here.
Referring to fig. 5, fig. 5 illustrates a graphical interface diagram in a "speaker & loud" switch to a "sound & standard loud" scene.
A in fig. 5 is another user interface of the electronic device when outputting audio at "speaker & loud" volume. The user interface may be a drop down status bar interface provided by a desktop. The interface may include an audio device card 311, and the present application is not limited to other contents included in the interface.
Where the audio device card 311 displays the audio device currently being employed, such as a speaker.
When the electronic device detects an operation on the audio device card 311 in the user interface shown in fig. 5 a, other audio devices available for switching are displayed.
B in fig. 5 is another user interface of the electronic device when outputting audio at "speaker & loud" volume. The user interface is an audio switching interface displayed in response to a user's operation on the audio device card 311. The audio switching interface contains one or more available audio devices, such as speakers, that are currently in use, and other peripheral devices that may be used, such as device a and device B. Device a may be a headset and device B may be an audio device. In addition, the peripheral device may be other wired earphone, bluetooth earphone, or sound device, etc. that are connected to the electronic device in advance.
When the electronic apparatus detects an operation acting on the apparatus B in fig. 5B in the "speaker & large volume" scene, the electronic apparatus switches to the scene in which audio is output in the "sound & standard volume".
C in fig. 5 is a user interface of the electronic device when outputting audio at "sound & standard volume". The user interface may include a volume adjustment indicator 211, an audio output mode prompt 213, and optionally, a prompt indicating that the device B has been switched to, etc., and the present application is not limited to other contents included in the user interface.
The selected state of the volume adjustment indicator 211 depends on the volume level of the last audio output with sound. For example, a small area of the selected state 211A, as shown by c in fig. 5, indicates that the volume level is low, for example, level 5.
The audio output mode prompt 213 may include, for example, a prompt that the loud mode has been exited.
When the electronic device detects an operation for turning up the volume in the "sound & standard volume" scene, the electronic device adjusts the area occupied by the selected state 211A of the volume adjustment indicator 211, and accordingly increases the loudness of the output audio. And the electronic equipment does not continuously increase the loudness of the output audio until the electronic equipment detects that the volume is adjusted to be higher than the highest volume in the standard volume range. Alternatively, however, the electronic device may adjust the area occupied by the selected state 211B of the volume adjustment indicator bar 211, such as the area occupied by the selected state 211B shown in fig. 5 d. Optionally, the electronic device may also display a prompt 214 for prompting the user that the sound volume is too high, that the user is paying attention to a healthy ear, etc.
Referring to fig. 6, fig. 6 illustrates a graphical interface diagram in a "speaker & loud" scene switched back by "sound & standard loud".
A in fig. 6 is another user interface of the electronic device when outputting audio at "sound & standard volume". The user interface may be a drop down status bar interface provided by a desktop. The interface may include an audio device card 311, and the present application is not limited to other contents included in the interface.
Where the audio device card 311 displays the audio device currently being employed, such as device B shown in fig. 5 above.
When the electronic device detects an operation on the audio device card 311 in the user interface shown in fig. 6 a, other audio devices available for switching are displayed.
B in fig. 6 is another user interface of the electronic device when outputting audio at "sound & standard volume". The user interface is an audio switching interface displayed in response to a user's operation on the audio device card 311. The audio switching interface contains one or more available audio devices, such as device B, which may be headphones, and other speakers that may be used, as well as peripheral devices, such as device a. In addition, the peripheral device may be other wired earphone, bluetooth earphone, or sound device, etc. that are connected to the electronic device in advance.
When the electronic device detects the operation of the speaker in b in fig. 6 in the "sound & standard volume" scene, the electronic device switches to use the speaker to output audio.
C in fig. 6 is a user interface of the electronic device when outputting audio at "speaker & loud" level. For the description of the user interface c in fig. 6, reference may be made to the description of the user interface c in fig. 4, which is not repeated here.
Fig. 2 to fig. 6 are only exemplary illustrations of an audio device switching manner, that is, the audio device is switched by the audio device card 311 provided in the drop-down status bar, in addition to this, the present application may include other audio device switching manners, for example, by triggering the electronic device to automatically switch the audio device directly by inserting or extracting the peripheral device, or determining/canceling the switching information of the confirmation device that pops up after inserting or extracting the peripheral device, to switch the audio device, etc., which are not limited in this embodiment of the present application.
In addition to the foregoing fig. 2-6 only exemplarily showing that the volume level corresponding to the loud volume has only one level (for example, the 16 th level), the loud volume according to the present application may be further divided into more levels, for example, the 16 th level, the 17 th level, etc., when the loud volume is at different levels, the electronic device is in a turned-on loud volume mode, specifically, the amplification factors of the magnitudes of the middle-high frequency portions in the output audio signal are different, when the volume level is higher, the corresponding amplification factor is higher, so that the loudness of the sound heard by the user is higher, and the user can hear the content more clearly.
In the embodiment of the present application, the frequency range corresponding to the medium-high frequency is a preset frequency range, and the present application is not limited to this specific range.
Based on the foregoing description of the application scenario, the volume control method provided by the present application is described next with reference to a method flowchart.
As shown in fig. 7, the method flow includes the steps of:
s71, detecting whether the peripheral device is connected.
Specifically, after the electronic device is started, whether the electronic device is connected to a corresponding peripheral device or not can be detected through the bluetooth module or the earphone interface, and if the electronic device is detected that the peripheral device is not connected, the subsequent S72 is executed; if it is detected that the peripheral device is not connected, the subsequent S76 is executed.
Among others, peripheral devices include, but are not limited to: wired headphones, bluetooth headphones, audio equipment, etc.
Based on the description of the above scenario, when the electronic device outputs audio by using the peripheral device, the audio output loudness can meet the requirement of the user, so that the large-volume mode provided by the application is not needed, and therefore S71 can be used for primarily screening the scenario without turning on the large-volume mode.
S72, detecting whether a loudspeaker is selected to output audio.
Specifically, if the electronic device detects that the peripheral device is not connected, it may further detect whether the speaker is selected to output audio, and if so, continue to execute the subsequent S73. The implementation manner of selecting the speaker to output audio may be, for example, the operation of selecting the speaker in the audio switching interface as shown in fig. 4, or may be other, which is not limited by the embodiment of the present application.
This is because, in the case where the electronic device is not connected to the peripheral device, audio may be output by way of speakers or by way of handsets, for example, when the electronic device selects a speaker to output audio while playing media audio, when the electronic device is playing talk audio, the handsets are selected by default to output audio. In general, when selecting the earpiece output audio, the user' S requirement for the loudness of sound is not high, so that the large-volume mode is not required to be turned on when selecting the earpiece output audio as well as selecting the peripheral output audio, and thus S71 can be used to further screen out the scenes in which the large-volume mode is not turned on.
S73, detecting whether the volume of the loudspeaker is big.
Specifically, the electronic device needs to detect whether the speaker volume is large or not after detecting that the audio is output by using the speaker, and also needs to detect whether the adjusted speaker volume is large or not after detecting that the operation for adjusting the speaker volume is received each time after the audio is output by using the speaker. When the electronic device detects that the speaker volume is high, then the following S74 is performed; when the electronic device detects that the speaker volume is not loud, the subsequent S75 is performed.
This is because, in the process that the electronic device outputs audio by using the speaker, the user can adjust the volume at any time, and only when the speaker volume is adjusted to be within the large volume range, the large volume mode needs to be turned on, so S73 can be used to further screen out the scene that does not turn on the large volume mode. The implementation manner for adjusting the volume of the speaker may be, for example, a sliding operation acting on the volume adjustment indicator bar 211 as shown in fig. 2, or may be other operations acting on a volume key, for example, which is not limited in this embodiment of the present application.
S74, turning on a large volume mode, and outputting audio in the large volume mode by using a loudspeaker.
Specifically, when the electronic device detects that the speaker volume is high, the electronic device starts a high volume mode and outputs audio in the high volume mode. The loud volume mode includes: the amplitude of the middle-high frequency part in the audio signal to be output is amplified and then output through a loudspeaker. For a specific implementation of turning on the loud volume mode, reference may be made to the description of OS interaction hereinafter, which is not repeated here.
In the process that the electronic device starts the big volume mode and adopts the speaker to output the audio in the big volume mode, the electronic device may also display an interface such as the interface shown in the b in fig. 2, which is not described herein.
S75, exiting the large volume mode, and outputting the audio in the standard mode by adopting a loudspeaker.
Specifically, when the electronic device detects that the speaker volume is not a large volume (i.e., a standard volume), exiting the large volume mode corresponds to turning on the standard mode, and outputting audio in the standard mode. The standard modes include: the amplitude of the audio signal to be output is amplified integrally and then output through a loudspeaker. The amplitude amplification factor in the standard mode is smaller than that of the medium-high frequency part in the large volume mode. For specific implementation of the standard mode, reference may be made to the description of OS interaction hereinafter, which is not repeated here.
When the electronic device exits the loud-volume mode and the speaker is used to output audio in the standard mode, the electronic device may also display an interface such as that shown in fig. 2 c, which is not described herein.
Optionally S76, it is detected whether the peripheral output audio is selected.
Specifically, if the electronic device detects that the peripheral device is connected, it may further detect whether the connected peripheral device is selected to output audio, and if the peripheral device is detected to be selected to output audio, continue to execute the subsequent S77; if it is detected that the peripheral device is not selected to output audio, the process goes to execution S72.
S76 is an optional step because in some embodiments the electronic device will necessarily select the connected peripheral device to output audio when it is connected, while in other embodiments other means, such as speakers, may still be selected to output audio when it is connected, reference may be made to the scenario shown in fig. 3 in the UI embodiment above, and speakers may still be selected to output audio when it is connected to both electronic device peripheral device a and device B. In the former case, the subsequent S77 or S78 is directly performed after detecting the connection of the peripheral device at S71.
S77, whether the audio is played in a large volume mode before the peripheral is selected is detected.
Specifically, after the electronic device detects that the peripheral device is adopted to output audio, detecting whether the audio is played in the large volume mode before the peripheral device is selected, and executing the subsequent S78 if the audio is played in the large volume mode before the peripheral device is selected; if it is detected that the selected peripheral is not in the loud mode before playing audio, a subsequent S79 is performed.
S78, exiting the large volume mode, and adopting the peripheral equipment to output audio in the standard mode.
Specifically, because the electronic device detects that the audio is played in the large-volume mode before the peripheral is selected, the electronic device needs to exit the large-volume mode, and the peripheral is adopted to output the audio in the standard mode. For specific implementation of the standard mode, reference may be made to the description of OS interaction hereinafter, which is not repeated here.
When the electronic device exits the high volume mode and adopts the peripheral device to output audio in the standard mode, the electronic device may further display interfaces such as the interface c in fig. 3, the interface c in fig. 4, and the interface c in fig. 6, which are not described in detail herein.
S79, continuing to use the standard mode, and adopting the peripheral to output audio in the standard mode.
Specifically, because the electronic device detects that the peripheral is not in the high volume mode before selecting the peripheral, the electronic device is equivalent to outputting the audio in the standard mode, the electronic device only needs to continue to use the standard mode, and the peripheral is adopted to output the audio in the standard mode. For specific implementation of the standard mode, reference may be made to the description of OS interaction hereinafter, which is not repeated here.
The foregoing S77-S79 are an alternative embodiment. Specifically, after it has been determined in S76 that the peripheral is selected to output audio, since there is no case of turning on a large volume when the peripheral is selected to output audio, it is unnecessary to perform S77, that is, to detect whether or not audio is played in a large volume mode before the peripheral is selected, it is possible to directly perform turning on a standard mode, and output audio in the standard mode using the peripheral.
Next, an Operating System (OS) interaction diagram of the electronic device corresponding to each application scenario in the foregoing fig. 1-6 will be described with reference to fig. 8 and 9, respectively.
AudioService, audioSystem, audioTrack, audioFlinger and Histen shown in fig. 8-9 are modules for managing audio devices and processing audio streams included in the electronic device, and for definition of these modules, reference is also made to the following detailed description at the software architecture of the electronic device, and specific roles of these modules are described in the following flow, and are not repeated here.
As shown in fig. 8, the OS interaction enabling the standard mode, the loud mode, includes the steps of:
s81, audioService of the electronic device obtains related information (audio device, volume) indicating audio output.
Specifically, audioService of the electronic device may obtain relevant information indicating audio output, where the audio output information includes, but is not limited to, any one or more of the following: audio devices, volume, etc. Wherein the audio device comprises a speaker, a headset, a sound box or the like, wherein the volume may specifically be AudioService determined by information of an operation acting on a volume key or a volume adjustment indicator bar.
For example, the related information indicating the audio output in S81 specifically indicates information that the electronic device employs a speaker and the speaker volume is set in the standard volume range, or indicates information that the electronic device employs headphones, sound, and the volume is in the standard volume range.
It is understood that AudioService of the electronic device may acquire related information indicating a plurality of audio outputs at the same time, for example, an employed audio device and a set volume, etc., or AudioService of the electronic device may acquire the audio device and the volume, respectively. Depending on the operation of switching the audio device with the triggering electronic device and the operation of adjusting the volume. One possible implementation described with reference to a and b in fig. 3 in the full text UI embodiment may be referred to with respect to the operation of switching audio devices. With respect to the operation of adjusting the volume, reference may be made in particular to one possible implementation as described in the previous UI embodiment in fig. 2 a and b.
S82, the AudioService of the electronic device determines an audio output mode, such as an enabling standard mode.
Specifically, audioService of the electronic device may determine the employed audio output mode according to the acquired related information indicating audio output.
As described above, when the electronic device employs the speaker and the speaker volume is within the large volume range, the large volume mode is enabled, and other scenes (when the speaker is employed and the speaker volume is within the standard volume range, when the earphone or the sound is employed, etc.), the standard mode is employed. For example, when the AudioService acquires the related information indicating audio output in S81, specifically information indicating that the electronic device employs a speaker and that the speaker volume is set within the standard volume range, it is determined that the standard mode is enabled.
S83, the AudioService of the electronic equipment sends an instruction for starting the standard mode to the audioSystem.
Specifically, after the AudioService of the electronic device determines the standard mode to be adopted, an instruction for starting the standard mode is sent to the AudioSystem.
S84, the audioSystem of the electronic equipment sends an instruction for indicating to start a standard mode to the audioFlinger.
Specifically, after the AudioSystem of the electronic device receives the instruction of sending the instruction of opening the standard mode by AudioService, the AudioSystem also sends the instruction of opening the standard mode to the AudioFlinger.
In the embodiment of the present application, the information included in the instruction for instructing to start the standard mode in S83 and S84 may be the same or different, but the function of the instruction is to instruct the receiver to start the standard mode, which is not limited in the embodiment of the present application.
In one implementation, the instruction to turn on the standard mode may include, for example, the following information: and the volume gain parameters corresponding to the volume set by the adopted audio equipment and the electronic equipment. And further, the AudioFlinger executes the following S85-S88 according to the foregoing parameters, that is, after receiving the audio stream to be played, the AudioFlinger processes the audio stream according to the volume gain parameter, and sends the processed audio stream to the corresponding audio driver, so that the audio driver controls the corresponding audio device to output audio.
In particular, the volume gain parameters corresponding to the volume in the standard mode include: standard volume gain parameters. The standard volume gain parameter is only used to instruct AudioFlinger to amplify the amplitude of the overall audio.
The standard volume gain parameter is the amplification factor corresponding to each volume level in the standard volume range. The standard volume gain parameters corresponding to different volumes have different values, and when the volume level is higher, the corresponding volume gain parameters are larger. For example, when the volume is at level 0, the corresponding volume gain parameter is 0, which corresponds to mute processing; for example, when the volume is level 1, the corresponding volume gain parameter is 0.0025, which corresponds to 0.0025 times of amplification; for another example, the corresponding volume gain parameter is 1 when the volume is at level 15, equal to 1 times the amplification, and so on. The specific numerical value of the standard volume gain parameter and the corresponding relation between the standard volume gain parameter and the volume level are not particularly limited.
S85, the AudioTrack of the electronic equipment receives the audio stream to be played.
Specifically, after an upper layer application of the electronic device initiates a service request for playing audio, an AudioTrack of the electronic device may receive an audio stream to be played.
The audio stream to be played may be an audio file provided by an upper layer application, such as music, video, or game, which is not limited by the embodiment of the present application.
In an embodiment of the present application, the original audio streams received by the AudioTrack at different times may be different, for example, the original audio stream received in a scene of outputting audio using a speaker in a standard volume range may include fourth audio, for example, the original audio stream received in a scene of outputting audio using an external audio device may include sixth audio.
S86, the AudioTrack of the electronic equipment writes the audio stream to be played into the AudioFlinger.
Specifically, after the AudioTrack of the electronic device receives the audio stream to be played, since the audio stream is an original audio stream, the audio stream needs to be written into an AudioFlinger, and the corresponding processing is performed on the original audio stream by the AudioFlinger according to the relevant parameters in the standard mode.
S87, audioFlinger of the electronic device processes the audio stream, including adjusting volume, resampling, etc.
Specifically, after the audioplayer of the electronic device receives the original audio stream to be played written by the AudioTrack, the processing of adjusting the volume of the original audio stream according to the volume gain parameter acquired in S84 is performed, and the volume is generally adjusted to be synchronously processed in the resampling process.
Resampling means that the adoption rate of the original audio stream is converted into a new adoption rate, and under some application scenes, the accuracy of the audio stream needs to be improved, so that the sampling rate after resampling is higher than the adoption rate of the original audio stream, and corresponds to other scenes, such as a voice recognition scene, the purpose of voice recognition can be achieved only by the lower sampling rate, and therefore, the cached data volume can be reduced, and the data processing flow is simplified.
Adjusting the volume refers to amplifying the overall amplitude of the original audio stream by a corresponding multiple according to the standard volume gain parameter. For example, when the standard volume gain parameter is 0, the overall amplitude of the original audio stream is adjusted to 0; when the standard volume gain parameter is 1, the overall amplitude of the original audio stream is amplified by 1 time.
In the embodiment of the present application, the audio obtained by amplifying the original audio stream, for example, the fourth audio, may also be referred to as a fifth audio, and the audio obtained by amplifying the original audio stream, for example, the sixth audio, may also be referred to as a seventh audio.
And S88, the AudioFlinger of the electronic equipment sends the processed audio stream to an audio driver.
Specifically, after the AudioFlinger of the electronic device processes the audio stream according to the standard volume gain parameter, the processed audio stream is sent to the corresponding audio driver, so that the audio driver controls the corresponding audio device to output audio.
In other embodiments, the electronic device starts the standard mode, which is equivalent to that the audioplayer uses the parameters in the standard mode to process the audio stream to be played, but whether the audio stream is played depends on the user operation, so S85-S88 is not an essential operation.
The above S81-S88 merely describe specific implementation steps of the electronic device to enable the standard mode to output audio. Next, specific implementation steps of enabling the high volume mode according to the user operation by the electronic device are described through S89-S100.
In addition, in the process of the electronic device performing S81-S88 described above, audioService of the electronic device may acquire relevant information indicating audio output again at any time, depending on when the user inputs audio output related operations, such as adjusting volume, switching audio devices, and the like. Thus S99-S100 may trigger execution at any time in S81-S88. In addition, the electronic device may also be configured to activate the high volume mode and then the standard mode according to the user operation, that is, to execute S89-S100 first and then S81-S84 (optionally including S85-S88),
S89, audioService of the electronic device obtains related information (audio device, volume) indicating audio output.
The description of S89 may refer to the description of S81 above, and will not be repeated here.
Unlike S81, the related information indicating audio output in S89 is different from the related information indicating audio output in S81. For example, the related information indicating audio output in S81 specifically indicates information that the electronic device employs a speaker and that the speaker volume is set within the standard volume range. And the related information indicating the audio output in S89 specifically indicates information that the electronic device employs a speaker and that the speaker volume is set in a large volume range.
S90, the AudioService of the electronic device determines an audio output mode, such as enabling a high volume mode.
The description of S90 may refer to the description of S82 above, and will not be repeated here.
Unlike S82, the audio output mode determined in S90 is a loud volume mode.
S91, the AudioService of the electronic equipment sends an instruction for starting a large volume mode to the audioSystem.
Specifically, after the AudioService of the electronic device determines the large volume mode adopted, an instruction for starting the large volume mode is sent to the AudioSystem.
S92, the audioSystem of the electronic equipment sends an instruction for starting a large volume mode to the AudioFlinger.
Specifically, after the AudioSystem of the electronic device receives the instruction of sending the input instruction to turn on the high volume from the AudioService, the AudioSystem also sends the instruction to turn on the high volume mode to the AudioFlinger.
In the embodiment of the present application, the information included in the instruction for instructing to turn on the standard mode in S91 and S92 may be the same or different, but the function of the instruction is to instruct the receiving party to turn on the large volume mode, which is not limited in the embodiment of the present application.
In one implementation, the instruction to turn on the loud volume mode may include, for example, the following information: and the volume gain parameters corresponding to the volume set by the adopted audio equipment and the electronic equipment. And further, the AudioFlinger executes the subsequent S96-S100 according to the foregoing parameters, that is, after receiving the audio stream to be played, the AudioFlinger primarily processes the audio stream according to the volume gain parameter, calls Histen to further process the primarily processed audio stream, and then sends the finally processed audio stream to the corresponding audio driver, so that the audio driver controls the corresponding audio device to output audio.
Unlike the volume gain parameters corresponding to the volume in the standard mode, the volume gain parameters in the large volume mode include: standard volume gain parameters and large volume gain parameters. The standard volume gain parameter is used for indicating the AudioFlinger to amplify the amplitude of the whole audio, and the large volume gain parameter is used for indicating the AudioFlinger to call Histen to amplify the amplitude of the middle-high frequency part in the whole audio.
The standard volume gain parameter is an amplification factor (e.g. 1) corresponding to a volume level (e.g. 15 levels) in the standard volume range, which is equivalent to amplifying the audio amplitude by a corresponding factor.
The loud gain parameter is not the amplification factor itself, but corresponds to the amplification factor, and the correspondence may be: the value of the large volume gain parameter is equal to 10 multiplied by the logarithm of the base 10 of the amplification of the audio amplitude. The large volume gain parameter corresponds to a volume level in a large volume range, and the corresponding relationship is that when the volume level is larger, the corresponding large volume gain parameter value is higher, for example, when the volume level is 16 levels, the corresponding large volume gain parameter value is 2dB, which is equivalent to amplifying the audio amplitude by about 1.25 times. The application does not limit the specific value of the large volume gain parameter and the corresponding relation between the large volume gain parameter and the volume level. In addition, the large volume gain parameter may be a magnification factor, which is not limited in the present application.
S93, the audioFlinger of the electronic equipment sends an instruction for indicating to start a large volume mode to Histen.
Specifically, after the AudioFlinger of the electronic device receives the instruction of the AudioSystem to start the large volume mode, the AudioFlinger also sends the instruction of the AudioFlinger to start the large volume mode.
In the embodiment of the present application, the information included in the instruction for indicating to start the standard mode in S91-S93 may be the same or different, but the function of the instruction is to indicate to the receiver to start the standard mode, which is not limited in the embodiment of the present application.
In one implementation, the instruction in S93 indicating to turn on the standard mode may include, for example, a loud gain parameter.
S94, the AudioTrack of the electronic device receives the audio stream to be played.
For the description of S94, reference is made to the foregoing description of S85, which is not repeated here.
In the embodiment of the application, the original audio streams received by the AudioTrack at different times may be different, for example, the original audio streams received in a scene of outputting audio in a large volume range by using a loudspeaker may include first audio and eighth audio.
S95, the AudioTrack of the electronic equipment writes the audio stream to be played into the AudioFlinger.
For the description of S95, reference is made to the description of S86 above, and the description is omitted here.
S96, the audioFlinger of the electronic equipment primarily processes the audio stream, including volume adjustment, resampling and the like.
For the description of S96, reference is made to the foregoing description of S87, which is not repeated here.
Unlike S87, adjusting the volume in S96 includes: the overall amplitude of the original audio stream is amplified by a corresponding factor in accordance with the standard volume gain parameter (e.g., the gain parameter value corresponding to the maximum volume level within the standard volume range, i.e., 1). For example, when the volume gain parameter is 1, the overall amplitude of the original audio stream is amplified by about 1.
In the embodiment of the present application, the audio obtained by amplifying an original audio stream, for example, the first audio, may also be referred to as the second audio, and the audio obtained by amplifying an original audio stream, for example, the eighth audio, may also be referred to as the ninth audio.
S97, the audioFlinger of the electronic equipment sends the audio stream after preliminary processing to Histen.
Specifically, after the AudioFlinger of the electronic device performs preliminary processing on the audio stream according to the standard volume gain parameter, the preliminarily processed audio stream is sent to Histen, so that the Histen performs further processing on the preliminarily processed audio stream according to the large volume gain.
S98, histen of the electronic equipment further amplifies the volume of the primarily processed audio stream.
Specifically, the Histen of the electronic device adopts a large volume gain parameter to further amplify the volume of the audio stream after the preliminary processing, and specifically includes: and selecting a middle-high frequency part in the primarily processed audio stream, amplifying the amplitude of the audio stream of the middle-high frequency part according to the amplification factor corresponding to the large volume gain parameter, and then combining the amplified middle-high frequency part with other un-amplified frequency parts to obtain the finally processed audio stream.
In the embodiment of the present application, audio obtained by amplifying a primarily processed audio stream, for example, second audio, sent by AudioFlinger, by Histen may also be referred to as third audio, and audio obtained by amplifying a primarily processed audio stream, for example, ninth audio, may also be referred to as tenth audio.
The medium-high frequency may be 1280Hz to 2560Hz, for example, and the numerical value is not particularly limited in the embodiment of the present application.
S99, the Histen of the electronic equipment returns the final processed audio stream to the audioFlinger.
And S100, the AudioFlinger of the electronic equipment sends the finally processed audio stream to an audio driver.
Specifically, after receiving the final processed audio stream returned by Histen, the AudioFlinger of the electronic device sends the final processed audio stream to the corresponding audio driver, so that the audio driver controls the speaker to output audio.
Because the final processed audio stream is the volume which is primarily amplified under the highest volume level in the standard volume range, the medium-high frequency part in the audio stream is further amplified, so that the user can hear the loud and clear audio output by the loudspeaker.
In addition, in the embodiment of the present application, if the electronic device is connected to the peripheral device (i.e. the peripheral device is selected to output audio), the large volume mode is not applied, and only if the electronic device is not connected to the peripheral device (i.e. the peripheral device is selected to output audio), the large volume mode may be applied. Thus, accessing the peripheral device, or pulling the peripheral device, may also trigger the electronic device to switch audio output modes.
Therefore, the application also provides another OS interaction method, which can determine whether to switch the audio output mode according to the audio output mode of the electronic equipment application before the access/extraction under the triggering of the access/extraction of the peripheral equipment. The method comprises the following steps:
As shown in fig. 9, the OS interaction method includes the steps of:
s111, the AudioService of the electronic equipment acquires information of accessing the peripheral equipment.
Specifically, when the electronic device is only connected to the peripheral device and the volume is not adjusted, the AudioService of the electronic device can only acquire the information of the connected peripheral device.
It is understood that the information that the AudioService of the electronic device obtains the access peripheral in S111 may also be understood as that the electronic device selects the peripheral to output audio, for example, in the scenario shown in fig. 3 or fig. 5 in the UI embodiment described above.
Unlike S81 or S89 described above, audioService at this time receives only information of accessing the peripheral device, and does not contain information of volume adjustment.
S112, the AudioService of the electronic device obtains the audio output mode of the current application, such as a large volume mode, from Histen.
Specifically, after the AudioService of the electronic device obtains the information of accessing the peripheral device, the audio output mode of the current application can be obtained through Histen, so that whether the audio output mode is switched later or not is determined, or the audio output mode is kept unchanged, and if the audio output mode is kept unchanged, the subsequent S113-S115 is not required to be executed.
S113, the AudioService of the electronic device determines an audio output mode, such as exiting the high volume mode.
Specifically, when the AudioService of the electronic device obtains from Histen that the currently applied audio output mode is the high-volume mode, and when the electronic device is connected to the peripheral device (corresponding to selecting the peripheral device to output audio), the audio output mode is not needed to be used by the peripheral device, so that the AudioService determines to exit the high-volume mode.
In addition, if AudioService of the electronic device obtains that the currently applied audio output mode is the standard mode from Histen, and the electronic device is connected to the peripheral device to output audio in a manner equivalent to that of using the peripheral device, since the audio output by the peripheral device does not need to be in the high volume mode, the high volume mode is determined to be continuously used.
S114, the AudioService of the electronic equipment sends an instruction for exiting the high volume mode to the AudioFlinger.
Specifically, after receiving an instruction that AudioService sends an instruction to exit from a large volume mode, an audiofilter of an electronic device may switch parameters for processing an audio stream from parameters in the large volume mode to parameters in a standard mode, where the parameters in the standard mode may include: standard gain parameters used the last time standard mode was used. For a specific implementation of processing the audio stream with respect to the standard gain parameter adopted by AudioFlinger, reference is made to the foregoing detailed description of S87, which is not repeated here.
S115, the audioFlinger of the electronic equipment sends an instruction for exiting the high volume mode to Histen.
Specifically, after receiving the instruction of the AudioFlinger to exit the large volume mode, the Histen of the electronic device does not use the large volume gain parameter adopted before to process the audio stream.
S111-S115 above only describe specific implementation steps for triggering the electronic device to switch audio output modes when the electronic device is connected to a peripheral device. Next, a specific implementation step of the electronic device pulling out the peripheral device to trigger the electronic device to switch the audio output mode is described through S116-S120.
In addition, in the process of the electronic device performing S111-S115 described above, audioService of the electronic device may acquire the unplugged peripheral information at any time, depending on when the user unplugs the peripheral or switches related operations of the audio device. Thus S116-S120 may trigger execution at any time in S111-S115.
S116, the AudioService of the electronic equipment acquires information of the extracted peripheral equipment.
Specifically, when the electronic device is only plugged into the peripheral device and the volume is not adjusted, the AudioService of the electronic device can only acquire information of unplugging the peripheral device.
It is understood that the information that the AudioService of the electronic device acquires the unplugged peripheral device in S116 may also be understood as that the electronic device selects a speaker to output audio, for example, the scenario shown in fig. 4 or fig. 6 in the foregoing UI embodiment.
Unlike S81 or S89 described above, audioService at this time receives only information of pulling out the peripheral device, and does not contain information of volume adjustment.
S117, the AudioService of the electronic device obtains the audio output mode of the current application, such as a standard mode, from Histen.
Specifically, after the AudioService of the electronic device acquires the information of the pulled-out peripheral device, the audio output mode of the current application can be acquired through Histen, so that whether the audio output mode is switched later or not is determined, or the audio output mode is kept unchanged, and if the audio output mode is kept unchanged, the subsequent S118-S120 is not required to be executed.
S118, the AudioService of the electronic device determines an audio output mode, such as a large volume mode.
Specifically, when the AudioService of the electronic device obtains from Histen that the currently applied audio output mode is the standard mode, and when the electronic device pulls out the peripheral device (which is equivalent to selecting the speaker to output audio), the AudioService determines to turn on the audio mode again because the audio is in the audio mode when the speaker is used to output audio last time.
S119, the AudioService of the electronic equipment sends an instruction for starting a large volume mode to the AudioFlinger.
Specifically, after receiving an instruction that AudioService sends a large volume mode starting instruction, an audiofilter of the electronic device may switch parameters for processing an audio stream from parameters in a standard mode to parameters in a large volume mode, where the parameters in the large volume mode may include: the standard gain parameter and the high volume gain parameter used when the high volume mode was last used. For a specific implementation of preliminary processing of the audio stream with respect to the standard gain parameter adopted by AudioFlinger, reference may be made to the foregoing detailed description of S96, which is not repeated here.
S120, the audioFlinger of the electronic equipment sends an instruction for starting a large volume mode to Histen.
Specifically, after receiving the instruction of starting the large volume mode sent by the AudioFlinger, the Histen of the electronic device switches to the large volume gain parameter adopted before to process the audio stream. Specific implementation of processing the audio stream with respect to the large volume gain parameter employed by Histen may refer to the foregoing detailed description of S98, and will not be repeated here.
It can be seen that, the OS interaction method shown in fig. 9 is different from the OS interaction method shown in fig. 8 in that, under each time of receiving the trigger of accessing/extracting the peripheral device, audioService in fig. 9 obtains the audio output mode currently being applied from the Histen, so as to determine whether to switch the audio output mode according to the information of accessing/extracting the peripheral device and the audio output mode currently being applied together, and if not, the subsequent steps are not repeated. However, the AudioService in fig. 8 does not consider the audio output mode currently being applied each time it receives the trigger of the related information indicating the audio output, and thus may cause the audio output modes applied before and after the related information indicating the audio output to be the same, but the AudioService may additionally perform the subsequent steps such as (S83-S84 or S81-S83).
The software system of the electronic device may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Embodiments of the application are configured in a layered mannerThe system is an example illustrating the software architecture of an electronic device.
Fig. 10 is a schematic software architecture of an electronic device according to an embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, it willThe system is divided into four layers, namely an Application layer, an Application Framework layer, an Android run layer and a Kernel layer from top to bottom.
The application layer may include a series of application packages. As shown in fig. 10, the application package may include applications such as music, video, talk, bluetooth, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in fig. 10, the application framework layer may include an audio service (AudioService), an audio system (AudioSystem), an audio track (AudioTrack), an audio server (AudioServer), and the like. The AudioServer includes an audio manager (audioplayer) and an algorithm module (e.g., a Histen module).
The AudioService is a system-level audio service, and is used for providing related services of audio playing class for each application. AudioService may be used to detect service requests such as volume adjustment, audio start or stop, etc. initiated by each application, and respond to the requests to start scheduling related modules to execute responsive tasks, for example, notifying the AudioSystem. AudioService is also used to achieve synchronization of volume on UI.
The AudioSystem corresponds to an internal class of AudioService, and serves as a bridge for interaction between the java layer and the active layer to be called by AudioService. The method and the device can be particularly used for receiving the volume adjustment information sent by the AudioService. The AudioSystem is correspondingly further used for controlling the AudioFlinger to execute related tasks according to instructions sent by AudioService.
The AudioTrack provides an interface for playing audio, and the AudioTrack can only play audio streams in PCM format.
The audioplayer is responsible for management of audio stream devices and processing and transmitting audio stream data (AudioStream), and specifically includes: volume calculation, resampling, mixing, etc. Wherein, the volume calculation includes: the processing of the original audio stream according to the volume set by the user is usually done during the resampling phase. The mixing includes: audio stream data of a plurality of APPs are received and combined into a PCM audio stream. And then sent to the responding device to output the audio.
runtimes include system libraries and virtual machines. />runtime is responsible for scheduling and management of the android system. The system library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: media Libraries (Media Libraries), surface managers (surface manager), etc. The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications. The media library may contain AudioSystem, audioTrack and AudioFlinger functional modules corresponding to the Framework layer.
Because of the majority of classes of the Framework layer, it is simply the application that uses the "intermediaries" of library files in the system library. Because the upper layer applications are written in java language, they need the most direct support of java interface, and the system library supports the operation of another language (such as C++ language), so the Framework layer acts as an intermediary between the application layer and the system library, and each module in the Framework layer does not really realize specific functions or only realizes a part of functions, but places the main center of gravity in the core library to finish. For example AudioSystem, audioTrack and AudioFlinger in the Framework layer also have corresponding classes in the system library, except that the Framework layer is mostly written in java language, and the system library is mostly written in c++ language.
The kernel layer is a layer between hardware and software. The kernel layer contains at least audio drivers, display drivers, bluetooth drivers, etc. The kernel layer is used for receiving instructions of the software layer, controlling corresponding hardware to execute corresponding tasks, such as an audio driver for receiving audio streams sent by the AudioFlinger, and controlling corresponding audio output devices (speakers, headphones and the like) to output the audio streams.
It will be appreciated that the software architecture illustrated in fig. 10 does not constitute a particular limitation of the electronic device. In other embodiments of the application, the electronic device may include more or less modules than shown, or certain modules may be combined, split, etc. The specific roles of the respective modules described in fig. 10 in the volume control method provided in the present application may also refer to the description of the foregoing OS interaction, which is not repeated herein.
Referring to fig. 11, fig. 11 shows a hardware architecture diagram of an electronic device.
The electronic device may be a mounted deviceOr other operating system, such as cell phones, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (mobile personal computer, UMPC), netbooks, and personal digital assistants (personal digital assistant, PDA), augmented reality (augmented reality, AR) devices, virtual Reality (VR) devices, artificial intelligence (artificial intelligence, AI) devices, wearable devices, vehicle devices, smart home devices and/or smart city devices, among others.
The electronic device may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, camera 193, display 194, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, an acceleration sensor 180C, and the like.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the application, the electronic device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can be a neural center and a command center of the electronic device. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In an embodiment of the present application, processor 110 is a multi-core processor, i.e., includes multiple core processors, e.g., one or more large cores, one or more small cores. Wherein, the performance of the large core processor is better than that of the small core processor, namely, when the thread is executed on the large core, the execution speed is faster than that of the small core.
In an embodiment of the present application, the processor 110 is configured to control the corresponding software and hardware modules to perform the methods described in fig. 7-9.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge an electronic device.
In the present application, the USB interface 130 may also be used to transfer data between an electronic device and a peripheral device, for example, to connect to a headset, through which audio is played.
It should be understood that the connection relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device. In other embodiments of the present application, the electronic device may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied on an electronic device. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. for application on an electronic device. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device implements display functions via a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD). The display panel may also be manufactured using organic light-emitting diode (OLED), active-matrix organic light-emitting diode (AMOLED), flexible light-emitting diode (flex-emitting diode), mini, micro-OLED, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device may include 1 or N display screens 194, N being a positive integer greater than 1.
In the embodiment of the present application, the electronic device may display, for example, the user interface shown in fig. 2 to 6 and the like provided in the foregoing UI embodiment through the display screen 194, which is not described herein.
The electronic device may implement shooting functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, so that the electrical signal is converted into an image visible to the naked eye. ISP can also perform algorithm optimization on noise and brightness of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, and so on.
Video codecs are used to compress or decompress digital video. The electronic device may support one or more video codecs. In this way, the electronic device may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of electronic devices can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (NVM).
The random access memory may include a static random-access memory (SRAM), a dynamic random-access memory (dynamic random access memory, DRAM), a synchronous dynamic random-access memory (synchronous dynamic random access memory, SDRAM), a double data rate synchronous dynamic random-access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as fifth generation DDR SDRAM is commonly referred to as DDR5 SDRAM), etc.;
the nonvolatile memory may include a disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. divided according to an operation principle, may include single-level memory cells (SLC), multi-level memory cells (MLC), triple-level memory cells (TLC), quad-level memory cells (QLC), etc. divided according to a storage specification, may include universal FLASH memory (english: universal FLASH storage, UFS), embedded multimedia memory cards (embedded multi media Card, eMMC), etc. divided according to a storage specification.
The random access memory may be read directly from and written to by the processor 110, may be used to store executable programs (e.g., machine instructions) for an operating system or other on-the-fly programs, may also be used to store data for users and applications, and the like.
The nonvolatile memory may store executable programs, store data of users and applications, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
The external memory interface 120 may be used to connect external non-volatile memory to enable expansion of the memory capabilities of the electronic device. The external nonvolatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external nonvolatile memory.
The electronic device may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device may listen to music, or to hands-free conversations, through speaker 170A. In an embodiment of the present application, the electronic device may select to output audio using the speaker 170A according to the operation of the audio output device selected by the user. In this scenario, if the electronic device sets the speaker volume to a large volume range, the processor 110 controls the corresponding software and hardware module to execute the foregoing method flow, so that the speaker 170A outputs loud audio, so that the user can hear the audio content.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the electronic device picks up a phone call or voice message, the voice can be picked up by placing the receiver 170B close to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device may be provided with at least one microphone 170C. In other embodiments, the electronic device may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronics determine the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The touch sensor 180B, also referred to as a "touch panel". The touch sensor 180B may be disposed on the display 194, and the touch sensor 180B and the display 194 form a touch screen, which is also referred to as a "touch screen". The touch sensor 180B is used to detect a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180B may also be disposed on the surface of the electronic device at a different location than the display 194.
In the present application, the electronic device may detect the operation of adjusting the volume or switching the audio device, which acts on the display screen 194, through the pressure sensor 180A and the touch sensor 180B, so that the electronic device may perform the tasks of adjusting the volume and switching the device in response to the operation.
In the embodiment of the present application, the electronic device may further determine the motion gesture of the electronic device through the acceleration on the X, Y, Z triaxial detected on the acceleration sensor 180C, for example, whether the user lifts or lifts the electronic device.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device.
In the application, the electronic equipment can detect the operation for adjusting the volume through the volume key, so that the electronic equipment can execute the task of adjusting the volume in response to the operation.
It should be understood that each step in the above method embodiments provided by the present application may be implemented by an integrated logic circuit of hardware in a processor or an instruction in software form. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
The present application also provides an electronic device, which may include: memory and a processor. Wherein the memory is operable to store a computer program; the processor may be operative to invoke a computer program in the memory to cause the electronic device to perform the method of any of the embodiments described above.
The application also provides a chip system comprising at least one processor for implementing the functions involved in the method performed by the electronic device in any of the above embodiments.
In one possible design, the system on a chip also includes a memory to hold program instructions and data, the memory being located either within the processor or external to the processor.
The chip system may be formed of a chip or may include a chip and other discrete devices.
Alternatively, the processor in the system-on-chip may be one or more. The processor may be implemented in hardware or in software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general purpose processor, implemented by reading software code stored in a memory.
Alternatively, the memory in the system-on-chip may be one or more. The memory may be integral with the processor or separate from the processor, and embodiments of the present application are not limited. The memory may be a non-transitory processor, such as a ROM, which may be integrated on the same chip as the processor, or may be separately provided on different chips, and the type of memory and the manner of providing the memory and the processor are not particularly limited in the embodiments of the present application.
Illustratively, the system-on-chip may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated chip (application specific integrated circuit, ASIC), a system on chip (SoC), a central processing unit (central processor unit, CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), a microcontroller (micro controller unit, MCU), a programmable controller (programmable logic device, PLD) or other integrated chip.
The present application also provides a computer program product comprising: a computer program (which may also be referred to as code, or instructions), which when executed, causes a computer to perform the method performed by the electronic device in any of the embodiments described above.
The present application also provides a computer-readable storage medium storing a computer program (which may also be referred to as code, or instructions). The computer program, when executed, causes a computer to perform the method performed by the electronic device in any of the embodiments described above.
The embodiments of the present application may be arbitrarily combined to achieve different technical effects.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flowchart or a function in accordance with the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
In summary, the foregoing description is only exemplary embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention should be included in the protection scope of the present invention.

Claims (30)

1. A method of volume control, the method comprising:
receiving a first operation for adjusting a volume from a first volume to a second volume, the second volume being greater than the first volume;
amplifying the whole amplitude of the first audio to obtain a second audio;
amplifying the audio amplitude in the preset frequency range in the second audio to obtain a third audio;
Outputting the third audio through a speaker.
2. The method of claim 1, wherein the first volume is less than or equal to a volume threshold and the second volume is greater than the volume threshold;
amplifying the overall amplitude of the first audio specifically includes: and amplifying the whole amplitude of the first audio according to the gain corresponding to the volume threshold.
3. The method of claim 2, wherein the volume threshold is a maximum volume adjustable on the electronic device for an external audio device.
4. A method according to any one of claims 1-3, wherein amplifying the audio amplitude in the second audio within a preset frequency range specifically comprises:
and amplifying the audio amplitude in the preset frequency range in the second audio according to the gain corresponding to the second volume.
5. The method of any of claims 1-4, wherein prior to amplifying the audio amplitude in the second audio that is within the preset frequency range, the method further comprises performing any of:
receiving an operation for selecting use of the speaker;
Or, in the case that the external audio device is not accessed, an operation for playing the media audio is received.
6. The method of any of claims 1-5, wherein after receiving a first operation to adjust the volume from the first volume to the second volume, the method further comprises:
and displaying first prompt information, wherein the first prompt information is used for prompting a user that the high volume mode is started.
7. The method of any of claims 1-6, wherein after receiving a first operation to adjust the volume from the first volume to the second volume, the method further comprises:
displaying the volume adjustment indication bar, and switching the display state of the volume adjustment indication bar from the first state to the second state;
the first state includes: displaying a first color corresponding to the first volume in a first area in the volume adjustment indication bar;
the second state includes: displaying a first color corresponding to the volume threshold in a second area in the volume adjustment indication bar, and displaying a second color corresponding to the second volume in a third area in the volume adjustment indication bar; the second region is greater than or equal to the first region.
8. The method of any of claims 1-7, wherein after receiving a first operation to adjust the volume from the first volume to the second volume, the method further comprises:
receiving a second operation for adjusting the volume from the second volume to a third volume, the third volume being less than the second volume;
amplifying the whole amplitude of the fourth audio to obtain a fifth audio;
outputting the fifth audio through the speaker.
9. The method of claim 8, wherein the third volume is less than or equal to a volume threshold and the second volume is greater than the volume threshold;
amplifying the overall amplitude of the fourth audio specifically includes: and amplifying the whole amplitude of the fourth audio according to the gain corresponding to the third volume.
10. The method of claim 9, wherein the volume threshold is a maximum volume adjustable on the electronic device for an external audio device.
11. The method according to any one of claims 8-10, wherein after receiving a second operation for adjusting the volume from the second volume to a third volume, the method further comprises:
And displaying second prompt information, wherein the second prompt information is used for prompting the user that the high volume mode is exited.
12. The method according to any one of claims 8-11, wherein after receiving a second operation for adjusting the volume from the second volume to a third volume, the method further comprises:
displaying the volume adjustment indication bar, and switching the display state of the volume adjustment indication bar from the second state to the third state;
the second state includes: displaying a first color corresponding to the volume threshold in a second area in the volume adjustment indication bar, and displaying the second volume second color in a third area in the volume adjustment indication bar;
the third state includes: displaying a first color corresponding to the third volume in a fourth area in the volume adjustment indication bar; the fourth region is less than or equal to the second region.
13. The method of any of claims 1-8, wherein after receiving a first operation to adjust the volume from the first volume to the second volume, the method further comprises:
determining to select an external audio device to output audio;
Amplifying the whole amplitude of the sixth audio to obtain a seventh audio;
and outputting the seventh audio through an external audio device.
14. The method of claim 13, wherein amplifying the overall amplitude of the sixth audio specifically comprises: and amplifying the whole amplitude of the sixth audio according to a gain corresponding to a fourth volume, wherein the fourth volume is the volume set when the audio is output through the external audio equipment last time.
15. Method according to claim 13 or 14, characterized in that the selection of a peripheral device for outputting audio is determined in particular by:
accessing the external equipment;
or selecting the external device from the accessed devices as an audio output device.
16. The method of any of claims 13-15, wherein after determining to select a peripheral device to output audio, the method further comprises:
and displaying second prompt information, wherein the second prompt information is used for prompting the user that the high volume mode is exited.
17. The method of any of claims 13-16, wherein after determining to select a peripheral device to output audio, the method further comprises:
Displaying the volume adjustment indication bar, and switching the display state of the volume adjustment indication bar from the second state to the fourth state;
the second state includes: displaying a first color corresponding to the volume threshold value in a second area in the volume adjustment indication bar, and displaying a second color corresponding to the second volume in the second area in the volume adjustment indication bar;
the fourth state includes: displaying the first color corresponding to the fourth volume in a fifth area in the volume adjustment indication bar; the fifth region is less than or equal to the second region.
18. The method of any of claims 13-17, wherein after determining to select a peripheral device to output audio, the method further comprises:
determining to select the speaker to output audio;
amplifying the whole amplitude of the eighth audio to obtain a ninth audio;
amplifying the audio amplitude in the preset frequency range in the ninth audio to obtain tenth audio;
outputting the tenth audio through the speaker.
19. The method of claim 18, wherein amplifying the overall amplitude of the eighth audio specifically comprises: and amplifying the whole amplitude of the eighth audio according to the gain corresponding to the volume threshold.
20. The method of claim 19, wherein the volume threshold is a maximum volume adjustable on the electronic device for an external audio device.
21. The method according to any one of claims 18-20, wherein amplifying the audio amplitude in the ninth audio within a preset frequency range specifically comprises:
and amplifying the audio amplitude in the preset frequency range in the ninth audio according to the gain corresponding to the second volume.
22. The method of any of claims 18-20, wherein after determining to select the speaker to output audio, the method further comprises:
and displaying first prompt information, wherein the first prompt information is used for prompting a user that the high volume mode is started.
23. Method according to claim 12 or 13, characterized in that the selection of the loudspeaker for outputting audio is determined in particular by:
extracting the external audio equipment;
alternatively, the speaker is selected from the accessed devices as the audio output device.
24. The method according to any one of claims 1-23, wherein the predetermined frequency range is a range corresponding to medium-high frequencies.
25. The method of any one of claims 1-24, wherein the speaker is further coupled to a power amplifier circuit, wherein audio output by the speaker is distorted when audio having a magnitude greater than a threshold is input to the power amplifier circuit and a path of the speaker.
26. The method according to any one of claims 1-25, wherein amplifying the overall amplitude of the first audio comprises:
and the audio manager amplifies the whole amplitude of the first audio according to the gain corresponding to the volume threshold.
27. The method according to any one of claims 1-26, wherein amplifying the audio amplitude in the second audio within a preset frequency range, in particular comprises:
and amplifying the audio amplitude in the preset frequency range in the second audio by calling an algorithm module according to the gain corresponding to the second volume.
28. An electronic device comprising one or more audio output devices, a screen, a memory, one or more processors; the memory is coupled with the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors invoke to cause the electronic device to perform the method of any of claims 1-27.
29. A chip for application to an electronic device, the chip comprising one or more audio output devices, one or more processors to invoke computer instructions to cause the electronic device to perform the method of any of claims 1-27.
30. A computer readable storage medium comprising instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-27.
CN202310475336.2A 2023-04-25 2023-04-25 Volume control method, graphic interface and related device Pending CN117119349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310475336.2A CN117119349A (en) 2023-04-25 2023-04-25 Volume control method, graphic interface and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310475336.2A CN117119349A (en) 2023-04-25 2023-04-25 Volume control method, graphic interface and related device

Publications (1)

Publication Number Publication Date
CN117119349A true CN117119349A (en) 2023-11-24

Family

ID=88806188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310475336.2A Pending CN117119349A (en) 2023-04-25 2023-04-25 Volume control method, graphic interface and related device

Country Status (1)

Country Link
CN (1) CN117119349A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009027292A (en) * 2007-07-18 2009-02-05 Sony Corp Electronic apparatus
CN102436821A (en) * 2011-12-02 2012-05-02 海能达通信股份有限公司 Method for adaptively adjusting sound effect and equipment thereof
CN107517428A (en) * 2016-06-17 2017-12-26 中兴通讯股份有限公司 A kind of signal output method and device
CN111935429A (en) * 2020-07-06 2020-11-13 瑞声新能源发展(常州)有限公司科教城分公司 Sound quality self-adaptive adjusting method, related system and equipment and storage medium
CN113674760A (en) * 2020-05-14 2021-11-19 苹果公司 System and method for determining audio output device type
CN114879929A (en) * 2022-04-11 2022-08-09 维沃移动通信有限公司 Multimedia file playing method and device
WO2022206681A1 (en) * 2021-03-30 2022-10-06 华为技术有限公司 Window display method and related apparatus
WO2022257563A1 (en) * 2021-06-07 2022-12-15 华为技术有限公司 Volume adjustment method, and electronic device and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009027292A (en) * 2007-07-18 2009-02-05 Sony Corp Electronic apparatus
CN102436821A (en) * 2011-12-02 2012-05-02 海能达通信股份有限公司 Method for adaptively adjusting sound effect and equipment thereof
CN107517428A (en) * 2016-06-17 2017-12-26 中兴通讯股份有限公司 A kind of signal output method and device
CN113674760A (en) * 2020-05-14 2021-11-19 苹果公司 System and method for determining audio output device type
CN111935429A (en) * 2020-07-06 2020-11-13 瑞声新能源发展(常州)有限公司科教城分公司 Sound quality self-adaptive adjusting method, related system and equipment and storage medium
WO2022206681A1 (en) * 2021-03-30 2022-10-06 华为技术有限公司 Window display method and related apparatus
WO2022257563A1 (en) * 2021-06-07 2022-12-15 华为技术有限公司 Volume adjustment method, and electronic device and system
CN114879929A (en) * 2022-04-11 2022-08-09 维沃移动通信有限公司 Multimedia file playing method and device

Similar Documents

Publication Publication Date Title
CN109559270B (en) Image processing method and electronic equipment
WO2020062159A1 (en) Wireless charging method and electronic device
WO2021083128A1 (en) Sound processing method and apparatus thereof
CN111522425A (en) Power consumption control method of electronic equipment and electronic equipment
CN114461057A (en) VR display control method, electronic device and computer readable storage medium
CN116231815B (en) Method for controlling charging and electronic equipment
WO2023071502A1 (en) Volume control method and apparatus, and electronic device
CN113590346B (en) Method and electronic equipment for processing service request
CN111586433B (en) Code rate adjusting method, device, equipment and storage medium
CN116828100A (en) Bluetooth audio playing method, electronic equipment and storage medium
CN117119349A (en) Volume control method, graphic interface and related device
CN116540908A (en) Application layout control method and related device
CN116991302B (en) Application and gesture navigation bar compatible operation method, graphical interface and related device
CN116700556B (en) Card generation method and related device
CN117221713B (en) Parameter loading method and electronic equipment
CN117013660B (en) Charging icon display method and electronic equipment
WO2024046416A1 (en) Volume adjustment method, electronic device and system
CN116744187B (en) Speaker control method and device
CN116055632B (en) Incoming call processing method, electronic equipment and storage medium
WO2023246783A1 (en) Method for adjusting device power consumption and electronic device
CN118158313A (en) Method, electronic device and system for displaying electric quantity
CN117119102A (en) Awakening method of voice interaction function and electronic equipment
CN118054851A (en) Equipment networking method and electronic equipment
CN117689776A (en) Audio playing method, electronic equipment and storage medium
CN116540970A (en) Volume adjustment method and electronic equipment

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