1. Field of Invention
The present invention relates to an audio management method, and more particularly, to an audio management method for allowing an electronic device to manipulate audio control of a multiple-window system and for allowing a user to manipulate audio control of execution environments corresponding to each of the plurality of windows. The present invention also relates to an implementation in an Android Operating System.
2. Description of Related Art
These years, mobile devices become more and more popular. As functions of mobile devices become more and more plentiful, more requirements of audio control, message sharing, and user interactivity are necessary. For example, a user is allowed to enter a divided-window mode on a mobile device, wherein a single screen can be viewed as two virtual screens. At this time, the user would like to manipulate audio control of activities corresponding to each of the plurality of windows, such as switching to a mute mode, switching to a normal audio mode (unmute), raising volume, and/or decreasing volume, and various audio processing, etc.. Besides, the user can use one mobile device to connect to another remote device, wherein the remote device can be viewed as an extended display/audio device of the mobile device, and any application can be shared to the extend display/audio device. Current mobile device (Android-Based or iOS-Based) can merely allow applications to be displayed and manipulated in a single window. When the mobile device is developed to support a multiple-window system and is operated in a multiple-window mode, it's necessary to simultaneously run a plurality of tasks and display a plurality of windows on the screen of the mobile device (including its extended screen). In addition, it's convenient to a user to allow the user to manipulate audio control of activities corresponding to the plurality of windows, which becomes one of the important topics of this field.
It is therefore one of the objectives of the present invention to provide an audio management method for allowing an electronic device to manipulate independent audio control of a multiple-window system and allowing a user to manipulate audio control of execution environments corresponding to each of the plurality of windows, in order to solve the above-mentioned problems in the prior art.
According to one aspect of the present invention, an audio management method for managing an electronic device that operated in a multiple-window mode is provided. The electronic device is able to run multiple tasks simultaneously so as to maintain a plurality of execution environments, wherein each execution environment is corresponding to each window. The electronic device may include: one window-to-execution-environment mapping module for respectively mapping a plurality of execution environments to a plurality of windows, one audio-track-to-execution-environment mapping module for allowing a user to manipulate audio tracks of the plurality of windows by monitoring all audio track messages of the plurality of execution environments, and one window extended audio control module for providing a specific extended audio control for each specific window of the plurality of windows in order to manage the at least one corresponding specific audio track.
By adopting the audio management method for managing an electronic device that operated in a multiple-window mode of the present invention, a user is allowed to manipulate audio control of activities corresponding to the plurality of windows, such as switching to a mute mode, switching to a normal audio mode (unmute), raising volume, and/or decreasing volume, etc., which can provide more convenience to users.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”.
Please refer to
1—GC=Window1—GC*SYS—GC (1); and
2—GC=Window2—GC*SYS—GC (2).
Please note that: “Window 1_GC” means the extended audio gain control of the Window1; “Window2_GC” means the extended audio gain control of the Window2; “SYS_GC” means the system audio gain control; 1_GC means the overall audio gain control of specific window Window1; and 1_GC means the overall audio gain control of the specific window Window2.
Besides volume gain control, other sound effect controls can be applied, and their processing methods are the same as the gain control.
As shown in
Step S410: For any execution environment migration related operations between different windows, track the operations and map the execution environments to different windows. After that, go to Step S430.
Step S420: For any audio track related operations, track the execution environment owner who manages the specific audio track. After that, go to Step S430.
Step S430: For any specific audio track, establish an association between the specific audio track and its corresponding specific window. After that, go to Step S440.
Step S440: For any specific audio track, set a gain control of the specific audio track based on a gain control SYS_GC of a system audio control of the electronic device and a gain control (such as Window1_GC or Window2_GC) of the corresponding specific window. End.
What calls for specific attention is that: the window extended audio control module 140 is able to provide a specific extended audio control EX_AC1/EX_AC2 to manage the at least one corresponding specific audio track for each specific window Window1/Window2 of the plurality of windows. The abovementioned specific extended audio control EX_AC1/EX_AC2 may include switching to a mute mode, switching to a normal audio mode, raising volume, and/or decreasing volume; however, this should not be a limitation of the present invention. Each specific window Window1/Window2 can be viewed as an independently operating device. The user is allowed to randomly switch between different windows Window1 and Window2, and the audio strategy corresponding to the displayed window should be used for playing back the audio stream.
For example, in Android Operating System, a task or a series of related tasks can be used for describing an execution environment. During one task execution life cycle, a plurality of activities may be invoked to complete one specific task. When the user switches one current activity from a first window to a second window or shares one current activity from a first device to a second device, the execution environment corresponding to the whole task or the series of related tasks will be switched to the second window or shared to the second device.
Please keep referring to
Please refer to
Please note that, the electronic device 500 shown in
As shown in
Step S810: For any execution environment migration related operations between different devices (an external device is used as the extended window), track the operations and map the execution environments to different devices. After that, go to Step S830.
Step S820: For any audio track related operations, track the execution environment owner who manages the specific audio track. After that, go to Step S830.
Step S830: For any specific audio track, establish an association between the specific audio track and its corresponding electronic device 500/remote device 600. After that, go to Step S840.
Step S840: For any specific audio track, set a gain control of the specific audio track based on a gain control SYS_GC2 of a system audio control SYS_AC2 of the remote device 600 and a gain control (such as, Window1_GC1) of the corresponding specific window (the remote device 600 is used as its extended window).
End.
In current Android implementation, there is no task ID associated to claim which activity should be the owner of the specific audio track, and it cannot be associated with the task. A mechanism is provided in the present invention to solve the abovementioned problem.
(Case 1) For an Android Operating System that supports a multiple-window mode, in case that one process only serves the foreground task that shown in one of the windows at one time, we can use the process ID to map the audio tracks that are created in the process. Since each process only serves one specific window at one time, the associated audio tracks can be mapped to the specific window.
(Case 2) For an Android Operating System that supports a multiple-window mode, in case that one process serves the foreground task that shown in multiple different windows at one time, we cannot use the process ID mentioned in (Case 1) to map the audio tracks with the windows. We will use Activity of Android Operating System to map the audio tracks. In Android Operating System, the audio tracks can be created in Activity or in Service, and thus the audio tracks created in Service can be viewed as triggered by a certain Activity, and different ways can be used for associating the audio tracks and Activity. Since the execution environment is based on task, the audio track can be associated with the task after the audio track is associated with Activity, and thus the audio tracks can be associated with the specific window in order to find out all the audio tracks corresponding to the specific window. Please see the following for details:
(Case 2-a) In an Android Operating System, each Activity has a fixed life (including: OnCreate, OnStart, OnResume, OnPause, OnStop, and OnDestory). During Activity's life cycle, a “Smart ID” associated with the Activity is stored in its thread local storage (TLS).
(Case 2-b) In Android Operating System, the following methods can be used for create audio tracks. In one embodiment, The Activity's Java code can be used for creating an audio track. Since the audio track is created by using the same Thread, it's easy to associate the audio track with the ID tag of the Activity. In another embodiment, different Threads can be used for creating the audio tracks. The Thread is created during Activity's life cycle. Since Thread creator will duplicate partial contents of its father
Thread, the audio tracks created by Thread can be associated with the ID tag of the Activity. In still another embodiment, audio tracks can be created by using Binder calling in an Android Operating System. Please also refer to
In still another embodiment, the Service can be used for creating audio tracks. Please also refer to
In Android Operating System, different Activities can share the same Service. In order to pass down the ID tag information to the Service, the ID tag is appended to one Intent, which is used as an association between the Activity and the Service in Android Operating System. Therefore, the Service can be notified by the Activity's ID tag that initials Service, and the audio tracks created by the Service can be associated with the ID tag.
Please refer to
Step S1210: For each Activity, create an ID tag and store ID tag in local TLS storage space during Activity's life cycle.
Step S1215: Determine whether the specific audio track is created by using the Activity's Java code? If yes, go to Step S1220; otherwise, go to Step S1225.
Step S1220: Establish an association between the specific audio track and the ID tag of the Activity. After that, go to Step S1270.
Step S1225: Determine whether the specific audio track is created by using a Thread generated by the Activity? If yes, go to Step S1230; otherwise, go to step S1235
Step S1230: Establish an association between the specific audio track and the ID tag of the Activity that generate the thread. After that, go to Step S1270.
Step S1235: Determine whether the specific audio track is created by using Binder calling? If yes, go to Step S1260; otherwise, go to step S1245.
Step S1245: Determine whether the specific audio track is created by using a Service? If yes, go to step S1250.
Step S1250: Establish an association between the specific audio track and the ID tag of the Activity of the Service. After that, go to step S1270.
Step S1260: Audio track creator uses Global Binder Mapping Service to establish an association between the specific audio track and the ID tag of the Activity of Binder calling. After that, go to Step S1270.
Step S1270: ID tag of the specific audio track is retrieved.
Those skilled in the art can readily understand how each element operates by combining the steps shown in
Please refer to
Step S1320: For each specific window of the plurality of windows, establish an association between the specific audio track corresponding to the execution environment and the specific window.
Step S1330: For each specific window of the plurality of windows, provide a specific extended audio control to manage the at least one corresponding specific audio track.
Step S1340: For each specific audio track, set a gain control of the specific audio track based on a gain control of a system audio control of the electronic device and a gain control of the corresponding specific window.
Those skilled in the art can readily understand how each element operates by combining the steps shown in
Please refer to
Step S1310: Correspond a plurality of execution environments to a plurality of windows, respectively.
Step S1320: For each specific window of the plurality of windows, establish an association between the specific audio track corresponding to the execution environment and the specific window.
Step S1330: For each specific window of the plurality of windows, provide a specific extended audio control to manage the at least one corresponding specific audio track.
Step S1410: Transmit the at least one specific audio track and a display window from the electronic device to an external connected device (a remote device).
Step S1420: For each specific audio track to be transmitted to the external connected device, set a gain control of the specific audio track based on a gain control of a system audio control of the external connected device and a gain control of the corresponding specific window.
Those skilled in the art can readily understand how each element operates by combining the steps shown in
The abovementioned embodiments are presented merely to illustrate practicable designs of the present invention, and should be considered to be limitations of the scope of the present invention. In summary, an audio management method for managing an electronic device that operated in a multiple-window mode and an electronic device using the same method are provided. By adopting the method and the electronic device of the present invention, the electronic device is able to simultaneously run a plurality of tasks and display a plurality of windows on the screen of the electronic device when the electronic device is operated in a multiple-window mode. Besides, it also allows a user to manipulate audio control of all activities corresponding to each of the plurality of windows, such as switching to a mute mode, switching to a normal audio mode, raising volume, and/or decreasing volume, etc., which can bring more convenience to the user.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.
Number | Date | Country | Kind |
---|---|---|---|
201310216741.9 | Jun 2013 | CN | national |