Volume control method, graphical interface and related device
By detecting the large -scale mode in the electronic device and amplifying the mid -high frequency part of the speaker output, the problem of not loud sound under large volume is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202411296291.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2025-01-28
AI Technical Summary
After the user turns the volume of the electronic device to a high volume, the sound he hears is still not loud, and the content cannot be heard clearly.
When the electronic device detects a large volume and uses a speaker output audio, the amplitude of the medium and high frequency part of the audio signal to be output is amplified before the speaker is output.
Because the human ear is more sensitive to medium and high frequency, only the amplitude of the medium and high frequency parts in the audio signal to be output is slightly large, which can make users clearly feel that the audio output effect is more loud, thereby improving the user experience.
Smart Images

Figure CN119383520A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular to a volume control method, a graphical interface and related devices. Background Art
[0002] After the user adjusts the volume of the electronic device to a high volume, the sound heard is still not loud, and the content cannot be heard clearly. How to solve this problem is an issue that needs to be solved urgently. Summary of the invention
[0003] The present application provides a volume control method, a graphical interface and related devices. In this method, when the electronic device detects that a high volume is set and uses a speaker to output audio, the electronic device amplifies the amplitude of the mid-high frequency part of the audio signal to be output and then outputs it through the speaker. In this way, since the human ear is more sensitive to mid-high frequencies, only slightly amplifying the amplitude of the mid-high frequency part of the audio signal to be output can make the user obviously feel that the audio output effect is louder, thereby improving the user experience.
[0004] In a first aspect, the present application provides a volume control method, the method comprising: receiving a first operation for adjusting the volume from a first volume to a second volume, the second volume being greater than the first volume; amplifying the overall amplitude of the first audio to obtain the second audio; amplifying the audio amplitude within a preset frequency range in the second audio to obtain the third audio; and outputting the third audio through a speaker.
[0005] After implementing the method provided in the first aspect, when a loudspeaker is used to output audio at a high volume, the amplitude of the audio to be output can be amplified as a whole, and the amplitude of the mid-high frequency part can be further amplified. In this way, since the human ear is more sensitive to mid-high frequencies, it is only necessary to slightly amplify the amplitude of the mid-high frequency part of the audio signal to be output, so that the user can clearly feel that the audio output effect is louder, thereby improving the user experience.
[0006] In combination with 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: amplifying the overall amplitude of the first audio according to a gain corresponding to the volume threshold.
[0007] In this way, the volume can be divided into a standard volume range within and below the volume threshold, and a large volume range above the volume threshold. When the loudspeaker is used to output audio when the volume is within the large volume range, the amplitude of the audio to be output can be amplified as a whole, and the amplitude of the mid-high frequency part can be further amplified, thereby satisfying the user's demand for audio output loudness.
[0008] In combination with the method provided in the first aspect, the volume threshold is a maximum volume adjustable for an external audio device on the electronic device.
[0009] In this way, when the speaker is used to output audio, a volume level larger than the maximum adjustable volume of the external audio device can be set, thereby further increasing the loudness of the speaker when playing audio externally and improving the user experience.
[0010] In combination with the method provided in the first aspect, amplifying the audio amplitude in the preset frequency range in the second audio specifically includes: amplifying the audio amplitude in the preset frequency range in the second audio according to the gain corresponding to the second volume.
[0011] In combination with the method provided in the first aspect, before amplifying the audio amplitude within a preset frequency range in the second audio, the method also includes performing any one of the following: receiving an operation for selecting to use the speaker; or, when no external audio device is connected, receiving an operation for playing media audio.
[0012] In this way, the user can select the speaker to output audio through a variety of operation modes.
[0013] In combination with 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 a first prompt message, the first prompt message being used to prompt the user that the high volume mode has been turned on.
[0014] In this way, the purpose of prompting the user that the volume has been turned on can be achieved in a timely manner through prompt information, thereby improving the user experience.
[0015] In combination with the method provided in the first aspect, after receiving a first operation for adjusting the volume from a first volume to a second volume, the method further includes: displaying a volume adjustment indicator bar, and switching a display state of the volume adjustment indicator bar from a first state to a second state; the first state includes: displaying a first color corresponding to the first volume in a first area in the volume adjustment indicator bar; the second state includes: displaying a first color corresponding to the volume threshold in a second area in the volume adjustment indicator bar, and displaying a second color corresponding to the second volume in a third area in the volume adjustment indicator bar; the second area is greater than or equal to the first area.
[0016] In this way, the state of the volume adjustment indicator bar can be used to promptly remind the user that the volume has been turned on, thereby improving the user experience.
[0017] In combination with the method provided in the first aspect, after receiving a first operation for adjusting the volume from a first volume to a second volume, the method also includes: 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 overall amplitude of the fourth audio to obtain a fifth audio; and outputting the fifth audio through the speaker.
[0018] In this way, in a scenario where a speaker is used and audio is output at a high volume, the volume can be turned down according to a user operation to trigger exiting the high volume mode.
[0019] In combination with 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: amplifying the overall amplitude of the fourth audio according to a gain corresponding to the third volume.
[0020] In this way, the audio can be amplified according to the gain corresponding to the volume after the volume is turned down, thereby making the loudness of the audio output after the volume is turned down smaller.
[0021] In combination with the method provided in the first aspect, the volume threshold is a maximum volume adjustable for an external audio device on the electronic device.
[0022] In this way, when the speaker is used to output audio, a volume level larger than the maximum adjustable volume of the external audio device can be set, thereby further increasing the loudness of the speaker when playing audio externally and improving the user experience.
[0023] In combination with 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 a second prompt message, the second prompt message being used to prompt the user that the high volume mode has been exited.
[0024] In this way, the user can be promptly informed that the loud volume has been exited through a prompt message, thereby improving the user experience.
[0025] In combination with the method provided in the first aspect, after receiving a second operation for adjusting the volume from the second volume to the third volume, the method further includes: displaying a volume adjustment indicator bar, and switching a display state of the volume adjustment indicator bar from the second state to a third state; the second state includes: displaying a first color corresponding to the volume threshold in a second area in the volume adjustment indicator bar, and displaying a second color of the second volume in a third area in the volume adjustment indicator bar; the third state includes: displaying a first color corresponding to the third volume in a fourth area in the volume adjustment indicator bar; the fourth area is smaller than or equal to the second area.
[0026] In this way, the state of the volume adjustment indicator bar can be used to promptly remind the user that the high volume has been exited, thereby improving the user experience.
[0027] In combination with the method provided in the first aspect, after receiving a first operation for adjusting the volume from a first volume to a second volume, the method also includes: determining to select an external audio device to output audio; amplifying the overall amplitude of the sixth audio to obtain a seventh audio; and outputting the seventh audio through the external audio device.
[0028] In this way, in a scenario where a speaker is used and audio is output at a high volume, the audio output device can be switched to an external audio device according to a user operation, thereby triggering exit from the high volume mode.
[0029] In combination with the method provided in the first aspect, amplifying the overall amplitude of the sixth audio specifically includes: amplifying the overall amplitude of the sixth audio according to a gain corresponding to a fourth volume, where the fourth volume is the volume set when the audio was most recently output through the external audio device.
[0030] In this way, after switching the audio device, the volume set when the switched audio device was last used can be used by default to amplify the audio to be played.
[0031] In combination with the method provided in the first aspect, determining to select a peripheral device to output audio is specifically determined in the following manner: connecting the external device; or selecting the external device as the audio output device from the connected devices.
[0032] In this way, the selection of a peripheral device to output audio can be determined in a variety of ways, thereby improving the feasibility of the present application.
[0033] In combination with the method provided in the first aspect, after determining to select a peripheral device to output audio, the method further includes: displaying a second prompt message, the second prompt message being used to prompt the user that the high volume mode has been exited.
[0034] In this way, the user can be promptly informed that the loud volume has been exited through a prompt message, thereby improving the user experience.
[0035] In combination with the method provided in the first aspect, after determining to select a peripheral device to output audio, the method further includes: displaying a volume adjustment indicator bar, and switching the display state of the volume adjustment indicator 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 indicator bar, and displaying a second color corresponding to the second volume in a second area in the volume adjustment indicator bar; the fourth state includes: displaying the first color corresponding to the fourth volume in a fifth area in the volume adjustment indicator bar; the fifth area is smaller than or equal to the second area.
[0036] In this way, the state of the volume adjustment indicator bar can be used to promptly remind the user that the volume has been turned on, thereby improving the user experience.
[0037] In combination with the method provided in the first aspect, after determining to select a peripheral device to output audio, the method also includes: determining to select the speaker to output audio; amplifying the overall amplitude of the eighth audio to obtain a ninth audio; amplifying the audio amplitude within a preset frequency range in the ninth audio to obtain a tenth audio; and outputting the tenth audio through the speaker.
[0038] In this way, in a scenario where a speaker is used and audio is output at a high volume, after the audio output device is switched to an external audio device, switching back to the speaker automatically triggers re-entry into the high volume mode.
[0039] In combination with the method provided in the first aspect, amplifying the overall amplitude of the eighth audio specifically includes: amplifying the overall amplitude of the eighth audio according to a gain corresponding to the volume threshold.
[0040] In combination with the method provided in the first aspect, the volume threshold is a maximum volume adjustable for an external audio device on the electronic device.
[0041] In combination with the method provided in the first aspect, amplifying the audio amplitude in the ninth audio within the preset frequency range specifically includes: amplifying the audio amplitude in the ninth audio within the preset frequency range according to the gain corresponding to the second volume.
[0042] In combination with the method provided in the first aspect, after determining to select the speaker to output audio, the method further includes: displaying a first prompt message, where the first prompt message is used to prompt the user that the high volume mode has been turned on.
[0043] In combination with the method provided in the first aspect, determining to select the speaker to output audio is specifically determined in the following manner: unplugging the external audio device; or selecting the speaker as the audio output device from the connected devices.
[0044] In combination with the method provided in the first aspect, the preset frequency range is a range corresponding to medium and high frequencies.
[0045] In this way, since the human ear is more sensitive to mid- and high-frequency sounds, only by slightly amplifying the amplitude of the mid- and high-frequency parts of the audio signal to be output can make the user obviously feel that the audio output effect is louder, thereby improving the user experience.
[0046] In combination with the method provided in the first aspect, the speaker is also connected to a power amplifier circuit, and when audio with an amplitude greater than a threshold is input into a path between the power amplifier circuit and the speaker, the audio output by the speaker is distorted.
[0047] In this way, for speakers and power amplifier circuits with poor amplification capabilities, by increasing the amplitude of the mid- and high-frequency parts, we can avoid generating noise due to exceeding the capabilities of the speakers and power amplifier circuits, and can also increase the loudness of the audio output and improve the user experience.
[0048] In combination with the method provided in the first aspect, the overall amplitude of the first audio is amplified, specifically including: the audio manager AudioFlinger amplifies the overall amplitude of the first audio according to the gain corresponding to the volume threshold.
[0049] In combination with the method provided in the first aspect, the audio amplitude in the preset frequency range of the second audio is amplified, which includes: AudioFlinger amplifies the audio amplitude in the preset frequency range of the second audio according to the gain corresponding to the second volume by calling the algorithm module.
[0050] In a second aspect, the present application provides an electronic device, comprising one or more audio output devices, a screen, a memory, and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform a method as described in any one of the first aspects.
[0051] In a third aspect, the present application provides a chip, which is applied to an electronic device, and the chip includes one or more audio output devices and one or more processors, and the processor is used to call computer instructions so that the electronic device executes any method described in the first aspect.
[0052] In a fourth aspect, the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on an electronic device, the electronic device executes the method described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic diagram of the switching relationship of several audio output scenarios provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of a graphical interface for switching between "speaker & standard volume" and "speaker & high volume" provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of a graphical interface for switching from "speaker & high volume" to "headphone & standard volume" in an embodiment of the present application;
[0056] Figure 4A schematic diagram of a graphical interface for switching from "headphones & standard volume" back to "speakers & high volume" in an embodiment of the present application;
[0057] Figure 5 A schematic diagram of a graphical interface for switching from "speaker & high volume" to "audio & standard volume" in an embodiment of the present application;
[0058] Figure 6 A schematic diagram of a graphical interface for switching from "audio & standard volume" back to "speaker & high volume" in an embodiment of the present application;
[0059] Figure 7 A flow chart of a volume control method provided in an embodiment of the present application;
[0060] Figure 8 An OS interaction diagram provided for an embodiment of the present application;
[0061] Fig. 9 Another OS interaction diagram provided for an embodiment of the present application;
[0062] Fig.10 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application;
[0063] Fig.11 A schematic diagram of the hardware architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0065] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0066] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0067] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
[0068] First, we introduce the relevant concepts involved in this application:
[0069] Frequency: Frequency refers to the pitch of sound perceived by the human ear. The frequency range of sound that the human ear can hear is 20Hz-20KHz. Among them, the human ear is more sensitive to mid-high frequency sounds (1280Hz-2560Hz), that is, when other factors are constant, the mid-high frequency sounds heard by the human ear are louder than the low frequency sounds.
[0070] Loudness: Loudness refers to the strength of sound perceived by the human ear. It is a subjective feeling of the size of the sound. The size of the loudness heard by the human ear is affected by factors such as distance and amplitude. For the same sound, the longer the propagation distance, the smaller the loudness; when the propagation distance is constant, the greater the amplitude of the sound, the greater the loudness. In addition, the size of the loudness is also related to the sound intensity and frequency, but the change of loudness with sound pressure and frequency is not a simple linear relationship. Through the analysis of the existing equal loudness curves, it can be seen that the loudness heard by the human ear is different for sounds with the same sound pressure but different frequencies. For example, two sounds with a sound pressure of 60dB, one with a frequency of 100Hz and the other with a frequency of 1000Hz, the human ear hears the sound of 1000Hz louder than the sound of 100Hz. In order to make the sound of 100Hz sound as loud as the sound of 1000Hz with a sound pressure of 60dB, the sound pressure of the sound of 100Hz should reach 67dB.
[0071] Volume: Volume corresponds to loudness. Volume refers to a setting parameter used in electronic devices to control the loudness of output audio. When the volume setting of an electronic device is higher, the louder the sound output by the electronic device is.
[0072] Audio clipping: Audio clipping refers to the process in which the audio signal is amplified (equivalent to the amplitude amplification of the audio signal) to a point where it exceeds the maximum limit of a certain node (such as an amplifier circuit or speaker) during the process of being input to the speaker. This causes the peaks and troughs in the waveform of the amplified audio to be "clipped off", which in turn causes the speaker to produce harsh, unnatural noise when playing the clipped audio.
[0073] Loud volume: Loud volume can also be called high volume. In this application, loud volume is a relative concept, not a specific numerical value restriction. Specifically, loud volume refers to a higher volume relative to the conventional and general volume that an electronic device can provide. When the performance of the audio devices (power amplifier circuit, speaker) possessed by different electronic devices is different, the conventional and general volume that can be provided is different. Therefore, for different electronic devices, the volume value represented by the loud volume may also be different. Exemplarily, some electronic devices can currently provide volume control levels of 0-15 levels, and other electronic devices can provide volume control levels of 0-14 levels. Therefore, for the former electronic device, a volume greater than 15 levels, such as 16 levels, is a loud volume, and the volume of 15 levels can also be called a volume threshold; for the latter electronic device. A volume greater than 14 levels, such as 15 levels, is a loud volume, and the volume of 14 levels can also be called a volume threshold. This application does not limit the name, specific value, etc. of the loud volume, and a detailed explanation has been made about the relative concept represented by the loud volume.
[0074] Standard volume: Standard volume refers to the normal and universal volume that current electronic devices can provide. As mentioned above, different electronic devices can provide different standard volumes. For example, some electronic devices can provide 0-15 levels, while others can provide 0-14 levels. If the volume is set higher than the normal and universal volume that an electronic device can provide, the audio output by the electronic device will be clipped and distorted, resulting in noise and reducing the user experience.
[0075] Based on the above concepts, it can be seen that in the application scenario where an electronic device outputs audio, the volume level is usually limited to avoid noise. That is, even if the user adjusts the volume of the electronic device to the highest, the loudness of the audio output by the electronic device may still not be loud, and the sound effect expected by the user cannot be achieved.
[0076] In order to solve the above problems, the present application provides a volume control method, a graphical interface and related devices. In this method, when the electronic device detects that a high volume is set and a speaker is used to output audio, the electronic device amplifies the amplitude of the mid-high frequency part of the audio signal to be output and then outputs it through the speaker.
[0077] After implementing the method provided by the present application, since the human ear is more sensitive to mid- and high-frequency frequencies, only by slightly amplifying the amplitude of the mid- and high-frequency parts of the audio signal to be output, the user can obviously feel that the audio output effect is louder. In addition, the frequencies of human speaking and singing sounds are mostly in the mid- and high-frequency ranges. Therefore, this can also enable the user to clearly hear the content represented by the human voice in the output audio, thereby improving the user experience.
[0078] Next, the application scenarios of the volume control method provided by this application are introduced.
[0079] Because when electronic devices use different audio devices and output audio in different volume settings, users have different requirements for the output loudness. For example, when an electronic device uses a peripheral device (also called an external audio device, such as a wired headset, a Bluetooth headset, or a speaker) to output audio, since the headset is in close contact with the human ear and the amplification function of the speaker can further amplify the audio, the electronic device provides a volume within the standard volume range that is sufficient for the user to hear loudly and clearly. However, when an electronic device uses a speaker to output audio, since the human ear is relatively far away from the electronic device and the amplification function of the speaker is not as good as that of the speaker, the highest volume within the standard volume range cannot make the user hear loudly or clearly.
[0080] Therefore, this application further divides the scenario of using a speaker to output audio into two scenarios: standard volume and high volume. The scenario of using headphones or speakers to output audio is only defined as the standard volume scenario.
[0081] refer to Figure 1 , Figure 1 A schematic diagram showing the switching relationship of several audio output scenarios is shown as an example.
[0082] like Figure 1 As shown, several audio output scenarios and the direct switching relationship between the audio output scenarios are exemplarily shown.
[0083] The audio output scenarios include:
[0084] The scenario in which a speaker is used to output audio within the standard volume range is recorded as "speaker & standard volume"; the scenario in which a speaker is used to output audio within the large volume range is recorded as "speaker & large volume"; the scenario in which headphones (including wired headphones and Bluetooth headphones) are used to output audio within the standard volume range is recorded as "headphones & standard volume"; the scenario in which a speaker is used to output audio within the standard volume range is recorded as "speaker & standard volume".
[0085] The switching relationship of the audio output scene specifically includes:
[0086] When the electronic device is in the "speaker & standard volume" scenario, if the electronic device turns up the volume, for example, to a high volume range, the electronic device switches to the "speaker & high volume" scenario; if the electronic device turns down the volume, for example, to a standard volume range, the electronic device switches back to the "speaker & standard volume" scenario. In other examples of the present application, when a speaker is used to output audio, when the electronic device turns up the volume, the electronic device can switch from the "speaker & high volume" scenario to the "speaker & high volume" scenario, that is, the high volume mode is enabled, that is, there is no need to limit the volume of the electronic device to be increased to exceed the volume threshold, that is, to be adjusted to a high volume range.
[0087] When the electronic device is in the "speaker & high volume" scenario, if the electronic device switches the audio device to headphones, the electronic device switches to the "headphones & standard volume" scenario; if the electronic device switches the audio device back to the speaker, the electronic device switches to the "speaker & high volume" scenario;
[0088] When the electronic device is in the "speaker & high volume" scene, if the electronic device switches the audio device to the speaker, the electronic device switches to the "speaker & standard volume" scene; if the electronic device switches the audio device back to the speaker, the electronic device switches to the "speaker & high volume" scene.
[0089] In the above-mentioned scene switching, when the electronic device switches to the "speaker & high volume" scene to output audio, the electronic device will turn on the high volume mode to output audio in the high volume mode. The high volume mode includes: amplifying the amplitude of the mid- and high-frequency parts of the audio signal to be output and then outputting it through the speaker. When the electronic device switches from the "speaker & high volume" scene to any other scene, turning off the high volume mode is equivalent to outputting audio in the standard mode. The standard mode includes: amplifying the amplitude of the audio signal to be output as a whole and then outputting it through the speaker. Among them, the amplitude amplification factor in the standard mode is smaller than the amplitude amplification factor of the mid- and high-frequency parts in the high volume mode. Regarding the method of turning on the high volume mode, please refer to the description of the method flow later, which will not be repeated here.
[0090] Figure 1 Only several audio output scenarios are shown as examples. In addition, more output scenarios may be included, such as the scenario of "earpiece & standard volume", in which the earpiece and speaker are both built-in devices of the electronic device, rather than peripheral devices. Usually, electronic devices use speakers by default to output audio in some scenarios, and use earpieces by default to output audio in other scenarios. For example, when an electronic device plays media audio, a speaker is used to output audio, and when an electronic device plays call audio, an earpiece is used by default to output audio. Media audio includes but is not limited to: audio output by an electronic device during the process of playing music, videos, and games. Call audio is an electronic device that includes but is not limited to: call sounds played during a call. Because when an electronic device uses an earpiece to output audio, the user does not have high requirements for the loudness of its output, and there is no need to use a high-volume mode to output the earpiece output audio, that is, this application mainly relates to a method for controlling the volume of media audio using a speaker, so the scenario of "earpiece & standard volume" is not described in detail here.
[0091] Apart from Figure 1 In addition to the switching relationships of the several audio output scenarios shown, other more switching relationships may also be included, for example, direct switching between the "headphone & standard volume" scenario and the "audio & standard volume" scenario, direct switching between the "speaker & standard volume" scenario and the "headphone & standard volume" scenario, etc. Since this application mainly involves turning on the high volume mode to output audio in the "speaker & high volume" scenario, the focus is on switching to the "speaker & high volume" scenario, or switching from the "speaker & high volume" scenario to other scenarios.
[0092] Next, the graphical interface schematic diagram for switching audio output scenarios provided by the present application is introduced in conjunction with the UI embodiment.
[0093] refer to Figure 2 , Figure 2A schematic diagram of a graphical interface showing an example of switching between “speaker & standard volume” and “speaker & high volume”.
[0094] Figure 2 a in the figure is a user interface when the electronic device outputs audio at "speaker & standard volume". The user interface may be a drop-down status bar interface provided by the desktop, a main interface, or an interface provided by any other application. The interface may include a volume adjustment indicator bar 211, and the present application does not limit other contents included in the interface.
[0095] The volume adjustment indicator bar 211 can display the adjusted volume indication information according to the volume adjustment operation input by the user. When the volume is adjusted higher, the area occupied by the selected state 211A in the volume adjustment indicator bar 211 is larger, which is equivalent to indicating a higher volume level. When the volume is increased to the highest level within the standard volume range (e.g., level 15), the area occupied by the selected state 211A in the volume adjustment indicator bar 211 is larger. Figure 2 As shown in a in .
[0096] The foregoing Figure 2 The volume indicated by a in can also be called a first volume. In addition to being equal to the volume threshold, i.e., level 15, the first volume can also be less than the volume threshold, i.e., level 15.
[0097] The foregoing Figure 2 The state of the volume adjustment indicator bar 211 shown in a in FIG. 1 is the first state, and the first state includes: displaying the first color corresponding to the first volume in the first area of the volume adjustment indicator bar, that is, displaying the selected state 211A.
[0098] The operation for adjusting the volume may be an increase operation on the volume key, or a sliding operation on the volume adjustment indicator bar 211, which is not limited in the embodiment of the present application.
[0099] The aforementioned volume-up operation on the volume key, or the sliding operation on the volume adjustment indicator bar 211 may also be referred to as a first operation.
[0100] When electronic devices are Figure 2 In the highest volume level state within the standard volume range shown in a, after detecting an operation to increase the volume (a swiping up on the volume adjustment indicator bar 211), the electronic device switches to a scene for outputting audio under "speaker & high volume".
[0101] Figure 2b in the figure is the user interface when the electronic device outputs audio in "speaker & high volume". The interface can be a drop-down status bar interface provided by the desktop, a main interface, or an interface provided by any other application. The interface can include a volume adjustment indicator bar 211 and an audio output mode prompt information 212. The present application does not limit other contents included in the interface.
[0102] The volume adjustment indicator bar 211 will continue to display the selected state 211B above the selected state 211A, and the selected state 211B is used to indicate that the volume level has reached a high volume (e.g., level 16). In addition, 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.
[0103] The foregoing Figure 2 The volume indicated by b in the figure can also be referred to as a second volume, which is greater than a volume threshold, that is, greater than level 15.
[0104] The foregoing Figure 2 The state of the volume adjustment indicator bar 211 shown in b is the second state, and the second state includes: the first color corresponding to the volume threshold is displayed in the second area of the volume adjustment indicator bar (i.e., the selected state 211A), and the second color corresponding to the second volume is displayed in the third area of the volume adjustment indicator bar (i.e., the selected state 211B); the second area is greater than or equal to the first area, and when the aforementioned first volume is less than the volume threshold, the second area is greater than the first area; when the aforementioned first volume is equal to the volume threshold, the second area is equal to the first area.
[0105] Among them, the audio output mode prompt information 212 (also referred to as the first prompt information) may include, for example, a prompt message that "the high volume mode is turned on". The high volume mode includes: amplifying the amplitude of the mid-high frequency part (i.e., the part within the preset frequency range) of the audio signal to be output and then outputting it through the speaker. For the specific implementation of turning on the high volume mode, please refer to the description of OS interaction later, which will not be repeated here.
[0106] When electronic devices are Figure 2 In the high volume state shown in b, a second operation of lowering the volume is detected, for example, after the volume is lowered from the aforementioned second volume to the third volume, the electronic device switches back to the scene of outputting audio under "speaker & standard volume".
[0107] Figure 2c is a user interface when the electronic device outputs audio at "speaker & standard volume". The user interface can be a drop-down status bar interface provided by the desktop, a main interface, or an interface provided by any other application. The interface can include a volume adjustment indicator bar 211 and audio output mode prompt information 213. This application does not limit other content included in the interface.
[0108] The selected state of the volume adjustment indicator bar 211 can be Figure 2 Where a is the same or different depending on the volume down operation. When the volume down operation is used to continuously reduce the volume by more levels, Figure 2 The area occupied by the selected state 211A of the volume adjustment indicator bar 211 in c is smaller than Figure 2 The area occupied by a.
[0109] The foregoing Figure 2 The volume shown in c in FIG. 8 can also be called a third volume, and the second volume is less than the volume threshold.
[0110] The foregoing Figure 2 The state of the volume adjustment indicator bar 211 shown in c is the third state, and the third state includes: the fourth area in the volume adjustment indicator bar displays the first color corresponding to the volume threshold (i.e., the selected state 211A), and the fourth area is smaller than or equal to the first area. When the aforementioned third volume is smaller than the volume threshold, the fourth area is smaller than the second area; when the aforementioned first volume is equal to the volume threshold, the fourth area is equal to the second area.
[0111] The audio output mode prompt information 213 (also referred to as second prompt information) may include prompt information such as “the high volume mode has been exited”.
[0112] Figure 2 The user interface shown is only an example. In other embodiments of the present application, Figure 2 The user interface shown may also include more or less information, for example, it may not include the volume adjustment indicator bar 211, the audio output mode prompt information 212 or the audio output mode prompt information 213. This is because the volume adjustment indicator bar 211 is usually displayed for a period of time after the electronic device receives an operation to adjust the volume. The audio output mode prompt information 212 is usually displayed for a period of time after the electronic device switches to the "speaker & high volume" scene. The audio output mode prompt information 213 is usually displayed for a period of time after the electronic device switches from the "speaker & standard volume" scene to other scenes.
[0113] refer to Figure 3 , Figure 3The schematic diagram of the graphical interface in the scenario of switching from "speaker & high volume" to "headphone & standard volume" is exemplarily shown.
[0114] Figure 3 a in the figure is another user interface when the electronic device outputs audio under "speaker & high volume". The user interface may be a drop-down status bar interface provided by the desktop. The interface may include an audio device card 311, and the present application does not limit other contents included in the interface.
[0115] The audio device card 311 displays the currently used audio device, such as a speaker.
[0116] When electronic devices display Figure 3 In the user interface shown in a, after an operation on the audio device card 311 is detected, other audio devices that can be used for switching will be displayed.
[0117] Figure 3 b in the figure is another user interface when the electronic device outputs audio under "speaker & high volume". The user interface is an audio switching interface displayed in response to the user's operation on the audio device card 311. The audio switching interface includes one or more available audio devices, such as the speaker currently in use, and other available peripheral devices, such as device A and device B. Device A can be a headset, and device B can be a speaker. In addition, the peripheral device can also be other wired headsets, Bluetooth headsets or speakers pre-connected to the electronic device, etc.
[0118] When the electronic device is in the "speaker & high volume" scenario, it detects that the Figure 3 After the operation of device A in b, the electronic device switches to the scene of outputting audio under "headphones & standard volume".
[0119] Figure 3 c is a user interface when the electronic device outputs audio at "headphones & standard volume". The user interface may include a volume adjustment indicator bar 211, an audio output mode prompt message 213, and optionally, a prompt message indicating that the device A has been switched, etc. This application does not limit other contents included in the user interface.
[0120] The selected state of the volume adjustment indicator bar 211 depends on the volume level (also referred to as the fourth volume) when the earphone was used to output the audio last time. Figure 3 The small area shown as c in FIG. 1 indicates that the volume level is low, for example, level 5.
[0121] The foregoing Figure 3 The volume shown by c in can also be called the fourth volume.
[0122] The foregoing Figure 3 The state of the volume adjustment indicator bar 211 shown in c is the fourth state, and the fourth state includes: the fifth area in the volume adjustment indicator bar displays the first color corresponding to the volume threshold (i.e., the selected state 211A). The fifth area is smaller than or equal to the second area. When the fourth volume is smaller than the volume threshold, 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.
[0123] The audio output mode prompt information 213 (also referred to as second prompt information) may include prompt information such as “the high volume mode has been exited”.
[0124] When the electronic device detects an operation to increase the volume in the "Headphones & Standard Volume" scenario, the electronic device adjusts the area occupied by the selected state 211A of the volume adjustment indicator bar 211 and correspondingly increases the loudness of the output audio. Until the electronic device detects that the volume is adjusted to a level exceeding the highest volume in the standard volume range, the electronic device will not continue to increase the loudness of the output audio. However, the electronic device may optionally adjust the area occupied by the selected state 211B of the volume adjustment indicator bar 211, for example Figure 3 Optionally, the electronic device may also display a prompt message 214 to remind the user that the volume of the earphone is too high and to pay attention to healthy ear use.
[0125] refer to Figure 4 , Figure 4 The schematic diagram of the graphical interface in the scenario of switching from "headphones & standard volume" back to "speaker & high volume" is exemplarily shown.
[0126] Figure 4 a in the figure is another user interface when the electronic device outputs audio at "headphones & standard volume". The user interface may be a drop-down status bar interface provided by the desktop. The interface may include an audio device card 311, and the present application does not limit other contents included in the interface.
[0127] The audio device card 311 shows the audio device currently being used, such as the Figure 3 The device A.
[0128] When electronic devices display Figure 4 In the user interface shown in a, after an operation on the audio device card 311 is detected, other audio devices that can be used for switching will be displayed.
[0129] Figure 4b in the figure is another user interface when the electronic device outputs audio at "headphones & standard volume". The user interface is an audio switching interface displayed in response to the user's operation on the audio device card 311. The audio switching interface includes one or more available audio devices, such as the device A currently in use, and other available speakers, and peripheral devices, such as device B, which can be a speaker. In addition, the peripheral device can also be other wired headphones, Bluetooth headphones or speakers pre-connected to the electronic device, etc.
[0130] When the electronic device is in the "Headphone & Standard Volume" scenario, it detects that the Figure 4 After operating the speaker in b, the electronic device switches to using the speaker to output audio. Since the volume was high when the speaker was used to output audio last time, this time it directly switches back to the scene of outputting audio under "Speaker & High Volume".
[0131] Figure 4 c is a user interface when the electronic device outputs audio in "speaker & high volume". The user interface may include a volume adjustment indicator bar 211, an audio output mode prompt message 212, and optionally, a prompt message indicating that the speaker has been switched, etc. This application does not limit other contents included in the user interface.
[0132] The selected state of the volume adjustment indicator bar 211 depends on the volume level when the speaker was used to output audio last time. Figure 4 The area shown by c in FIG. 1 indicates that the volume level has reached the highest level, for example, level 16.
[0133] The audio output mode prompt information 212 may include, for example, a prompt message that "the high volume mode is turned on". The high volume mode includes: amplifying the amplitude of the mid-high frequency part of the audio signal to be output and then outputting it through the speaker. For the specific implementation of turning on the high volume mode, please refer to the description of OS interaction later, which will not be repeated here.
[0134] refer to Figure 5 , Figure 5 The schematic diagram of the graphical interface in the scenario of switching from "speaker & high volume" to "audio & standard volume" is exemplarily shown.
[0135] Figure 5 a in the figure is another user interface when the electronic device outputs audio under "speaker & high volume". The user interface may be a drop-down status bar interface provided by the desktop. The interface may include an audio device card 311, and the present application does not limit other contents included in the interface.
[0136] The audio device card 311 displays the currently used audio device, such as a speaker.
[0137] When electronic devices display Figure 5 In the user interface shown in a, after an operation on the audio device card 311 is detected, other audio devices that can be used for switching will be displayed.
[0138] Figure 5 b in the figure is another user interface when the electronic device outputs audio under "speaker & high volume". The user interface is an audio switching interface displayed in response to the user's operation on the audio device card 311. The audio switching interface includes one or more available audio devices, such as the speaker currently in use, and other available peripheral devices, such as device A and device B. Device A can be a headset, and device B can be a speaker. In addition, the peripheral device can also be other wired headsets, Bluetooth headsets or speakers pre-connected to the electronic device, etc.
[0139] When the electronic device is in the "speaker & high volume" scenario, it detects that the Figure 5 After the operation of device B in b, the electronic device switches to the scene of outputting audio under "Sound & Standard Volume".
[0140] Figure 5 c in the figure is a user interface when the electronic device outputs audio at "sound & standard volume". The user interface may include a volume adjustment indicator bar 211, an audio output mode prompt message 213, and optionally, a prompt message indicating that the device has been switched to device B, etc. This application does not limit other contents included in the user interface.
[0141] The selected state of the volume adjustment indicator bar 211 depends on the volume level when the audio was output by the speaker last time. Figure 5 The small area shown as c in FIG. 1 indicates that the volume level is low, for example, level 5.
[0142] The audio output mode prompt information 213 may include, for example, prompt information such as “the high volume mode has been exited”.
[0143] When the electronic device detects an operation to increase the volume in the "audio & standard volume" scenario, the electronic device adjusts the area occupied by the selected state 211A of the volume adjustment indicator bar 211 and correspondingly increases the loudness of the output audio. Until the electronic device detects that the volume is adjusted to a level exceeding the highest volume in the standard volume range, the electronic device will not continue to increase the loudness of the output audio. However, the electronic device may optionally adjust the area occupied by the selected state 211B of the volume adjustment indicator bar 211, for example Figure 5Optionally, the electronic device may also display a prompt message 214 to remind the user that the volume of the audio is too high and to pay attention to healthy use of ears.
[0144] refer to Figure 6 , Figure 6 The schematic diagram of the graphical interface in the scenario of switching from "audio & standard volume" back to "speaker & high volume" is exemplarily shown.
[0145] Figure 6 a in the figure is another user interface when the electronic device outputs audio at "sound & standard volume". The user interface may be a drop-down status bar interface provided by the desktop. The interface may include an audio device card 311, and the present application does not limit other contents included in the interface.
[0146] The audio device card 311 shows the audio device currently being used, such as the Figure 5 Device B shown.
[0147] When electronic devices display Figure 6 In the user interface shown in a, after an operation on the audio device card 311 is detected, other audio devices that can be used for switching will be displayed.
[0148] Figure 6 b in the figure is another user interface when the electronic device outputs audio at "sound & standard volume". The user interface is an audio switching interface displayed in response to the user's operation on the audio device card 311. The audio switching interface includes one or more available audio devices, such as the device B currently in use, and other available speakers, and peripheral devices, such as device A, and device B can be headphones. In addition, the peripheral device can also be other wired headphones, Bluetooth headphones or speakers pre-connected to the electronic device, etc.
[0149] When the electronic device is in the "Sound & Standard Volume" scenario, it detects that the Figure 6 After operating the speaker in b, the electronic device switches to using the speaker to output audio. Since the volume was high when the speaker was used to output audio last time, this time it directly switches back to the scene of outputting audio under "Speaker & High Volume".
[0150] Figure 6 The c in the figure is a user interface when the electronic device outputs audio in the "speaker & high volume" mode. Figure 6 For an introduction to the user interface of c in the previous section, please refer to Figure 4 The introduction of the user interface shown in c will not be repeated here.
[0151] Above Figure 2-Figure 6Only one audio device switching method is shown as an example, that is, switching the audio device through the audio device card 311 provided in the pull-down status bar. In addition, the present application may also include other more audio device switching methods, such as directly triggering the electronic device to automatically switch the audio device by inserting or unplugging the peripheral device, or confirming / cancelling, and switching the audio device by popping up the confirmation device switching information after inserting or unplugging the peripheral device, etc. The embodiments of the present application are not limited to this.
[0152] Above Figure 2-Figure 6 It is only exemplified that there is only one volume level corresponding to the loud volume (for example, the 16th level). In addition, the loud volume described in the present application can also be divided into more levels, such as the 16th level, the 17th level, and so on. When the loud volume is at different levels, the electronic device will have different amplification factors for the amplitude of the mid- and high-frequency parts of the output audio signal in the loud volume mode turned on. When the volume level is higher, the corresponding amplification factor is greater, so that the loudness of the sound heard by the user is louder and the content can be heard more clearly.
[0153] In the embodiment of the present application, the frequency range corresponding to the medium and high frequencies is the preset frequency range, and the present application does not limit the specific range.
[0154] Based on the introduction of the aforementioned application scenarios, the volume control method provided by the present application is now introduced in conjunction with a method flow chart.
[0155] like Figure 7 As shown, the method flow includes the following steps:
[0156] S71, detecting whether a peripheral device is connected.
[0157] Specifically, after the electronic device is turned on, it can detect whether the electronic device is connected to the corresponding peripheral device through the Bluetooth module or the headphone interface. If it 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.
[0158] Among them, peripheral devices include but are not limited to: wired headphones, Bluetooth headphones, speakers, etc.
[0159] Based on the introduction of the above scenarios, it can be seen that when an electronic device uses a peripheral device to output audio, the audio output loudness can meet the user's needs, so there is no need to adopt the high volume mode provided by this application. Therefore, S71 can be used to preliminarily screen out scenarios where the high volume mode is not turned on.
[0160] S72, detecting whether a speaker is selected to output audio.
[0161] Specifically, when the electronic device detects that the peripheral device is not connected, it can further detect whether the speaker is selected to output the audio. If the speaker is selected to output the audio, the subsequent S73 is continued to be executed. The implementation method of selecting the speaker to output the audio can be, for example, as described above. Figure 4 The operation of selecting a speaker in the audio switching interface shown may also be other operations, which are not limited in the embodiments of the present application.
[0162] This is because, when the electronic device is not connected to a peripheral device, it may output audio through a speaker or a receiver. For example, when the electronic device is playing media audio, the speaker is selected to output audio, and when the electronic device is playing call audio, the receiver is selected by default to output audio. Usually, when the receiver is selected to output audio, the user does not have high requirements for the loudness of the sound. Therefore, when selecting the receiver to output audio and selecting the peripheral device to output audio, there is no need to turn on the high volume mode. Therefore, S71 can be used to further filter out scenarios where the high volume mode is not turned on.
[0163] S73, detecting whether the speaker volume is loud.
[0164] Specifically, the electronic device not only needs to detect once whether the speaker volume is loud after detecting that the speaker is used to output audio, but also needs to detect whether the adjusted speaker volume is loud after each operation for adjusting the speaker volume is received after detecting that the speaker is used to output audio. When the electronic device detects that the speaker volume is loud, the subsequent S74 is executed; when the electronic device detects that the speaker volume is not loud, the subsequent S75 is executed.
[0165] This is because, when the electronic device uses a speaker to output audio, the user can adjust the volume at any time. Only when the speaker volume is adjusted to a high volume range, the high volume mode needs to be turned on. Therefore, S73 can be used to further filter out the scenarios where the high volume mode is not turned on. Among them, the implementation method for adjusting the speaker volume can be, for example, as described above. Figure 2 The sliding operation shown is performed on the volume adjustment indicator bar 211, or it can also be other operations such as operations on the volume key, which is not limited in the embodiment of the present application.
[0166] S74, turn on the high volume mode and use the speaker to output audio in high volume mode.
[0167] Specifically, when the electronic device detects that the speaker volume is at a high volume, it turns on the high volume mode and outputs the audio in the high volume mode. The high volume mode includes: amplifying the amplitude of the mid-high frequency part of the audio signal to be output and then outputting it through the speaker. For the specific implementation of turning on the high volume mode, please refer to the description of OS interaction later, which will not be repeated here.
[0168] When the electronic device is in high volume mode and uses a speaker to output audio in high volume mode, the electronic device can also display, for example, Figure 2 The interface shown in b will not be described here.
[0169] S75, exit high volume mode and use the speaker to output audio in standard mode.
[0170] Specifically, when the electronic device detects that the speaker volume is not a loud volume (i.e., standard volume), exiting the high volume mode is equivalent to turning on the standard mode, and outputting audio in the standard mode. The standard mode includes: amplifying the amplitude of the audio signal to be output as a whole and then outputting it through the speaker. Among them, the amplitude amplification factor in the standard mode is smaller than the amplitude amplification factor of the medium and high frequency parts in the high volume mode. For the specific implementation of the standard mode, please refer to the description of OS interaction later, which will not be repeated here.
[0171] When the electronic device exits the high volume mode and uses the speaker to output audio in the standard mode, the electronic device may also display, for example, Figure 2 The interface shown in c will not be described here.
[0172] S76 is optional to detect whether to select external device to output audio.
[0173] Specifically, when the electronic device detects that a peripheral device has been connected, it can further detect whether the connected peripheral device is selected to output audio. If it is detected that the peripheral device is selected to output audio, the subsequent S77 is continued to be executed; if it is detected that the peripheral device is not selected to output audio, the process jumps to execute S72.
[0174] S76 is an optional step. This is because, in some embodiments, when the electronic device is connected to a peripheral device, the connected peripheral device will inevitably be selected to output audio. In other embodiments, when the electronic device is connected to a peripheral device, other methods such as a speaker can still be selected to output audio. For example, the above-mentioned UI embodiment can be referred to. Figure 3 In the scenario shown, when the electronic device has peripheral devices A and B, the speaker can still be selected to output the audio. In the former case, after detecting the connection of the peripheral device in S71, the subsequent S77 or S78 is directly executed.
[0175] S77, detecting whether the audio is played in a high volume mode before selecting the peripheral.
[0176] Specifically, after the electronic device detects that the audio is output by a peripheral device, it detects whether the audio is being played in a high-volume mode before the peripheral device is selected. If it is detected that the audio is being played in a high-volume mode before the peripheral device is selected, the subsequent S78 is executed; if it is detected that the audio is not being played in a high-volume mode before the peripheral device is selected, the subsequent S79 is executed.
[0177] S78, exit high volume mode and use external devices to output audio in standard mode.
[0178] Specifically, since the electronic device detects that the audio is played in high volume mode before the peripheral is selected, it is necessary to exit the high volume mode and use the peripheral to output the audio in standard mode. For the specific implementation of the standard mode, please refer to the description of OS interaction later, which will not be repeated here.
[0179] When the electronic device exits the high volume mode and uses the peripheral device to output audio in the standard mode, the electronic device may also display the above-mentioned Figure 3 Middle c, Figure 4 Medium c and Figure 6 The interface shown in c will not be described here.
[0180] S79, continue to use the standard mode and use the external device to output audio in the standard mode.
[0181] Specifically, since the electronic device detects that the audio is not played in high volume mode before the peripheral is selected, it is equivalent to outputting the audio in standard mode, so it only needs to continue to use the standard mode and use the peripheral to output the audio in standard mode. For the specific implementation of the standard mode, please refer to the description of OS interaction later, which will not be repeated here.
[0182] The aforementioned S77-S79 is an optional implementation. Specifically, after it has been determined in S76 that an external device is selected to output audio, since there is no situation of turning on the high volume when the external device is selected to output audio, it is not necessary to execute S77, that is, it is not necessary to detect whether the audio is played in the high volume mode before the external device is selected. The standard mode can be turned on directly, and the external device can output audio in the standard mode.
[0183] Next, combine Figure 8 and Fig. 9 To introduce the previous article Figure 1-Figure 6 An interaction diagram of the operating system (OS) of the electronic device corresponding to each application scenario.
[0184] Figure 8-Figure 9The AudioService, AudioSystem, AudioTrack, AudioFlinger and Histen shown in the figure are modules included in the electronic device for managing audio devices and processing audio streams. For the definitions of these modules, please refer to the detailed description of the electronic device software architecture later. The specific functions of these modules have been recorded in detail in the following process and will not be repeated here.
[0185] like Figure 8 As shown, the OS interaction to enable standard mode and high volume mode includes the following steps:
[0186] S81, the AudioService of the electronic device obtains relevant information indicating audio output (audio device, volume).
[0187] Specifically, the AudioService of the electronic device can obtain relevant information indicating audio output, and the audio output information includes but is not limited to any one or more of the following: audio device, volume, etc. The audio device includes a speaker, earphone or stereo, etc. The volume can be determined by the AudioService through information of operations on the volume key or the volume adjustment indicator bar.
[0188] For example, the relevant information indicating audio output in S81 specifically indicates that the electronic device uses a speaker and the speaker volume is set within a standard volume range, or indicates that the electronic device uses headphones or speakers and the volume is within a standard volume range.
[0189] It is understandable that the AudioService of the electronic device can simultaneously obtain relevant information indicating multiple audio outputs, such as the audio device used and the volume set, or the AudioService of the electronic device can obtain the audio device and volume separately. It depends on the operation of triggering the electronic device to switch the audio device and the operation of adjusting the volume. For the operation of switching audio devices, please refer to the full text UI embodiment Figure 3 A possible implementation method described in a and b in FIG. For details on the operation of adjusting the volume, please refer to the UI embodiment above. Figure 2 A possible implementation method described in a and b.
[0190] S82, the AudioService of the electronic device determines the audio output mode, such as enabling the standard mode.
[0191] Specifically, the AudioService of the electronic device may determine the adopted audio output mode according to the acquired relevant information indicating the audio output.
[0192] As described above, when the electronic device uses a speaker and the speaker volume is within the large volume range, the high volume mode is enabled. In other scenarios (using a speaker and the speaker volume is within the standard volume range, using headphones or speakers, etc.), the standard mode is used. For example, when the relevant information indicating the audio output obtained by AudioService in S81 specifically indicates that the electronic device uses a speaker and the speaker volume is set within the standard volume range, it is determined that the standard mode is enabled.
[0193] S83, the AudioService of the electronic device sends an instruction to the AudioSystem to start the standard mode.
[0194] Specifically, after the AudioService of the electronic device determines to adopt the standard mode, it sends an instruction to the AudioSystem to instruct to start the standard mode.
[0195] S84, the AudioSystem of the electronic device sends an instruction to AudioFlinger to enable the standard mode.
[0196] Specifically, after the AudioSystem of the electronic device receives the instruction sent by the AudioService to instruct to start the standard mode, the AudioSystem also sends the instruction to instruct to start the standard mode to the AudioFlinger.
[0197] In the embodiment of the present application, the information contained in the instructions instructing to turn on the standard mode in S83 and S84 may be the same or different, but their function is to instruct the recipient to turn on the standard mode, which is not limited in the embodiment of the present application.
[0198] In an achievable manner, the instruction to start the standard mode may include, for example, the following information: the volume gain parameter corresponding to the volume set by the adopted audio device or electronic device. Then, AudioFlinger executes the subsequent S85-S88 according to the aforementioned parameters, that is, after receiving the audio stream to be played, 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.
[0199] In particular, the volume gain parameter corresponding to the volume in the standard mode includes: a standard volume gain parameter. The standard volume gain parameter is only used to instruct AudioFlinger to amplify the amplitude of the overall audio.
[0200] Among them, the standard volume gain parameter is the amplification factor corresponding to each volume level within the standard volume range. The values of the standard volume gain parameters corresponding to different volumes are different. When the volume level is higher, the corresponding volume gain parameter is larger. For example, when the volume is level 0, the corresponding volume gain parameter is 0, which is equivalent to mute processing; for example, when the volume is level 1, the corresponding volume gain parameter is 0.0025, which is equivalent to amplification by 0.0025 times; for another example, when the volume is level 15, the corresponding volume gain parameter is 1, which is equivalent to amplification by 1 times, and so on. The present application does not impose specific restrictions on the specific values of the standard volume gain parameters, and the corresponding relationship between the standard volume gain parameters and the volume levels.
[0201] S85: The AudioTrack of the electronic device receives the audio stream to be played.
[0202] Specifically, when an upper layer application of an electronic device initiates a service request for playing audio, the AudioTrack of the electronic device can receive the audio stream to be played.
[0203] The audio stream to be played may be an audio file provided by an upper layer application such as music, video or game, and this embodiment of the present application does not limit this.
[0204] In an embodiment of the present application, the original audio streams received by AudioTrack at different times may be different. For example, the original audio stream received in a scenario where a speaker is used to output audio within a standard volume range may include a fourth audio. For example, the original audio stream received in a scenario where an external audio device is used to output audio may include a sixth audio.
[0205] S86, the AudioTrack of the electronic device writes the audio stream to be played to AudioFlinger.
[0206] Specifically, after the AudioTrack of the electronic device receives the audio stream to be played, since the audio stream is an original audio stream, it needs to be written to AudioFlinger, and the original audio stream is processed accordingly by AudioFlinger according to relevant parameters in the standard mode.
[0207] S87, the AudioFlinger of the electronic device processes the audio stream, including adjusting the volume, resampling, etc.
[0208] Specifically, after the AudioFlinger of the electronic device receives the original audio stream to be played written by AudioTrack, it adjusts the volume of the original audio stream according to the volume gain parameter obtained in S84. Usually, the volume adjustment is synchronously processed during the resampling process.
[0209] Resampling refers to converting the sampling rate of the original audio stream into a new sampling rate. In some application scenarios, the accuracy of the audio stream needs to be improved, and the sampling rate after resampling is higher than the sampling rate of the original audio stream. For other scenarios, such as speech recognition, only a lower sampling rate is needed to achieve the purpose of speech recognition. This can also reduce the amount of cached data and simplify the data processing process.
[0210] Adjusting the volume means 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 times.
[0211] In an embodiment of the present application, the audio obtained after AudioFlinger amplifies the original audio stream, such as the fourth audio, can also be called the fifth audio, and the audio obtained after AudioFlinger amplifies the original audio stream, such as the sixth audio, can also be called the seventh audio.
[0212] S88, the AudioFlinger of the electronic device sends the processed audio stream to the audio driver.
[0213] Specifically, after processing the audio stream according to the standard volume gain parameter, the AudioFlinger of the electronic device sends the processed audio stream to the corresponding audio driver, so that the audio driver controls the corresponding audio device to output audio.
[0214] The aforementioned S85-S88 are optional steps. In other embodiments, the electronic device turns on the standard mode, which is equivalent to AudioFlinger and the like using various parameters in the standard mode to process the audio stream to be played, but whether the audio stream is played depends on the user's operation, so S85-S88 are not necessary operations.
[0215] The above S81-S88 only introduces the specific implementation steps of the electronic device enabling the standard mode to output audio. Next, S89-S100 introduces the specific implementation steps of the electronic device enabling the high volume mode according to the user operation.
[0216] In addition, when the electronic device executes the above S81-S88, the AudioService of the electronic device can obtain the relevant information indicating the audio output again at any time, which depends on when the user inputs the audio output-related operations, such as adjusting the volume, switching the audio device, etc. Therefore, S99-S100 can be triggered and executed at any time in S81-S88. In addition, it is not limited to enabling the standard mode first and then the high volume mode. The electronic device can also enable the high volume mode first and then the standard mode according to the user operation, that is, execute S89-S100 first and then execute S81-S84 (optionally also including S85-S88).
[0217] S89, the AudioService of the electronic device obtains relevant information indicating audio output (audio device, volume).
[0218] For the introduction of S89, please refer to the previous description of S81, which will not be repeated here.
[0219] Unlike S81, the relevant information indicating audio output in S89 is different from the relevant information indicating audio output in S81. For example, the relevant information indicating audio output in S81 specifically indicates that the electronic device uses a speaker and the speaker volume is set within the standard volume range. The relevant information indicating audio output in S89 specifically indicates that the electronic device uses a speaker and the speaker volume is set within the large volume range.
[0220] S90: The AudioService of the electronic device determines an audio output mode, such as enabling a high volume mode.
[0221] For the introduction of S90, please refer to the previous description of S82, which will not be repeated here.
[0222] Different from S82, the audio output mode determined in S90 is a high volume mode.
[0223] S91, the AudioService of the electronic device sends an instruction to the AudioSystem to turn on the high volume mode.
[0224] Specifically, after the AudioService of the electronic device determines to adopt the high volume mode, it sends an instruction to the AudioSystem to instruct to turn on the high volume mode.
[0225] S92, the AudioSystem of the electronic device sends an instruction to AudioFlinger to enable a high volume mode.
[0226] Specifically, after the AudioSystem of the electronic device receives the instruction sent by the AudioService to turn on the high volume, the AudioSystem also sends the instruction to turn on the high volume mode to the AudioFlinger.
[0227] In the embodiment of the present application, the information contained in the instructions instructing to turn on the standard mode in S91 and S92 may be the same or different, but their function is to instruct the recipient to turn on the high volume mode, which is not limited in the embodiment of the present application.
[0228] In an achievable manner, the instruction for turning on the high volume mode may include, for example, the following information: the volume gain parameter corresponding to the volume set by the adopted audio device or electronic device. Then, AudioFlinger executes the subsequent S96-S100 according to the aforementioned parameters, that is, after receiving the audio stream to be played, AudioFlinger preliminarily processes the audio stream according to the volume gain parameter, and calls Histen to further process the preliminarily processed audio stream, and then sends the final processed audio stream to the corresponding audio driver, so that the audio driver controls the corresponding audio device to output audio.
[0229] Different from the volume gain parameters corresponding to the volume in standard mode, the volume gain parameters in high volume mode include: standard volume gain parameters and high volume gain parameters. The standard volume gain parameters are used to instruct AudioFlinger to amplify the amplitude of the overall audio, and the high volume gain parameters are used to instruct AudioFlinger to call Histen to amplify the amplitude of the mid-high frequency part of the entire audio.
[0230] The standard volume gain parameter is the amplification factor (eg, 1) corresponding to the volume level (eg, level 15) within the standard volume range, which is equivalent to amplifying the audio amplitude by a corresponding factor.
[0231] The loud volume gain parameter is not the amplification factor itself, but corresponds to the amplification factor. The corresponding relationship can be: the value of the loud volume gain parameter is equal to the logarithm of the amplification factor of the audio amplitude with base 10 multiplied by 10. The loud volume gain parameter corresponds to the volume level within the loud volume range, and the corresponding relationship is that the higher the volume level, the higher the corresponding loud volume gain parameter value. For example, when the volume level is level 16, the corresponding loud volume gain parameter value is 2dB, which is equivalent to amplifying the audio amplitude by about 1.25 times. The present application does not impose specific restrictions on the specific value of the loud volume gain parameter, and the corresponding relationship between the loud volume gain parameter and the volume level. In addition, the loud volume gain parameter can also be a magnification factor, and the present application does not impose any restrictions on this.
[0232] S93, the AudioFlinger of the electronic device sends an instruction to Histen to turn on the high volume mode.
[0233] Specifically, after AudioFlinger of the electronic device receives the instruction sent by AudioSystem to instruct to turn on the high volume mode, AudioFlinger also sends the instruction to instruct to turn on the high volume mode to AudioFlinger.
[0234] In the embodiment of the present application, the information contained in the instructions instructing to turn on the standard mode in S91-S93 may be the same or different, but their function is to instruct the recipient to turn on the standard mode, and the embodiment of the present application does not limit this.
[0235] In one achievable manner, the instruction instructing to start the standard mode in S93 may include, for example, a high volume gain parameter.
[0236] S94: The AudioTrack of the electronic device receives the audio stream to be played.
[0237] For the introduction of S94, please refer to the previous description of S85, which will not be repeated here.
[0238] In an embodiment of the present application, the original audio streams received by AudioTrack at different times may be different. For example, the original audio stream received in a scenario where a speaker is used to output audio in a large volume range may include the first audio and the eighth audio.
[0239] S95, the AudioTrack of the electronic device writes the audio stream to be played to AudioFlinger.
[0240] For the introduction of S95, please refer to the previous description of S86, which will not be repeated here.
[0241] S96, the AudioFlinger of the electronic device preliminarily processes the audio stream, including adjusting the volume, resampling, etc.
[0242] For the introduction of S96, please refer to the description of S87 above, which will not be repeated here.
[0243] Different from S87, adjusting the volume in S96 includes: amplifying the overall amplitude of the original audio stream by a corresponding multiple according to a standard volume gain parameter (e.g., a 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 approximately 1 times.
[0244] In an embodiment of the present application, the audio obtained after AudioFlinger amplifies the original audio stream, such as the first audio, can also be called the second audio, and the audio obtained after AudioFlinger amplifies the original audio stream, such as the eighth audio, can also be called the ninth audio.
[0245] S97, the AudioFlinger of the electronic device sends the preliminarily processed audio stream to Histen.
[0246] Specifically, after AudioFlinger of the electronic device preliminarily processes the audio stream according to the standard volume gain parameter, it sends the preliminarily processed audio stream to Histen, so that Histen further processes the preliminarily processed audio stream according to the large volume gain.
[0247] S98, Histen of the electronic device further amplifies the volume of the audio stream after the preliminary processing.
[0248] Specifically, the Histen of the electronic device uses a large volume gain parameter to further amplify the volume of the audio stream after preliminary processing, specifically including: selecting the mid-high frequency part of the audio stream after preliminary processing, amplifying only the amplitude of the audio stream of the mid-high frequency part according to the amplification factor corresponding to the large volume gain parameter, and then merging the amplified mid-high frequency part and other unamplified frequency parts to obtain the final processed audio stream.
[0249] In an embodiment of the present application, the audio obtained by Histen after amplifying the initially processed audio stream sent by AudioFlinger, such as the second audio, can also be called the third audio, and the audio obtained after amplifying the initially processed audio stream, such as the ninth audio, can also be called the tenth audio.
[0250] The medium and high frequencies may be, for example, 1280 Hz to 2560 Hz, and the embodiment of the present application does not impose any specific limitation on this value.
[0251] S99, Histen of the electronic device returns the final processed audio stream to AudioFlinger.
[0252] S100: AudioFlinger of the electronic device sends the final processed audio stream to the audio driver.
[0253] Specifically, after receiving the final processed audio stream returned by Histen, 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.
[0254] Since the final processed audio stream at this time is based on the volume that is initially amplified at the highest volume level within the standard volume range, and the volume of the mid- and high-frequency parts of the audio stream is further amplified, it is sufficient for the user to hear the loud and clear audio output by the speaker.
[0255] In addition, in the embodiment of the present application, if the electronic device is connected to a peripheral device (i.e., the peripheral device is selected to output audio), the high volume mode does not apply. Only when the electronic device is not connected to a peripheral device (i.e., the speaker is selected to output audio), the high volume mode may be applied. Therefore, connecting a peripheral device or unplugging a peripheral device will also trigger the electronic device to switch the audio output mode.
[0256] To this end, the present 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 device before the connection / unplugging of the peripheral device under the trigger of the connection / unplugging of the peripheral device. The details are as follows:
[0257] like Fig. 9 As shown, the OS interaction method includes the following steps:
[0258] S111, the AudioService of the electronic device obtains information about the connected peripheral device.
[0259] Specifically, when the electronic device is only connected to a peripheral device and the volume is not adjusted, the AudioService of the electronic device may only obtain information about the connected peripheral device.
[0260] It can be understood that the acquisition of the information of the connected peripheral device by the AudioService of the electronic device in S111 can also be understood as the electronic device selecting the peripheral device to output the audio, for example, in the above UI embodiment Figure 3 or Figure 5 The scene shown.
[0261] Different from the aforementioned S81 or S89, the AudioService at this time only receives the information about connecting to the peripheral device, but does not include the volume adjustment information.
[0262] S112, the AudioService of the electronic device obtains the audio output mode of the current application from Histen, such as a high volume mode.
[0263] Specifically, after the AudioService of the electronic device obtains the information of the connected peripheral device, it can obtain the audio output mode of the current application through Histen, and then determine whether to switch the audio output mode or continue to keep the audio output mode unchanged. If the audio output mode remains unchanged, there is no need to execute subsequent S113-S115.
[0264] S113, the AudioService of the electronic device determines the audio output mode, such as exiting the high volume mode.
[0265] Specifically, when the AudioService of the electronic device obtains from Histen that the audio output mode of the current application is in high volume mode, and the electronic device is connected to a peripheral device (equivalent to selecting the peripheral device to output audio), since the peripheral device does not need to use the high volume mode to output audio, the AudioService determines to exit the high volume mode.
[0266] In addition, if the audio output mode of the current application obtained by the AudioService of the electronic device from Histen is the standard mode, and the electronic device is connected to a peripheral device which is equivalent to using the peripheral device to output audio, since the use of the peripheral device to output audio does not require a high volume mode, it is determined to continue using the high volume mode.
[0267] S114, the AudioService of the electronic device sends an instruction to AudioFlinger to exit the high volume mode.
[0268] Specifically, after receiving the instruction from AudioService to exit the high volume mode, the AudioFlinger of the electronic device can switch the parameters for processing the audio stream from the parameters in the high volume mode to the parameters in the standard mode, and the parameters in the standard mode may include: the standard gain parameters used when the standard mode was used most recently. The specific implementation of the standard gain parameters used by AudioFlinger to process the audio stream can be referred to the detailed description of S87 above, which will not be repeated here.
[0269] S115, AudioFlinger of the electronic device sends an instruction to Histen to exit the high volume mode.
[0270] Specifically, after receiving the instruction from AudioFlinger to exit the high volume mode, Histen of the electronic device no longer uses the high volume gain parameter used previously to process the audio stream.
[0271] The above S111-S115 only introduces the specific implementation steps of triggering the electronic device to switch the audio output mode when the electronic device is connected to a peripheral device. Next, S116-S120 introduces the specific implementation steps of triggering the electronic device to switch the audio output mode when the electronic device is unplugged from a peripheral device.
[0272] In addition, when the electronic device executes the above S111-S115, the AudioService of the electronic device can obtain the information of unplugging the peripheral device at any time, depending on when the user unplugs the peripheral device or switches the audio device. Therefore, S116-S120 can be triggered and executed at any time in S111-S115.
[0273] S116, the AudioService of the electronic device obtains information about unplugging the peripheral device.
[0274] Specifically, when the electronic device is only plugged into a peripheral device and the volume is not adjusted, the AudioService of the electronic device may only obtain information about unplugging the peripheral device.
[0275] It can be understood that the information that the AudioService of the electronic device obtains the unplugged peripheral in S116 can also be understood as the electronic device selecting a speaker to output audio, for example, in the above UI embodiment Figure 4 or Figure 6 The scene shown.
[0276] Different from the aforementioned S81 or S89, the AudioService at this time only receives the information of unplugging the peripheral device, but does not include the volume adjustment information.
[0277] S117, the AudioService of the electronic device obtains the audio output mode of the current application from Histen, such as the standard mode.
[0278] Specifically, after obtaining the information of unplugging the peripheral device, the AudioService of the electronic device can obtain the audio output mode of the current application through Histen, and then determine whether to switch the audio output mode or keep the audio output mode unchanged. If the audio output mode remains unchanged, there is no need to execute subsequent S118-S120.
[0279] S118, the AudioService of the electronic device determines an audio output mode, such as turning on a high volume mode.
[0280] Specifically, when the AudioService of the electronic device obtains from Histen that the audio output mode of the current application is standard mode, and the electronic device unplugs the peripheral device (equivalent to selecting the speaker to output audio), since the last time the speaker was used to output audio was in high volume mode, the AudioService determines to turn on the high volume mode again.
[0281] S119, the AudioService of the electronic device sends an instruction to AudioFlinger to enable a high volume mode.
[0282] Specifically, after receiving the instruction from AudioService to turn on the high volume mode, the AudioFlinger of the electronic device can switch the parameters used to process the audio stream from the parameters in the standard mode to the parameters in the high volume mode, and the parameters in the high volume mode may include: the standard gain parameters and the high volume gain parameters used when the high volume mode was last used. For the specific implementation of the standard gain parameters used by AudioFlinger to preliminarily process the audio stream, please refer to the detailed description of S96 above, which will not be repeated here.
[0283] S120, the AudioFlinger of the electronic device sends a command to Histen to turn on the high volume mode.
[0284] Specifically, after receiving the instruction from AudioFlinger to turn on the high volume mode, Histen of the electronic device switches to the previously used high volume gain parameter to process the audio stream. The specific implementation of Histen using the high volume gain parameter to process the audio stream can refer to the detailed description of S98 above, which will not be repeated here.
[0285] visible, Fig. 9 The OS interaction method shown is similar to Figure 8 The difference between the OS interaction method shown is that Fig. 9 The AudioService in the AudioService will obtain the currently used audio output mode from Histen each time it receives a trigger of connecting / unplugging a peripheral device, and then determine whether to switch the audio output mode based on the information of the connected / unplugged peripheral device and the currently used audio output mode. If not, the subsequent steps will not be repeated. Figure 8 The AudioService in the audio service does not consider the currently applied audio output mode each time it is triggered by receiving relevant information indicating audio output. Therefore, the audio output mode applied before and after receiving the relevant information indicating audio output may be the same, but the AudioService will additionally execute subsequent steps such as (S83-S84 or S81-S83).
[0286] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structure of the electronic device is illustrated.
[0287] Fig.10 It is a schematic diagram of the software architecture of the electronic device according to an embodiment of the present application.
[0288] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. The system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime layer and kernel layer.
[0289] The application layer can include a series of application packages. Fig.10 As shown, the application package may include applications such as music, video, call, Bluetooth, etc.
[0290] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Fig.10 As shown, the application framework layer may include an audio service (AudioService), an audio system (AudioSystem), an audio track (AudioTrack), and an audio server (AudioServer), etc. Among them, the AudioServer includes an audio manager (AudioFlinger) and an algorithm module (such as a Histen module).
[0291] Among them, AudioService is a system-level audio service, which is used to provide audio playback related services for various applications. AudioService can be used to detect business requests initiated by various applications such as volume adjustment, audio start or stop playback, and respond to the request to start scheduling related modules to perform corresponding tasks, such as notifying AudioSystem. AudioService is also used to synchronize the volume on the UI.
[0292] Among them, AudioSystem is equivalent to the inner class of AudioService, which can be called by AudioService as a bridge for interaction between the Java layer and the native layer. Specifically, it can be used to receive the volume adjustment information sent by AudioService. AudioSystem is also used to control AudioFlinger to perform related tasks according to the instructions sent by AudioService.
[0293] Among them, AudioTrack provides an interface for playing audio. AudioTrack can only play audio streams in PCM format.
[0294] Among them, AudioFlinger is responsible for the management of audio stream devices and the processing and transmission of audio stream data (AudioStream), including: volume calculation, resampling, mixing, etc. Among them, volume calculation includes: the process of processing the original audio stream according to the volume set by the user, usually the volume calculation is performed in the resampling stage. Mixing includes: receiving audio stream data from multiple apps and merging them into a PCM audio stream. Then send it to the responding device to output the audio.
[0295] The runtime includes system libraries and a virtual machine. The runtime is responsible for the scheduling and management of the Android system. The system library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library.
[0296] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0297] The system library can include multiple functional modules. For example: Media Libraries, surface manager, etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library can include functional modules such as AudioSystem, AudioTrack, and AudioFlinger corresponding to the Framework layer.
[0298] Most of the classes in the Framework layer are just "intermediaries" for applications to use library files in the system library. Because the upper-level applications are written in Java, they need the most direct support of Java interfaces, while the system library supports the operation of another language (such as C++). Therefore, the Framework layer acts as an intermediary between the application layer and the system library. Each module in the Framework layer does not really implement specific functions, or only implements part of the functions, and focuses on the core library to complete them. For example, AudioSystem, AudioTrack, and AudioFlinger in the Framework layer also have corresponding classes in the system library. The difference is that the Framework layer is mostly written in Java, while the system library is mostly written in C++.
[0299] The kernel layer is the layer between hardware and software. The kernel layer contains at least audio drivers, display drivers, Bluetooth drivers, etc. The kernel layer is used to receive instructions from the software layer to control the corresponding hardware to perform corresponding tasks. For example, the audio driver is used to receive the audio stream sent by AudioFlinger and control the corresponding audio output device (speakers, headphones, etc.) to output the audio stream.
[0300] Understandably, Fig.10 The illustrated software architecture does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer modules than those shown in the figure, or combine some modules, or split some modules, etc. Fig.10 The specific functions of the various modules in the volume control method provided in this application can also be referred to the description of OS interaction above, which will not be repeated here.
[0301] refer to Fig.11 , Fig.11 A schematic diagram of the hardware architecture of an electronic device is shown.
[0302] Electronic equipment can be equipped Or portable terminal devices with other operating systems, such as mobile phones, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants (PDA), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, vehicle-mounted devices, smart home devices and / or smart city devices, etc.
[0303] The electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a camera 193, a display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, an acceleration sensor 180C, etc.
[0304] It is to 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 present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0305] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0306] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0307] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0308] In the embodiment of the present application, the processor 110 is a multi-core processor, that is, it includes multiple core processors, such as one or more large cores and one or more small cores. The performance of the large core processor is better than that of the small core processor, that is, when a thread is executed on a large core, its execution speed is faster than that on a small core.
[0309] In the embodiment of the present application, the processor 110 is used to control the corresponding software and hardware modules to execute the above Figure 7-Figure 9 The method introduced.
[0310] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0311] The USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to connect a charger to charge the electronic device.
[0312] In the present application, the USB interface 130 may also be used to transmit data between the electronic device and a peripheral device, for example, it may be used to connect headphones and play audio through the headphones.
[0313] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0314] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of an electronic device. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0315] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0316] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0317] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0318] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0319] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate 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. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0320] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to electronic devices. The wireless communication module 160 can be one or more devices integrating 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 sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0321] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).
[0322] The electronic device implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0323] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), miniLED, microLed, micro-oled, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0324] In the embodiment of the present application, the electronic device can display, for example, the following information provided in the above UI embodiment through the display screen 194: Figure 2-Figure 6 The user interface shown and so on will not be described in detail here.
[0325] The electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0326] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise and brightness of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0327] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal 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 other format. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0328] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency point, a digital signal processor is used to perform Fourier transform on the frequency point energy.
[0329] Video codecs are used to compress or decompress digital videos. Electronic devices can support one or more video codecs. In this way, electronic devices can play or record videos in multiple coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0330] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and continuously self-learn. NPU can realize applications such as intelligent cognition of electronic devices, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0331] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0332] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.;
[0333] Non-volatile memory may include disk storage devices and flash memory.
[0334] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.
[0335] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0336] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0337] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device. The external non-volatile 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 videos are stored in the external non-volatile memory.
[0338] The electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0339] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0340] Speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device can listen to music or listen to hands-free calls through speaker 170A. In an embodiment of the present application, the electronic device can choose to use speaker 170A to output audio 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 will control the corresponding software and hardware modules to execute the aforementioned method flow so that the speaker 170A outputs loud audio so that the user can hear the audio content clearly.
[0341] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0342] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device can be provided with at least one microphone 170C. In other embodiments, the electronic device can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, and directional recording function, etc.
[0343] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0344] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device detects the touch operation intensity according to the pressure sensor 180A. The electronic device can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0345] The touch sensor 180B is also called a "touch panel". The touch sensor 180B can be arranged on the display screen 194, and the touch sensor 180B and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180B is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180B can also be arranged on the surface of the electronic device, which is different from the position of the display screen 194.
[0346] In the present application, the electronic device can detect the operation of adjusting the volume or switching the audio device on the display screen 194 through the pressure sensor 180A and the touch sensor 180B, so that the electronic device responds to the operation and performs the corresponding tasks of adjusting the volume and switching the device as described above.
[0347] In the embodiment of the present application, the electronic device can also determine the motion posture of the electronic device, such as whether the user lifts or picks up the electronic device, by detecting the acceleration on the three axes of X, Y, and Z on the acceleration sensor 180C.
[0348] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key or a touch key. The electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
[0349] In the present application, the electronic device can detect an operation for adjusting the volume through the volume key, so that the electronic device performs the task of adjusting the volume in response to the operation.
[0350] It should be understood that each step in the above method embodiment provided by the present application can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0351] The present application also provides an electronic device, which may include: a memory and a processor. The memory may be used to store a computer program; the processor may be used to call the computer program in the memory so that the electronic device executes the method in any one of the above embodiments.
[0352] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method executed by the electronic device in any of the above embodiments.
[0353] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.
[0354] The chip system may be composed of the chip, or may include the chip and other discrete devices.
[0355] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0356] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
[0357] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0358] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which enables a computer to execute the method executed by the electronic device in any of the above embodiments when the computer program is executed.
[0359] The present application also provides a computer-readable storage medium, which stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the electronic device in any of the above embodiments.
[0360] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
[0361] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can 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 can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk), etc.
[0362] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0363] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.
Claims
1. A volume control method, characterized in that: The method is applied to an electronic device, and the method comprises: When the electronic device is not connected to an external audio device, a first interface is displayed, wherein the first interface includes a volume adjustment bar in a first state, the volume adjustment bar in the first state includes a first area and a second area, and the first area and the second area have different colors; In response to an operation of increasing the volume, displaying an animation of the first area of the volume adjustment bar in the first state becoming larger; After the volume is adjusted to the maximum, a volume adjustment bar in a second state is displayed, wherein the volume adjustment bar in the second state includes the first area and the third area, the third area and the first area have different colors, and the third area and the second area have different colors; After the electronic device is connected to the earphone, a second interface is displayed, wherein the second interface includes second prompt information, and the second prompt information includes information for exiting the preset volume mode.
2. The method according to claim 1, characterized in that After the electronic device is connected to the earphone, the method further includes: In response to the operation of increasing the volume to a preset value, a third prompt message is displayed, wherein the third prompt message includes information that the headphone volume is too high.
3. The method according to claim 1 or 2, characterized in that: After adjusting the volume to the maximum, the method further includes: A first prompt message is displayed, wherein the first prompt message includes information for entering a preset volume mode.
4. The method according to any one of claims 1 to 3, characterized in that In response to the operation of adjusting the volume to the maximum, the method further includes: In response to the operation of reducing the volume, the second prompt information is displayed, and the second information includes information for exiting the preset volume mode.
5. The method according to any one of claims 1 to 4, characterized in that After the electronic device is connected to the earphone, the method further includes: Display an audio device card, wherein the audio device card includes at least two audio device options, and the at least two audio device options include a speaker option and a headphone option; In response to an operation of clicking the headphone option, the second prompt information is displayed, and the second prompt information includes information for exiting a preset volume mode.
6. The method according to any one of claims 1 to 5, characterized in that After responding to the operation of increasing the volume, before displaying the animation of the first area of the volume adjustment bar in the first state being large, the method further includes: determining that the increased volume is less than a volume threshold; After the volume is adjusted to the maximum and before the volume adjustment bar in the second state is displayed, the method further includes: determining that the increased volume is greater than the volume threshold.
7. The method according to any one of claims 1 to 6, characterized in that The electronic device has a built-in speaker, and after the volume is adjusted to the maximum, the method further includes: Amplifying the overall amplitude of the first audio to obtain a second audio, where the second audio corresponds to a volume threshold; Amplifying the audio amplitude within the preset frequency range in the second audio to obtain a third audio, wherein the third audio corresponds to a maximum volume, the maximum volume is greater than the volume threshold, and the preset frequency range is a range corresponding to medium and high frequencies; The third audio is output through the speaker.
8. The method according to claim 7, characterized in that Amplifying the overall amplitude of the first audio specifically includes: amplifying the overall amplitude of the first audio according to the gain corresponding to the volume threshold through the audio manager AudioFlinger.
9. The method according to claim 7 or 8, characterized in that: Amplifying the audio amplitude within a preset frequency range in the second audio specifically includes: The audio amplitude within a preset frequency range in the second audio is amplified by AudioFlinger according to the gain corresponding to the maximum volume.
10. The method according to any one of claims 1 to 9, characterized in that Before adjusting the volume to the maximum, the method further includes: amplifying the overall amplitude of the fourth audio according to the gain corresponding to the third volume to obtain a fifth audio; The fifth audio is output through the speaker.
11. The method according to any one of claims 1 to 10, characterized in that After the electronic device is connected to the earphone, the method further includes: amplifying the overall amplitude of the sixth audio according to a gain corresponding to a fourth volume to obtain a seventh audio, wherein the fourth volume is the volume set when the audio is most recently output through the earphone; The seventh audio is output through the earphone.
12. An electronic device, characterized in that: The electronic device includes a built-in speaker, an external audio camera, a screen, a memory, and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in any one of claims 1-11.
13. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 11.