Disclosure of Invention
The invention provides a sound following method and device in an all-in-one machine multi-window mode and a storage medium, and aims to solve the problem of sound conflict when the all-in-one machine is in multi-screen display.
In order to achieve the above object, the sound following method in the multi-window mode of the all-in-one machine provided by the invention comprises the following steps:
step S10: entering a multi-window mode of the all-in-one machine to perform split-screen display;
step S20: capturing a currently running application list of the all-in-one machine to determine the application which currently obtains a focus;
step S30: according to the application window displayed in a split screen mode, non-focus application marking is carried out on non-focus applications displayed in the split screen mode in the application list;
step S40: performing audio stream mute processing on the application with the non-focus application mark;
step S50: the focus switching state is judged, and when focus switching occurs, step S30 and step S40 are repeated.
Further, the step S20 includes:
step S210: monitoring the application activity state of the all-in-one machine;
step S220: adding the opened application to a currently running application list;
step S230: monitoring an application switching instruction of the all-in-one machine, and determining a focus switching event according to the switching instruction;
step S240: and determining the application currently obtaining the focus according to the focus switching event.
Further, the applications that obtain focus have one and only one at any point in time.
And further, monitoring the focus switching event by monitoring the position change of a display window among a plurality of applications running on the all-in-one machine.
Further, the step S40 includes:
step S410: capturing an audio stream of a non-focused application marking application corresponding to the application in the audioFlinger of the application;
step S420: and carrying out mute on the audio stream of the non-focus application mark application so as to mute the audio stream in the output audio stream.
Further, the audioFlinger is an audio policy execution program in the all-in-one machine, and the audioFlinger is used for processing and outputting the application audio stream data.
Meanwhile, the invention also provides a sound following device in the all-in-one machine multi-window mode, which comprises a memory and a processor, wherein the memory is stored with a sound following program in the all-in-one machine multi-window mode which can be operated by the processor, and the sound following program in the all-in-one machine multi-window mode realizes the steps of the sound following method in the all-in-one machine multi-window mode when being executed by the processor.
In addition, the present invention also provides a storage medium, which is a computer-readable storage medium, and the storage medium stores a sound following program in the all-in-one machine multi-window mode, where the sound following program in the all-in-one machine multi-window mode can be executed by one or more processors to implement the steps of the sound following method in the all-in-one machine multi-window mode as described above.
According to the sound following method and device under the multi-window mode of the all-in-one machine and the storage medium, the audio stream mutee processing is carried out on the non-focus application by distinguishing the focus, the non-focus distinguishing and the mark of the running application in the all-in-one machine, so that the sound output conflict during multi-screen display of the all-in-one machine is effectively avoided, the normal output of the application audio according to the currently obtained focus is ensured, the audio mixing is avoided, and the user experience is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 2 and fig. 3 together, the present invention provides a sound following method in an all-in-one machine multi-window mode, and in an embodiment of the present invention, the sound following method in the all-in-one machine multi-window mode includes:
step S10: entering a multi-window mode of the all-in-one machine to perform split-screen display; specifically, in an embodiment of the present invention, the multi-window mode of the all-in-one machine implements respective multi-window split-screen display output of multiple systems and multiple applications, for example, an application of the OPS system and an application of the android system, and simultaneously outputs the application of the OPS system and the application of the android system on the same screen of the all-in-one machine.
Step S20: capturing a currently running application list of the all-in-one machine to determine the application which currently obtains a focus; specifically, the step S20 includes:
step S210: monitoring the application activity state of the all-in-one machine; the application activity state comprises the starting, running, ending and switching states of the application;
step S220: adding the opened application to a currently running application list; adding the activity into an application list when the activity is started by setting the running application list;
step S230: monitoring an application switching instruction of the all-in-one machine, and determining a focus switching event according to the switching instruction; monitoring a focus switching event, namely monitoring a key event for application switching of a user so as to determine the focus switching event; the focus switching event can be monitored by monitoring the position change of display windows among a plurality of applications running on the all-in-one machine;
step S240: determining the current application obtaining the focus according to the focus switching event, and positioning the current application through the focus when a plurality of applications exist; specifically, in a screen splitting mode of the all-in-one machine, when an information source and any android application are split, a Windows manager service in an android system determines an application which currently obtains a focus according to the application currently used by a user; the applications that obtain focus are one and only one at any point in time.
Step S30: according to the application window displayed in a split screen mode, non-focus application marking is carried out on non-focus applications displayed in the split screen mode in the application list; since the application that gets focus is unique, only one application gets focus at any point in time, and therefore, other applications that do not get focus are marked for non-focus applications.
Step S40: performing audio stream mute processing on the application with the non-focus application mark; specifically, the step S40 includes:
step S410: capturing an audio stream of a non-focused application marking application corresponding to the application in the audioFlinger of the application; the audioFlinger is an audio policy execution program in the all-in-one machine, and is used for processing and outputting the application audio stream data.
Step S420: and carrying out mute on the audio stream of the non-focus application mark application so as to mute the audio stream in the output audio stream.
Step S50: the focus switching state is judged, and when focus switching occurs, step S30 and step S40 are repeated. Therefore, at any point in time, only the application that obtains the focus is not muted, i.e. the audio can be played normally, while the other applications that do not obtain the focus are muted, thereby avoiding the conflict caused by the sound output of multiple applications, and as the focus is switched, the sound output is also switched as the focus is switched.
In addition, the invention also provides a sound following device in the multi-window mode of the all-in-one machine.
Referring to fig. 4, an embodiment of the invention provides an internal structure diagram of a sound following device in an all-in-one machine multi-window mode, where the sound following device in the all-in-one machine multi-window mode at least includes a memory 11, aprocessor 12, acommunication bus 13, and anetwork interface 14.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal memory unit of the sound following apparatus in the combo multi-window mode, for example a hard disk of the sound following apparatus in the combo multi-window mode. The memory 11 may also be an external storage device of the sound follower device in the all-in-one multi-window mode in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the sound follower device in the all-in-one multi-window mode. Further, the memory 11 may also include both an internal storage unit and an external storage device of the sound following apparatus in the all-in-one multi-window mode. The memory 11 can be used not only to store application software installed in the sound following apparatus in the combo multi-window mode and various types of data, such as a code of a sound following program in the combo multi-window mode, but also to temporarily store data that has been output or is to be output.
Theprocessor 12 may be, in some embodiments, a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip, and is configured to execute program codes or process data stored in the memory 11, for example, execute a sound following APP in a multiple window mode of a unified machine.
Thecommunication bus 13 is used to realize connection communication between these components.
Thenetwork interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the sound follower device and other electronic devices in the combo multi-window mode.
Optionally, the sound following apparatus in the all-in-one multi-window mode may further include a user interface, the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further include a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the sound following apparatus in the combo multi-window mode and for displaying a visual user interface.
Fig. 4 only shows the sound following device in the combo multi-window mode with the components 11-14 and the sound following program in the combo multi-window mode, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the sound following device in the combo multi-window mode, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
In the embodiment of the sound following apparatus in the all-in-one machine multi-window mode shown in fig. 4, the memory 11 stores a sound following program in the all-in-one machine multi-window mode; theprocessor 12 implements the following steps when executing the sound following program in the all-in-one multi-window mode stored in the memory 11:
step S10: entering a multi-window mode of the all-in-one machine to perform split-screen display;
step S20: capturing a currently running application list of the all-in-one machine to determine the application which currently obtains a focus;
step S30: according to the application window displayed in a split screen mode, non-focus application marking is carried out on non-focus applications displayed in the split screen mode in the application list;
step S40: performing audio stream mute processing on the application with the non-focus application mark;
step S50: the focus switching state is judged, and when focus switching occurs, step S30 and step S40 are repeated.
Referring to fig. 5, a schematic diagram of program modules of a sound following program in an all-in-one multi-window mode in an embodiment of the sound following apparatus in the all-in-one multi-window mode according to the present invention is shown, in this embodiment, the sound following program in the all-in-one multi-window mode may be divided into a split-screen display module 10, an obtainingfocus module 20, amute module 30, and afocus switching module 40, which are exemplarily:
the split-screen display module 10 is used for executing a split-screen display task of the all-in-one machine;
an obtainfocus module 20 for executing a task of applying to obtain focus;
amute module 30 for performing the task of audio streaming mute for non-focus applications;
and afocus switching module 40, configured to execute a task of applying focus switching.
The functions or operation steps of the above-mentioned split-screen display module 10, thefocus obtaining module 20, themute module 30, and thefocus switching module 40 when executed are substantially the same as those of the above-mentioned embodiments, and are not described herein again.
In addition, an embodiment of the present invention further provides a storage medium, where the storage medium is a computer-readable storage medium, and the storage medium stores a sound following program in an all-in-one multi-window mode, where the sound following program in the all-in-one multi-window mode is executable by one or more processors to implement the following operations:
step S10: entering a multi-window mode of the all-in-one machine to perform split-screen display;
step S20: capturing a currently running application list of the all-in-one machine to determine the application which currently obtains a focus;
step S30: according to the application window displayed in a split screen mode, non-focus application marking is carried out on non-focus applications displayed in the split screen mode in the application list;
step S40: performing audio stream mute processing on the application with the non-focus application mark;
step S50: the focus switching state is judged, and when focus switching occurs, step S30 and step S40 are repeated.
The specific implementation of the storage medium of the present invention is substantially the same as the embodiments of the sound following method and apparatus in the all-in-one multi-window mode, and will not be described herein again.
Compared with the prior art, the sound following method, the sound following device and the storage medium in the all-in-one machine multi-window mode provided by the invention have the advantages that the audio stream mute processing is carried out on the non-focus application by distinguishing the focus, the non-focus distinguishing and the mark of the running application in the all-in-one machine, the sound output conflict during multi-screen display of the all-in-one machine is effectively avoided, the normal output of the application audio according to the currently obtained focus is ensured, the audio mixing is avoided, and the use experience of a user is improved.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above, and includes instructions for enabling a terminal device (e.g., a drone, a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.