[0045] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
[0046] See figure 1 , Shows a schematic flow chart of a volume adjustment method provided by an embodiment of the present invention. The volume adjustment method is applied to a terminal. The terminal may be, but is not limited to, PCs, mobile phones, pads, and other devices. The volume adjustment method may include:
[0047] Step S101: When a volume adjustment instruction is received, it is detected whether an audio stream is currently playing audio in the terminal.
[0048] When the user performs a volume adjustment operation, the terminal receives a volume adjustment instruction. It can be understood that for different terminals and different applications, the user may perform various volume adjustment operations, such as the user operating the volume adjustment button on the terminal, the user dragging the volume progress bar displayed on the terminal, and so on.
[0049] Step S102: When the terminal currently has an audio stream playing audio, determine the application scenario corresponding to the audio stream being played.
[0050] Exemplarily, the application scene may be a standby scene, a call scene, a short message scene, a multimedia scene, an alarm clock scene, and so on.
[0051] Step S103: Adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario corresponding to the audio stream of the audio being played.
[0052] It should be noted that in order to adapt to the volume adjustment function in different application scenarios, the terminal has an independent volume adjustment function for each different application scenario, and the volume adjustment in any application scenario will not affect the volume adjustment of other application scenarios. Therefore, the volume adjustment result is applied to the application scenario corresponding to the audio stream of the audio being played, that is, the volume of the audio played in the application scenario is adjusted.
[0053] In this embodiment, the volume adjustment command may be a volume increase command or a volume decrease command. Correspondingly, when the volume adjustment command is a volume increase command, the volume of the audio being played in the determined application scene is increased, and when the volume adjustment command is a volume decrease command, the audio volume being played in the determined application scene is increased The volume is reduced.
[0054] In the volume adjustment method provided by the embodiment of the present invention, when the terminal receives a volume adjustment instruction, it first detects whether there is an audio stream currently playing audio on the terminal, and when the terminal currently has an audio stream playing audio, it determines whether the audio stream is the same as the audio stream being played. The corresponding application scenario, then adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario corresponding to the audio stream of the audio being played. It can be seen that regardless of the application scenario of the foreground, the volume adjustment method provided in the embodiment of the present invention adjusts the volume of the audio currently being played, which makes it possible to use the audio as long as there is audio being played in the background scene. Perform volume adjustment, instead of switching from the background to the foreground and then adjust the volume as in the prior art, that is, the volume adjustment method provided by the embodiment of the present invention allows the user to perform a simple operation on the volume of the audio being played in the background. Adjustment greatly improves user experience.
[0055] It can be seen from the foregoing embodiments that the volume adjustment method provided by the present invention adjusts the audio currently being played by the audio stream on the terminal. However, in actual applications, there may be a situation where the terminal is currently not playing audio with the audio stream. For this situation, See figure 2 , Shows another schematic flow chart of the volume adjustment method provided by the embodiment of the present invention. The volume adjustment method is applied to a terminal. The terminal may but is not limited to a PC, a mobile phone, a pad, etc. The volume adjustment method may include:
[0056] Step S201: When a volume adjustment instruction is received, it is detected whether an audio stream is currently playing audio in the terminal.
[0057] Among them, the audio stream is used to play audio, and it is detected whether an audio stream is currently playing audio in the terminal, that is, it is detected whether an audio stream is playing audio in the audio system of the terminal.
[0058] Step S202a: When the terminal currently has an audio stream playing audio, determine the application scenario corresponding to the audio stream that is playing audio, and then perform step S203.
[0059] Exemplarily, application scenarios may be, but are not limited to, standby scenarios, call scenarios, short message scenarios, multimedia scenarios, alarm clock scenarios, and so on.
[0060] Step S203: Adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario corresponding to the audio stream of the audio being played.
[0061] In this embodiment, the volume adjustment command may be a volume increase command or a volume decrease command. Correspondingly, when the volume adjustment command is a volume increase command, the volume of the audio being played in the determined application scene is increased, and when the volume adjustment command is a volume decrease command, the audio volume being played in the determined application scene is increased The volume is reduced.
[0062] Exemplarily, when the terminal currently has an audio stream playing audio, it is determined that the application scene corresponding to the audio stream being played is a multimedia scene, then the audio volume in the multimedia scene is adjusted, assuming that the audio played in the multimedia scene is music , The user will hear the volume of the music played on the terminal increase or decrease.
[0063] Step S202b: When the terminal does not currently have an audio stream playing audio, adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario of the terminal foreground.
[0064] Exemplarily, the terminal does not currently have an audio stream playing audio, and the application scenario of the terminal’s foreground is a text message scenario. When the volume is adjusted, the volume of the audio in the text message scenario is adjusted. For example, when the volume is increased, the text message The ringtone of will increase.
[0065] In the volume adjustment method provided by the embodiment of the present invention, when the terminal receives a volume adjustment instruction, it first detects whether there is an audio stream currently playing audio on the terminal, and when the terminal currently has an audio stream playing audio, it determines whether the audio stream is the same as the audio stream being played. The corresponding application scenario, and then adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario corresponding to the audio stream of the audio being played. It can be seen that, regardless of the application scenario of the foreground, the volume adjustment method provided in the embodiments of the present invention adjusts the audio currently being played, which makes it possible to volume the audio as long as there is audio being played in the background scene. It is not necessary to switch from the background to the foreground and then adjust the volume as in the prior art. That is, the volume adjustment method provided by the embodiment of the present invention allows the user to adjust the volume of the audio being played in the background through a simple operation. Improve the user experience. In addition, in the method provided by the embodiment of the present invention, when the terminal currently has no audio stream playing audio, the volume adjustment result is applied to the application scenario of the terminal foreground, which makes the volume adjustment process more intelligent and more user-friendly, and further commissions Improve the user experience.
[0066] In any of the foregoing embodiments, when the terminal currently has an audio stream playing audio, the specific implementation process of determining the application scenario corresponding to the audio stream being played is: when the terminal currently has an audio stream playing audio, based on The preset correspondence between the audio stream and the application scenario determines the application scenario corresponding to the audio stream that is playing audio.
[0067] Exemplarily, the preset correspondence between audio streams and application scenarios includes: audio stream 1 corresponds to a call scene, audio stream 2 corresponds to a multimedia scene, and audio stream 3 corresponds to a short message scene. When the terminal currently has an audio stream to play audio, if the audio stream playing the audio is audio stream 2, then according to the corresponding relationship between the audio stream and the application scenario, it can be determined that the application scenario corresponding to audio stream 2 is a multimedia scenario, then it is determined After the multimedia scene, the volume adjustment result is applied to the multimedia scene, that is, the volume of the audio played in the multimedia scene is adjusted to increase or decrease.
[0068] In the volume adjustment method provided by any of the foregoing embodiments, there may be a situation where multiple audio streams are playing audio. Then, in this case, the application scenario corresponding to the audio stream being played is determined as follows: The application scenario corresponding to each audio stream of the audio being played is determined, and further, the application scenario corresponding to each audio stream of the audio being played may be determined based on the preset correspondence between the audio stream and the application scenario.
[0069] Correspondingly, the volume is adjusted according to the volume adjustment instruction, and the result of the volume adjustment is applied to the application scenario corresponding to the audio stream being played, specifically: the volume is adjusted according to the volume adjustment instruction, and the result of the volume adjustment is applied to the Application scenarios corresponding to each audio stream.
[0070] Exemplarily, when two audio streams are playing audio on the terminal, it is assumed that the two audio streams are audio stream a and audio stream b, and the corresponding relationship between the audio stream and the application scenario is determined based on the preset setting. , The application scene corresponding to audio stream a is a short message scene, and the application scene corresponding to audio stream b is a multimedia scene, so when the volume is adjusted, the volume of audio in the short message scene and multimedia scene is adjusted at the same time, for example, At the same time adjust the volume of playing music and the volume of SMS ringtones.
[0071] The volume adjustment method provided by the embodiment of the present invention focuses on the audio stream currently being played, and does not care whether the audio stream is an audio stream corresponding to a foreground application scene or an audio stream corresponding to a background application scene. That is, the volume adjustment method provided by the embodiment of the present invention may adjust the audio stream corresponding to the foreground application scene, or may be the audio stream corresponding to the background application scene, or it may have an audio stream corresponding to the foreground application scene. There are also audio streams corresponding to background application scenarios.
[0072] When multiple audio streams are currently playing audio on the terminal, and the application scenarios corresponding to each audio stream being played are all application scenarios in the background of the terminal, adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the The application scenario corresponding to each audio stream being played is specifically: adjusting the volume according to the volume adjustment instruction, and applying the volume adjustment result to each application scenario in the background of the terminal.
[0073] Exemplarily, there are two audio streams currently being played. One of the application scenarios corresponding to the audio stream is the background text message scenario, and the other audio stream corresponds to the background multimedia scenario. Then, when the volume is adjusted, The volume of the audio in the background text message scene and the audio in the background multimedia scene will be adjusted at the same time. If the volume is increased, the user will hear the volume of both the SMS ringtone played in the background and the music played in the background increase.
[0074] When the terminal currently has multiple audio streams playing audio, and some of the application scenarios corresponding to each audio stream being played are the application scenarios of the terminal foreground, and the remaining scenarios are the application scenarios of the terminal background, according to the volume The adjustment instruction adjusts the volume, and applies the volume adjustment result to the application scenario corresponding to each audio stream being played. Specifically: adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario of the terminal foreground and the background of the terminal Application scenarios.
[0075] Exemplarily, there are two audio streams currently being played. One of the audio streams corresponds to the foreground SMS scene, and the other audio stream corresponds to the background multimedia scene. Then, when the volume is adjusted, The volume of the audio in the foreground SMS scene and the audio in the background multimedia scene will be adjusted at the same time. If the volume is increased, the user will hear both the volume of the SMS ringtone in the foreground and the music played in the background.
[0076] Corresponding to the above method, the embodiment of the present invention also provides a volume adjustment device, the volume adjustment device is applied to a terminal, the terminal can be but not limited to PC, mobile phone, pad and other equipment, please refer to image 3 , Shows a schematic structural diagram of a volume adjustment device provided by an embodiment of the present invention. The device may include: an audio stream detection module 301, a scene determination module 302, and a volume adjustment module 303. among them:
[0077] The audio stream detection module 301 is configured to detect whether an audio stream is currently playing audio on the terminal when a volume adjustment instruction is received.
[0078] The scene determination module 302 is configured to determine the application scene corresponding to the audio stream that is playing audio when the audio stream detection module 301 detects that the terminal currently has an audio stream playing audio.
[0079] The volume adjustment module 303 is configured to adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scene determined by the scene determination module 302 and corresponding to the audio stream being played.
[0080] In the volume adjustment method provided by the embodiment of the present invention, when the terminal receives a volume adjustment instruction, it first detects whether there is an audio stream currently playing audio on the terminal, and when the terminal currently has an audio stream playing audio, it determines whether the audio stream is the same as the audio stream being played. The corresponding application scenario, and then adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario corresponding to the audio stream of the audio being played. It can be seen that regardless of the application scenario of the foreground, the volume adjustment method provided in the embodiment of the present invention adjusts the volume of the audio currently being played, which makes it possible to use the audio as long as there is audio being played in the background scene. Perform volume adjustment instead of switching from the background to the foreground and then adjust the volume as in the prior art, that is, the volume adjustment method provided by the embodiment of the present invention allows the user to adjust the volume of the audio being played in the background through simple operations , Which greatly improves the user experience.
[0081] It can be seen from the above embodiment that the volume adjustment device method provided by the present invention adjusts the audio currently being played by the audio stream on the terminal. However, in actual application, there may be a situation where the terminal does not currently have an audio stream being played. For this situation, The present invention proposes a solution:
[0082] When the audio stream detection module 301 does not detect that the terminal currently has an audio stream playing audio, the volume adjustment module 303 adjusts the volume according to the volume adjustment instruction, and applies the volume adjustment result to the application scenario in the foreground of the terminal.
[0083] In a possible implementation manner, the scene determination module 302 in the foregoing embodiment is specifically configured to: when the audio stream detection module 301 detects that an audio stream is currently playing audio on the terminal, based on the preset audio stream and application scenario The correspondence relationship determines the application scenario corresponding to the audio stream of the audio being played.
[0084] In one possible situation, there are multiple audio streams currently playing audio on the terminal.
[0085] The scene determining module 302 is specifically configured to determine the application scenarios corresponding to each audio stream of the audio being played when there are multiple audio streams that are playing audio on the terminal.
[0086] Further, the scene determination module 302 may determine the application scene corresponding to each audio stream that is playing audio based on the preset correspondence between the audio stream and the application scene.
[0087] Correspondingly, the volume adjustment module 303 is specifically configured to adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario determined by the scene determination module 302 and corresponding to each audio stream of the audio being played.
[0088] In a possible situation, application scenarios corresponding to each audio stream currently playing audio on the terminal are all application scenarios in the background of the terminal.
[0089] The volume adjustment module 303 is specifically configured to adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to various application scenarios in the background of the terminal.
[0090] In another possible situation, some of the application scenarios corresponding to each audio stream of the audio currently being played by the terminal are application scenarios in the foreground of the terminal, and the remaining scenarios are application scenarios in the background of the terminal.
[0091] The volume adjustment module 303 is specifically configured to adjust the volume according to the volume adjustment instruction, and apply the volume adjustment result to the application scenario of the terminal foreground and the application scenario of the terminal background.
[0092] The volume adjustment method and device provided by the embodiments of the present invention make it possible to adjust the volume of the audio being played in the current audio stream, no matter how the user operates the terminal, and no matter what application scenario the terminal is in the foreground, that is, as long as there is audio in the background scene When the stream is playing audio, you can adjust the volume of the audio played by the audio stream. The volume adjustment process is smarter, which simplifies the user's operation and greatly improves the user's experience.
[0093] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.
[0094] In the several embodiments provided in this application, it should be understood that the disclosed method, device, and device may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
[0095] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments. In addition, the functional units in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
[0096] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .
[0097] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined in this document can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in this document, but should conform to the widest scope consistent with the principles and novel features disclosed in this document.