Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a volume configuration method of a split screen window, a storage medium and a terminal device, and aims to solve the problem that the existing native volume control method cannot realize different applications to sound with different volumes.
In order to solve the above technical problem, a first aspect of an embodiment of the present application provides a volume configuration method, where the volume configuration method includes:
when the terminal equipment receives the volume adjusting instruction, detecting the screen state of the terminal equipment;
and if the terminal equipment is detected to be in the split screen state, entering a split screen window volume adjusting mode, and respectively adjusting the sound track volumes of different applications.
Optionally, the volume configuration method, wherein if it is detected that the terminal device is in a split-screen state, entering a split-screen window volume adjustment mode, and adjusting the volumes of the audio tracks of different applications respectively includes:
if the terminal equipment is detected to be in the split screen state, entering a split screen window volume adjusting mode and popping up a split screen window volume adjusting interface;
and selecting an application in the split screen window volume adjusting interface, and adjusting the volume of the sound track of the application through a volume key and storing the sound track.
Optionally, the volume configuration method, wherein the step of adjusting and saving the volume of the track of the application by a volume key includes:
the adjusted volume level of the track is stored in the track data in correspondence with the identification information of the application.
Optionally, the volume configuration method further includes:
and if the terminal equipment is detected to be in a full screen state, entering a primary volume control mode, and adjusting the volume of the audio stream of the terminal equipment.
Optionally, the volume configuration method includes, if it is detected that the terminal device is in a full screen state, entering a native volume control mode, and adjusting the volume of an audio stream of the terminal device, including:
if the terminal equipment is detected to be in a full screen state, entering a primary volume control mode and popping up a system volume adjusting interface;
and adjusting the volume of the audio stream of the terminal equipment through a volume key and storing the volume.
Optionally, the volume configuration method further includes:
monitoring the state of a volume key on the terminal equipment;
and if the volume key is monitored to be pressed, judging that the terminal equipment receives a volume adjusting instruction.
A second aspect of the embodiments of the present application provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the steps in the volume configuration method according to any one of the above items.
A third aspect of the embodiments of the present application provides a terminal device, including: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the volume configuration method as described in any one of the above.
Optionally, the terminal device is one of a computer, a mobile phone, a television and a tablet.
Has the advantages that: compared with the prior art, the application provides a volume configuration method, a storage medium and a terminal device, wherein the volume configuration method comprises the following steps: when the terminal equipment receives the volume adjusting instruction, detecting the screen state of the terminal equipment; and if the terminal equipment is detected to be in the split screen state, entering a split screen window volume adjusting mode, and respectively adjusting the sound track volumes of different applications. The method and the device overcome the defect that the Android native volume control cannot realize the independent control of the volume of the same audio stream, realize that a user can independently control the volume of different applications in a multi-window mode, and improve the user experience of the user in the scene.
Detailed Description
In order to make the purpose, technical scheme and effect of the present application clearer and clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In particular implementations, the terminal devices described in embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptops, or tablet computers with touch sensitive surfaces (e.g., touch displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch-sensitive display screen and/or touchpad).
In the discussion that follows, a terminal device that includes a display and a touch-sensitive surface is described. However, it should be understood that the terminal device may also include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The terminal device supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a video conferencing application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a data camera application, a digital video camera application, a web browsing application, a digital music player application, and/or a digital video playing application, etc.
Various applications that may be executed on the terminal device may use at least one common physical user interface device, such as a touch-sensitive surface. The first or more functions of the touch-sensitive surface and the corresponding information displayed on the terminal may be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical framework (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
It should be understood that, the sequence numbers and sizes of the steps in this embodiment do not mean the execution sequence, and the execution sequence of each process is determined by its function and inherent logic, and should not constitute any limitation on the implementation process of this embodiment.
The inventor finds that the Android native volume control method sets separate audio streams for different types of audio, and a user can independently control the volume of the corresponding audio streams. Although the native volume control logic can independently control the volumes of different types of audio streams, it is impossible to control the volumes of different applications in the same audio stream, and in a multi-window scenario, a scenario in which multiple applications sound simultaneously occurs, and the existing native volume control logic cannot realize that different applications sound with different volumes.
In order to solve the above problem, the present invention provides a volume configuring method, as shown in fig. 1, the method comprising the steps of:
s10, when the terminal device receives the volume adjusting instruction, detecting the screen state of the terminal device;
and S20, if the terminal device is detected to be in the split screen state, entering a split screen window volume adjusting mode, and respectively adjusting the sound track volumes of different applications.
Specifically, according to the android standard flow, the volume is composed of three parts, namely, volume _ track _ volume (track volume) stream _ volume (audio stream volume) master _ volume (hardware volume), wherein the volume change of the audio stream can affect the volume of the same audio stream, and the volume value of the hardware volume sound card device is determined by a manufacturer and is not generally modified; the volume of a track will only affect a single AudioTrack and not the other volumes. The original android process changes the volume by changing the volume of the audio stream, and in order to implement separate control of the volume, the volume of the track needs to be controlled.
In this embodiment, a volume configuration method based on a split-screen window is designed, where a terminal device is determined first when volume adjustment is triggered, and if the terminal device is in a split-screen state, the terminal device is controlled to enter a split-screen window volume adjustment mode, so as to respectively adjust and control the volume of audio tracks of different applications in the terminal device. The embodiment overcomes the defect that the Android native volume control cannot realize the independent control of the volume of the same audio stream, realizes that the user can independently control the volume of different applications in a multi-window mode, and improves the user experience of the user in the scene.
In some embodiments, if the terminal device is detected to be in a split screen state, entering a split screen window volume adjustment mode and popping up a split screen window volume adjustment interface; and selecting an application in the split screen window volume adjusting interface, and adjusting the volume of the sound track of the application through a volume key and storing the sound track.
Specifically, the state of a volume key on the terminal equipment is monitored; if the volume key is monitored to be pressed, the terminal device is judged to receive a volume adjusting instruction, the screen state of the terminal device is detected, if the terminal device is detected to be in the split screen state, a split screen window volume adjusting mode is entered, a split screen window volume adjusting interface shown in figure 2 is popped up, the split screen window volume adjusting interface comprises a sound production mode item, a system volume item and a plurality of application volume adjusting items, and the sound production mode item displays that the sound production mode when the current terminal device is in the split screen state is an application independent sound production mode. At this time, the user can click and select the corresponding application item, and the volume of the audio track of the corresponding application is set through the volume key.
In this embodiment, as shown in fig. 3, when an application on the terminal device starts playing audio, the android system in the terminal device creates a corresponding AudioTrack by default, stores all identification information related to the application, and finally triggers the bottom layer to create and bind a track instance; after the binding is completed, the audio track set is added to the audio track set of the playing thread created by the same output device, and the playing thread performs mixed output on all audio track data in the set, which shows that the android terminal device simultaneously outputs audio information data from different applications. The key to realize the independent control of the multi-application volume in the embodiment is to provide a path outside the android basic flow, allow the upper layer to perform the volume setting operation on the target audio track by transmitting the application information to the bottom layer and matching the application information with the audio track, and modify the value of the track _ volume, thereby achieving the effect of independently adjusting the volume of a certain application.
In some embodiments, the status of a volume key on the terminal device is monitored; if the volume key is monitored to be pressed, judging that the terminal equipment receives a volume adjusting instruction, detecting the screen state of the terminal equipment, and if the terminal equipment is detected to be in a full-screen state, entering a native volume control mode and popping up a system volume adjusting interface shown in fig. 4; and adjusting the volume of the audio stream of the terminal equipment through a volume key and storing the volume.
In this embodiment, the system volume adjustment interface includes a sound production mode item and a system volume item, where the sound production mode item displays that a sound production mode when the current terminal device is in a full screen state is "controllable application sound production", and a user may select the system volume item and set the volume of an audio stream through a volume key.
Based on the volume configuration method, the present embodiment provides a computer-readable storage medium, which stores one or more programs that can be executed by one or more processors to implement the steps in the volume configuration method according to the above embodiment.
Based on the above volume configuration method, the present application further provides a terminal device, as shown in fig. 5, which includes at least one processor (processor) 20; adisplay screen 21; and a memory (memory)22, and may further include a communication Interface (Communications Interface)23 and abus 24. Theprocessor 20, thedisplay 21, thememory 22 and thecommunication interface 23 can communicate with each other through thebus 24. Thedisplay screen 21 is configured to display a user guidance interface preset in the initial setting mode. Thecommunication interface 23 may transmit information. Theprocessor 20 may call logic instructions in thememory 22 to perform the methods in the embodiments described above.
Furthermore, the logic instructions in thememory 22 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
Thememory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. Theprocessor 20 executes the functional application and data processing, i.e. implements the method in the above-described embodiments, by executing the software program, instructions or modules stored in thememory 22.
Thememory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, thememory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be transient storage media.
In addition, the specific processes loaded and executed by the storage medium and the instruction processors in the terminal device are described in detail in the above method, and are not stated herein.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.