CN115022770A - Audio playing control method, terminal device and computer readable storage medium - Google Patents

Audio playing control method, terminal device and computer readable storage medium Download PDF

Info

Publication number
CN115022770A
CN115022770A CN202210575968.1A CN202210575968A CN115022770A CN 115022770 A CN115022770 A CN 115022770A CN 202210575968 A CN202210575968 A CN 202210575968A CN 115022770 A CN115022770 A CN 115022770A
Authority
CN
China
Prior art keywords
application
audio
priority
type
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210575968.1A
Other languages
Chinese (zh)
Inventor
卢伟超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kaihong Digital Industry Development Co Ltd
Original Assignee
Shenzhen Kaihong Digital Industry Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kaihong Digital Industry Development Co Ltd filed Critical Shenzhen Kaihong Digital Industry Development Co Ltd
Priority to CN202210575968.1A priority Critical patent/CN115022770A/en
Publication of CN115022770A publication Critical patent/CN115022770A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4818Priority circuits therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of audio playing, and provides an audio playing control method, a terminal device and a computer readable storage medium, wherein the audio playing control method comprises the following steps: monitoring whether a second application playing audio exists in response to an audio playing request of a first application, wherein the second application is at least one application except the first application; if the audio is played by the second application, determining whether the priority of the first application is higher than that of the second application according to pre-stored priority information; and if the priority of the first application is higher than that of the second application, controlling the second application to release an audio focus and controlling the first application to use the audio focus so as to improve the globality of audio playing control and improve the user experience.

Description

Audio playing control method, terminal device and computer readable storage medium
Technical Field
The present application relates to the field of audio playing technologies, and in particular, to an audio playing control method, a terminal device, and a computer-readable storage medium.
Background
At present, although an operating system of a terminal device, for example, an Android system, provides various audio playing control mechanisms and policies for multiple applications and different types of applications, because each application may not set audio playing of the application according to the corresponding audio playing control mechanism and policy based on considerations of various aspects such as own interests, and particularly adds control of functions such as losing audio focus to the application, when multiple applications are played or opened simultaneously, audio playing may conflict, for example, when a music playing application is playing music, a navigation application makes a sound, and at this time, the two sounds are superimposed together, so that a user cannot hear the music or the navigation sound, and user experience is affected.
Disclosure of Invention
The present application mainly aims to provide an audio playing control method, a terminal device and a computer readable storage medium, and aims to improve the globality of audio playing control, so as to improve user experience.
In a first aspect, the present application provides an audio playback control method, including:
monitoring whether a second application playing audio exists in response to an audio playing request of a first application, wherein the second application is at least one application except the first application;
if the audio is played by the second application, determining whether the priority of the first application is higher than that of the second application according to pre-stored priority information;
and if the priority of the first application is higher than that of the second application, controlling the second application to release the audio focus and controlling the first application to use the audio focus.
In a second aspect, the present application further provides a terminal device, where the terminal device includes a memory and a processor;
the memory for storing a computer program;
the processor is configured to execute the computer program and implement the audio playing control method as described above when executing the computer program.
In a third aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the audio playing control method as described above.
The application provides an audio playing control method, a terminal device and a computer readable storage medium, wherein the audio playing control method comprises the following steps: monitoring whether a second application playing audio exists in response to an audio playing request of a first application, wherein the second application is at least one application except the first application; if the audio is played by the second application, determining whether the priority of the first application is higher than that of the second application according to pre-stored priority information; and if the priority of the first application is higher than that of the second application, controlling the second application to release an audio focus and controlling the first application to use the audio focus so as to improve the globality of audio playing control and improve the user experience.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an audio playing control method according to an embodiment of the present application;
FIG. 2 is a swim lane diagram of an audio playback control method according to an embodiment of the present application;
fig. 3 is a schematic block diagram of a structure of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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 application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The embodiment of the application provides an audio playing control method, terminal equipment and a computer readable storage medium. The audio playing control method can be applied to terminal equipment, and the terminal equipment can comprise at least one of the following: mobile phones, tablet computers, notebook computers, desktop computers, vehicle-mounted equipment, televisions.
Illustratively, the terminal device is provided with an operating system, such as a hong meng system, an Android system, and an IOS operating system. For example, the operating system is provided with corresponding system applications by default, such as a telephone, a recorder, and the like. In some embodiments, the user may also install other types of third party applications in the operating system, such as WeChat, Cool dog music, and so forth.
In some embodiments, a global player is provided in the operating system of the terminal device. For example, when any application in the operating system requests to play audio, a global player set in the operating system needs to be called to play the audio requested to be played by the application. Illustratively, the call of the global player arranged in the operating system is managed and controlled correspondingly through the operating system. For example, when the operating system of the terminal device is an android system and a global player is provided in the android system, the invocation of the global player is managed and controlled correspondingly through the android system.
For example, when a plurality of applications in the terminal device request to play audio, if at least one application in the plurality of applications does not control and configure its own audio playing in advance, it is easy to cause a situation that the audio of the plurality of applications calls the global player to play at the same time, so that the audio of each application is mixed together, and it is inconvenient for the user to hear the audio content of each application. Therefore, on the premise of not changing the operating system architecture of the terminal equipment, the audio playing control is uniformly performed on the applications which call the global player for each request by means of the operating system, so that the globality of the audio playing control is improved, and the user experience is improved.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments and features of the embodiments described below can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an audio playing control method according to an embodiment of the present disclosure.
Referring to fig. 2, fig. 2 is a swim lane diagram of an audio playback control method according to an embodiment of the present disclosure.
As shown in fig. 1 and fig. 2, the audio playback control method includes steps S101 to S103.
Step S101, responding to an audio playing request of a first application, monitoring whether a second application playing audio exists, wherein the second application is at least one application except the first application.
Illustratively, the first application requests to call a global player set in the operating system, for example, the first application sends its identification information to a global player configured in the terminal device. In some embodiments, the first application responds to a click of a certain interface of the first application by a user, determines that the user requests to play audio, and starts an audio playing request process, for example, sending identification information of the first application to the global player.
In some embodiments, a globally unique global player is provided in the operating system. As shown in fig. 2, the operating system monitors the current call situation of the global player in response to the audio playing request of the first application, for example, monitors whether a second application, which is at least one application other than the first application, is playing audio. For example, the operating system monitors a call condition of the current global player according to a first application audio playing request received by the global player, for example, identification information of the first application is received, and determines whether a second application is playing audio using the global player, so that the operating system can perform corresponding processing on the audio playing request of the first application according to the monitoring condition.
And S102, if the audio is played by the second application, determining whether the priority of the first application is higher than that of the second application according to the pre-stored priority information.
Illustratively, the priority information includes white list information. For example, applications that are in the white list are set to have a higher priority than applications that are not in the white list. For example, when the white list is established, the applications in the white list are also subjected to corresponding application level ordering, for example, the white list comprises telephone, WeChat telephone, sound recording and navigation, the application level ordering of the telephone is set to be higher than the application level ordering of the WeChat telephone, the application level ordering of the WeChat telephone is set to be higher than the application level ordering of the sound recording, and the application level ordering of the sound recording is set to be higher than the application level ordering of the navigation. As can be appreciated, WeChat telephony includes voice chat as well as video chat. In some embodiments, the operating system may determine from the white list that the white list information corresponding to the application includes at least one of: whether the application is in a whitelist, application level ordering within the whitelist.
For example, determining whether the priority of the first application is higher than the priority of the second application according to the pre-stored priority information includes: judging whether the first application and the second application are in a white list or not; if the first application and the second application are both in the white list, determining whether the priority of the first application is higher than that of the second application according to the application level sequence of the first application and the second application in the white list; if the first application is in the white list and the second application is not in the white list, determining that the priority of the first application is higher than that of the second application; and if the first application and the second application are not in the white list, determining that the priority of the first application is higher than that of the second application. For example, when the first application is a WeChat telephone and the second application is a music player, the priority of the WeChat telephone is determined to be higher than the priority of the music player according to the fact that the WeChat telephone is in a white list and the music player is not in the white list. For another example, when the first application is a video player and the second application is a music player, the priority of the video player is determined to be higher than that of the music player according to the fact that neither the video player nor the music player is in the white list, so as to be closer to the actual audio playing requirement of the user.
In some embodiments, if the first application and the second application are both in the white list, determining whether the priority of the first application is higher than the priority of the second application according to the application level ordering in the white list includes: if the application level sequence of the first application in the white list is higher than the application level sequence of the second application in the white list, determining that the priority of the first application is higher than that of the second application; and if the application level sequence of the first application in the white list is lower than the application level sequence of the second application in the white list, determining that the priority of the first application is lower than that of the second application. For example, when the first application is a phone and the second application is a sound recording, the phone is prioritized over the sound recording based on the phone and the sound recording both being on a white list, and the phone being ranked higher in an application level than the sound recording in the white list. For another example, when the first application is navigation and the second application is WeChat telephony, the navigation is prioritized below the WeChat telephony based on the navigation and the WeChat telephony both being in a white list and the navigation being in an application level ordering within the white list that is lower than the application level ordering of the WeChat telephony within the white list.
Illustratively, the priority information includes type level information. For example, determining whether the priority of the first application is higher than the priority of the second application according to the pre-stored priority information includes: acquiring type level information of a first application and type level information of a second application; and determining whether the priority of the first application is higher than that of the second application according to the type level information of the first application and the type level information of the second application.
In some embodiments, the type level information has a first level, a second level, and a third level set therein. For example, the priority corresponding to the first level is higher than the priority corresponding to the second level, and the priority corresponding to the second level is higher than the priority corresponding to the third level. Illustratively, an application requesting to play the call-like audio is set to a first level, e.g., telephone, wechat phone, etc.; setting an application requesting to play at least one of the following types of audio to a second level: recording audio, music audio, notification audio, navigation audio, video audio, such as a recorder, a music player, a short message notification, a WeChat notification, navigation, video and voice of a video player, etc.; setting an application requesting to play at least one of the following types of audio as a third level: advertisement-like audio, such as an advertisement voice of a browser webpage, an advertisement voice of a video player, and the like. It will be appreciated that the same application may correspond to different levels when playing different types of audio, for example a wechat phone for wechat at a first level and a wechat announcement for wechat at a second level.
For example, determining whether the priority of the first application is higher than the priority of the second application according to the pre-stored priority information includes: acquiring type level information of a first application and type level information of a second application; and determining whether the priority level of the first application is higher than that of the second application according to the type level information of the first application and the type level information of the second application. For example, when the operating system determines that the first application requests to play audio and monitors that the second application is playing audio, the operating system may indicate a level to which the type of audio requested to be played by the first application belongs according to the type level information of the first application and indicate a level to which the type of audio being played by the second application belongs according to the type level information of the second application, thereby determining whether the priority of the first application is higher than the priority of the second application according to the level to which the type of audio requested to be played by the first application and the level to which the type of audio being played by the second application belongs.
In some embodiments, the priority of the first application is determined to be higher than the priority of the second application in accordance with the type level information of the first application indicating that the first application belongs to the first level and the type level information of the second application indicating that the second application belongs to the second level or the third level. For example, when the first application is WeChat and the WeChat requests to play a WeChat telephone, the second application is a voice recorder and the voice recorder is recording, or the second application is a browser webpage and the browser webpage is playing an advertisement voice, the WeChat is indicated as belonging to a first level according to the type level information of the WeChat, the type level information of the voice recorder indicates that the voice recorder belongs to a second level, the type level information of the browser webpage indicates that the browser webpage belongs to a third level, and the priority of the WeChat is determined to be higher than that of the voice recorder or the browser webpage.
In some embodiments, the priority of the first application is determined to be higher than the priority of the second application in accordance with the type level information of the first application indicating that the first application belongs to the second level and the type level information of the second application indicating that the second application belongs to the third level. For example, when the first application is WeChat and the WeChat requests to play the WeChat notification, the second application is a video player and the video player is playing the advertisement voice, the WeChat is determined to have a higher priority than the video player according to the type level information of the WeChat indicating that the WeChat belongs to the second level and the type level information of the video player indicating that the video player belongs to the third level.
And step S103, if the priority of the first application is higher than that of the second application, controlling the second application to release the audio focus and controlling the first application to use the audio focus.
In some embodiments, a plurality of instructions are stored in the operating system, wherein the plurality of instructions are respectively used for instructing the application to perform corresponding actions on the audio focus of the global player. For example, the operating system sends a corresponding instruction to a corresponding application, so that the corresponding application can perform a corresponding action on the audio focus of the global player according to the corresponding instruction.
Illustratively, the plurality of instructions stored in the operating system includes instructions for instructing the application to release audio focus and instructions for instructing the application to use audio focus. For example, the operating system sends an instruction to the second application instructing the second application to release audio focus and sends an instruction to the first application instructing the first application to use audio focus, according to the priority of the first application being higher than the priority of the second application, thereby controlling the second application to release audio focus and controlling the first application to use audio focus.
In some embodiments, if the priority of the first application is lower than the priority of the second application, the second application is controlled not to release the audio focus, and the first application is controlled not to use the audio focus. Illustratively, the plurality of instructions stored in the operating system further includes instructions for instructing the application not to release audio focus and instructions for instructing the application not to use audio focus. For example, the operating system sends an instruction to the first application to instruct the first application not to use audio focus and sends an instruction to the second application to instruct the second application not to release audio focus, according to the priority of the first application being lower than the priority of the second application, thereby controlling the second application not to release audio focus and controlling the first application not to use audio focus.
In some embodiments, as shown in fig. 2, after controlling the second application to release audio focus and controlling the first application to use audio focus, the operating system may also monitor whether the second application releases audio focus. For example, if it is detected that the second application does not release the audio focus, the second application is forced to release the audio focus. For example, the various instructions stored in the operating system also include instructions for forcing the application to release audio focus. For example, after the operating system detects that the second application is playing audio after sending the instruction to the second application to instruct the second application to release the audio focus, the operating system sends an instruction to the second application to force the second application to release the audio focus, so as to force the second application to release the audio focus.
In some embodiments, as shown in fig. 2, after the operating system monitors that the second application releases the audio focus, it may also monitor whether the first application is completely played. Illustratively, if it is monitored that the first application is played completely, the first application is controlled to release the audio focus, and the second application is controlled to use the audio focus, so that the second application resumes playing. For example, the plurality of instructions stored in the operating system further includes instructions for instructing the second application to resume using audio focus. For example, after monitoring that the first application is played completely, the operating system sends an instruction for instructing the second application to resume using the audio focus to the second application, so as to control the second application to resume using the audio focus.
It can be understood that the application executes corresponding actions on the audio focus of the global player according to the control of the operating system, so that the fool-proof processing and the robustness of the operating system are enhanced, and the globality of the audio playing control is improved, thereby improving the user experience.
Illustratively, determining whether the priority level of the first application is higher than the priority level of the second application according to the type level information of the first application and the type level information of the second application further comprises: determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to the first level and the type level information of the second application indicating that the second application belongs to the first level; determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to the second level and the type level information of the second application indicating that the second application belongs to the second level; and determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to the third level and the type level information of the second application indicating that the second application belongs to the third level. For example, when the first application is WeChat and the WeChat requests to make a WeChat call, the second application is a telephone, and the user is making a call over the telephone, it is indicated that the WeChat belongs to the first level according to the type level information of the WeChat, the type level information of the telephone indicates that the telephone belongs to the first level, and it is determined that the priority of the WeChat is equal to the priority of the telephone. For example, when the first application is a music player and the music player requests to play music, the second application is a navigation and the navigation is playing navigation speech, the music player is indicated to belong to the second level according to the type level information of the music player, the type level information of the navigation indicates that the navigation belongs to the second level, and the priority of the music player is determined to be equal to the priority of the navigation. For example, when the first application is a browser and the browser requests to play an advertisement voice, the second application is a video player and the video player is playing the advertisement voice, the browser is indicated to belong to the third level according to the type level information of the browser, the type level information of the video player indicates that the video player belongs to the third level, and the priority of the browser is determined to be equal to the priority of the video player.
Illustratively, the type level information further sets corresponding playing rules for the first level, the second level, and the third level, respectively. In some embodiments, after determining that the priority of the first application is equal to the priority of the second application, comprising: determining the audio focus type of the first application according to the playing rules corresponding to the levels of the first application and the second application; controlling the first application and the second application to mix sound or to use the audio focus alone according to the audio focus type of the first application. It is understood that, when the priority of the first application is determined to be equal to the priority of the second application according to the type level information of the first application and the type level information of the second application indicating that the first application and the second application belong to the same level, the first application and the second application may be controlled to mix or use audio focus alone according to the play rule of the level to which the first application and the second application belong.
In some embodiments, determining the audio focus type of the first application according to the playback rule corresponding to the level to which the first application and the second application belong includes: when the type level information of the first application indicates that the first application belongs to a second level and the type level information of the second application indicates that the second application belongs to the second level, judging whether the first application and the second application belong to the same audio type; if the first application and the second application belong to the same audio type, determining the audio focus type of the first application according to a pre-stored playing rule of the same audio type; and if the first application and the second application belong to different audio types, determining the audio focus type of the first application according to the pre-stored playing rules of the different audio types. For example, if the first application is a recorder, the recorder requests to play the recording-type audio, the second application is a music player, and the music player is playing the recording-type audio, the recorder and the music player belong to the same second level, but the recorder and the music player belong to different audio types, and the operating system determines the audio focus type of the recorder according to the pre-stored playing rules of the different audio types. For another example, if the first application is a short message requesting to play a notification-like audio, the second application is a WeChat, and the WeChat is playing the notification-like audio, the short message and the WeChat belong to the same second level, and the short message and the WeChat belong to the same audio type, and the operating system determines the audio focus type of the short message according to the pre-stored playing rule of the same audio type.
Illustratively, the audio focus type is any one of: permanent acquisition, simultaneous acquisition of volume, temporary acquisition of reduced volume, temporary acquisition with no volume, and non-acquisition. For example, controlling the first application and the second application to mix or use audio focus alone according to the audio focus type of the first application includes: controlling the second application to release the audio focus and controlling the first application to solely use the audio focus according to the fact that the audio focus type of the first application is permanently acquired; according to the type of the audio focus of the first application, the audio focus is obtained simultaneously with the volume, the second application is controlled to use the audio focus with the original volume, and the first application is controlled to use the audio focus with the original volume; controlling the first application to reduce the volume to use the audio focus according to the temporary acquisition of the audio focus type of the first application for reducing the volume, and controlling the second application to use the audio focus at the original volume; according to the type of the audio focus of the first application, temporarily acquiring without volume, controlling the second application to use the audio focus without volume, and controlling the first application to use the audio focus with the original volume; and controlling the second application to solely use the audio focus and controlling the first application not to use the audio focus according to the condition that the audio focus of the first application is unavailable. Of course, the audio focus type is not limited thereto, and is not limited thereto.
In some embodiments, when the type level information of the first application indicates that the first application belongs to the first level and the type level information of the second application indicates that the second application belongs to the first level, the audio focus type of the first application is determined according to a play rule corresponding to the first level. For example, when a user is making a phone call, if a WeChat phone call is requested by the WeChat, the operating system determines that the audio focus type of the WeChat is unavailable so as not to influence the ongoing phone call, thereby preventing the WeChat phone call from influencing the normal operation of the phone call. For example, when the user is making a WeChat call, if the call requests to make a call, the operating system determines that the audio focus type of the call is temporary acquisition of reduced volume so as not to influence the ongoing WeChat call and to prompt the user of the incoming call, and at the same time, prompts the user of the incoming call.
In some embodiments, when the type level information of the first application indicates that the first application belongs to the third level and the type level information of the second application indicates that the second application belongs to the third level, the audio focus type of the first application is determined according to a play rule corresponding to the third level. For example, in order to be closer to the actual requirement of the user for audio playing, the audio focus type of the first application is determined to be permanently obtained according to the playing rule corresponding to the third level. For example, when a user is using a browser, a webpage advertisement is popped up on a related webpage of the browser, and the webpage advertisement is played, if the user clicks a certain video in a video player and wants to play the video, and the video is played before the video, the operating system determines that the audio focus type of the video player is permanently acquired, so as to control the video advertisement to use the audio focus, and control the webpage advertisement to release the audio focus, and the user can watch the video after the video advertisement is played, thereby being closer to the actual requirement of the user on the audio playing. For another example, when a user is using a video player and the video player is playing a video advertisement, if the user clicks a certain web page in the browser and the web page requests to play the web page advertisement, the operating system determines that the audio focus type of the browser is permanently acquired to control the web page advertisement to use the audio focus and control the video advertisement to release the audio focus, and the user can smoothly enter a corresponding web page after the web page advertisement is played, thereby being closer to the actual requirements of the user on audio playing.
It can be understood that, based on the judgment of the audio focus type of the first application, the operating system can better judge the actual audio playing requirement of the user aiming at different conditions corresponding to the actual operation of the user, so that the user experience is improved while the globality of audio playing control is improved.
For example, the operating system according to an embodiment of the present application determines the audio focus type of the first application according to the playback rule corresponding to the belonging level of the first application and the second application as shown in the following table:
Figure BDA0003662112820000101
in some embodiments, when the audio focus type of the first application is temporary acquisition of volume reduction, the operating system may further monitor whether the second application is completely played, and if the second application is completely played, control the second application to release the audio focus and control the first application to use the audio focus with the original volume, so that the first application resumes volume playing. In some embodiments, when the audio focus type of the first application is temporarily acquired with no volume, the operating system may further monitor whether the first application is completely played, and if the first application is completely played, control the first application to release the audio focus, and control the second application to use the audio focus at the original volume, so that the second application resumes the volume playing. For example, the operating system also stores corresponding instructions to perform the above control on the first application and the second application, which are not described herein again.
In the audio playing control method provided in the foregoing embodiment, it is monitored whether there is an audio being played by a second application in response to an audio playing request of a first application, where the second application is at least one application other than the first application, and if there is an audio being played by the second application, it is determined whether a priority of the first application is higher than a priority of the second application according to pre-stored priority information, and if the priority of the first application is higher than the priority of the second application, the second application is controlled to release an audio focus, and the first application is controlled to use the audio focus, so as to improve a global performance of audio playing control, thereby improving user experience.
The methods of the present application are operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The above-described method may be implemented, for example, in the form of a computer program that is executable on a terminal device.
Referring to fig. 3, fig. 3 is a schematic block diagram of a structure of a terminal device according to an embodiment of the present application.
As shown in fig. 3, the terminal device includes a processor, a memory and a network interface connected by a system bus, wherein the memory may include a storage medium and an internal memory.
The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause a processor to perform any one of the audio playback control methods.
The processor is used for providing calculation and control capability and supporting the operation of the whole terminal equipment.
The internal memory provides an environment for running a computer program in the storage medium, which, when executed by the processor, causes the processor to perform any one of the audio playback control methods.
The network interface is used for network communication, such as sending assigned tasks and the like. Those skilled in the art will appreciate that the structure shown in fig. 3 is a block diagram of only a portion of the structure associated with the present application, and does not constitute a limitation on the terminal device to which the present application applies, and that a particular terminal device may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
It should be understood that the Processor may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other alterable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to implement the steps of:
monitoring whether a second application playing audio exists in response to an audio playing request of a first application, wherein the second application is at least one application except the first application;
if the audio is played by the second application, determining whether the priority of the first application is higher than that of the second application according to pre-stored priority information;
and if the priority of the first application is higher than that of the second application, controlling the second application to release the audio focus and controlling the first application to use the audio focus.
In one embodiment, when the processor implements the audio playback control method, the processor is further configured to implement:
and if the second application is monitored not to release the audio focus, forcing the second application to release the audio focus.
In one embodiment, the priority information includes white list information, and the processor, when implementing the determining whether the priority of the first application is higher than the priority of the second application according to the pre-stored priority information, is configured to implement:
judging whether the first application and the second application are in a white list or not;
if the first application and the second application are both in a white list, determining whether the priority of the first application is higher than that of the second application according to the application level sequence of the first application and the second application in the white list;
if the first application is in a white list and the second application is not in the white list, determining that the priority of the first application is higher than that of the second application;
and if the first application and the second application are not in the white list, determining that the priority of the first application is higher than that of the second application.
In one embodiment, the priority information comprises type level information, and the processor, when implementing the determining whether the priority of the first application is higher than the priority of the second application according to pre-stored priority information, is configured to implement:
acquiring type level information of the first application and type level information of the second application;
determining whether the priority of the first application is higher than the priority of the second application according to the type level information of the first application and the type level information of the second application.
In one embodiment, the type level information includes a first level, a second level, and a third level, and the processor, when determining whether the priority of the first application is higher than the priority of the second application according to the type level information of the first application and the type level information of the second application, is configured to:
determining that the priority of the first application is higher than that of the second application according to the type level information of the first application indicating that the first application belongs to a first level and the type level information of the second application indicating that the second application belongs to a second level or a third level;
determining that the priority of the first application is higher than that of the second application according to the type level information of the first application indicating that the first application belongs to a second level and the type level information of the second application indicating that the second application belongs to a third level;
determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to a first level and the type level information of the second application indicating that the second application belongs to the first level;
determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to the second level and the type level information of the second application indicating that the second application belongs to the second level;
determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to the third level and the type level information of the second application indicating that the second application belongs to the third level.
In an embodiment, the type level information further has corresponding playing rules respectively set for a first level, a second level, and a third level, and the processor is configured to, after implementing the determining that the priority of the first application is equal to the priority of the second application, implement:
determining the audio focus type of the first application according to the playing rules corresponding to the levels of the first application and the second application;
controlling the first application and the second application to mix sound or to use audio focus separately according to the audio focus type of the first application.
In one embodiment, the processor, when implementing the determining of the audio focus type of the first application according to the play rule corresponding to the level to which the first application and the second application belong, is configured to implement:
when the type level information of the first application indicates that the first application belongs to a second level and the type level information of the second application indicates that the second application belongs to the second level, judging whether the first application and the second application belong to the same audio type;
if the first application and the second application belong to the same audio type, determining the audio focus type of the first application according to a pre-stored playing rule of the same audio type;
and if the first application and the second application belong to different audio types, determining the audio focus type of the first application according to pre-stored playing rules of different audio types.
In one embodiment, the audio focus type includes any one of: the processor is configured to implement, when implementing the controlling of the first application and the second application to mix audio or to use audio focus alone according to the audio focus type of the first application, the permanent obtaining, the simultaneous obtaining of volume, the temporary obtaining of reduced volume, the temporary obtaining without volume, or the unavailable obtaining:
controlling the second application to release the audio focus and controlling the first application to solely use the audio focus according to the fact that the audio focus type of the first application is permanently acquired;
according to the fact that the type of the audio focus of the first application is obtained simultaneously with the volume, controlling the second application to use the audio focus at the original volume, and controlling the first application to use the audio focus at the original volume;
controlling the first application to reduce the volume to use the audio focus according to the temporary acquisition that the audio focus type of the first application is the volume reduction, and controlling the second application to use the audio focus at the original volume;
controlling the second application to use the audio focus without volume and controlling the first application to use the audio focus with original volume according to the temporary acquisition that the audio focus type of the first application is accompanied by no volume;
and controlling the second application to solely use the audio focus and controlling the first application not to use the audio focus according to the fact that the audio focus type of the first application is unavailable.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the audio playing control may refer to the corresponding process in the foregoing embodiment of the audio playing control method, and is not described herein again.
Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, where the computer program includes program instructions, and a method implemented when the program instructions are executed may refer to the embodiments of the audio playback control method in the present application.
The computer-readable storage medium may be an internal storage unit of the terminal device described in the foregoing embodiment, for example, a hard disk or a memory of the terminal device. The computer readable storage medium may also be an external storage device of the terminal device, 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 terminal device.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments. While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An audio playback control method, comprising:
monitoring whether a second application playing audio exists in response to an audio playing request of a first application, wherein the second application is at least one application except the first application;
if the audio is played by the second application, determining whether the priority of the first application is higher than that of the second application according to pre-stored priority information;
and if the priority of the first application is higher than that of the second application, controlling the second application to release an audio focus and controlling the first application to use the audio focus.
2. The audio playback control method according to claim 1, further comprising:
and if the second application is monitored not to release the audio focus, forcing the second application to release the audio focus.
3. The audio playback control method according to any one of claims 1 to 2, wherein the priority information includes white list information;
the determining whether the priority of the first application is higher than the priority of the second application according to the pre-stored priority information includes:
judging whether the first application and the second application are in a white list or not;
if the first application and the second application are both in a white list, determining whether the priority of the first application is higher than that of the second application according to the application level sequence of the first application and the second application in the white list;
if the first application is in a white list and the second application is not in the white list, determining that the priority of the first application is higher than that of the second application;
and if the first application and the second application are not in the white list, determining that the priority of the first application is higher than that of the second application.
4. The audio playback control method according to any one of claims 1 to 2, wherein the priority information includes type level information;
the determining whether the priority of the first application is higher than the priority of the second application according to the pre-stored priority information includes:
acquiring type level information of the first application and type level information of the second application;
determining whether the priority of the first application is higher than the priority of the second application according to the type level information of the first application and the type level information of the second application.
5. The audio playback control method according to claim 4, wherein a first level, a second level, and a third level are set in the type level information;
the determining whether the priority of the first application is higher than the priority of the second application according to the type level information of the first application and the type level information of the second application includes:
determining that the priority of the first application is higher than that of the second application according to the type level information of the first application indicating that the first application belongs to a first level and the type level information of the second application indicating that the second application belongs to a second level or a third level;
determining that the priority of the first application is higher than that of the second application according to the type level information of the first application indicating that the first application belongs to a second level and the type level information of the second application indicating that the second application belongs to a third level;
determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to a first level and the type level information of the second application indicating that the second application belongs to the first level;
determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to the second level and the type level information of the second application indicating that the second application belongs to the second level;
determining that the priority of the first application is equal to the priority of the second application according to the type level information of the first application indicating that the first application belongs to the third level and the type level information of the second application indicating that the second application belongs to the third level.
6. The audio playback control method according to claim 5, wherein the type level information further has corresponding playback rules respectively set for a first level, a second level, and a third level;
after determining that the priority of the first application is equal to the priority of the second application, further comprising:
determining the audio focus type of the first application according to the playing rules corresponding to the levels of the first application and the second application;
and controlling the first application and the second application to mix sound or independently use audio focus according to the audio focus type of the first application.
7. The audio playing control method according to claim 6, wherein the determining the audio focus type of the first application according to the playing rule corresponding to the level to which the first application and the second application belong comprises:
when the type level information of the first application indicates that the first application belongs to a second level and the type level information of the second application indicates that the second application belongs to the second level, judging whether the first application and the second application belong to the same audio type;
if the first application and the second application belong to the same audio type, determining the audio focus type of the first application according to a pre-stored playing rule of the same audio type;
and if the first application and the second application belong to different audio types, determining the audio focus type of the first application according to pre-stored playing rules of different audio types.
8. The audio playback control method according to claim 7, wherein the audio focus type includes any one of: permanent acquisition, simultaneous acquisition of the same volume, temporary acquisition of reduced volume, temporary acquisition with no volume, and non-acquisition;
the controlling the first application and the second application to mix sound or to separately use audio focus according to the audio focus type of the first application includes:
controlling the second application to release the audio focus and controlling the first application to solely use the audio focus according to the fact that the audio focus type of the first application is permanently acquired;
according to the fact that the type of the audio focus of the first application is obtained simultaneously with the volume, controlling the second application to use the audio focus at the original volume, and controlling the first application to use the audio focus at the original volume;
controlling the first application to reduce the volume to use the audio focus according to the temporary acquisition that the audio focus type of the first application is the volume reduction, and controlling the second application to use the audio focus at the original volume;
controlling the second application to use the audio focus without volume and controlling the first application to use the audio focus with original volume according to the temporary acquisition that the audio focus type of the first application is accompanied by no volume;
and controlling the second application to solely use the audio focus and controlling the first application not to use the audio focus according to the fact that the audio focus type of the first application cannot be obtained.
9. A terminal device, the terminal device comprising a memory and a processor;
the memory for storing a computer program;
characterized by a processor for executing the computer program and implementing the audio playback control method according to claims 1-8 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, carries out the steps of the audio playback control method according to any one of claims 1 to 8.
CN202210575968.1A 2022-05-25 2022-05-25 Audio playing control method, terminal device and computer readable storage medium Pending CN115022770A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210575968.1A CN115022770A (en) 2022-05-25 2022-05-25 Audio playing control method, terminal device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210575968.1A CN115022770A (en) 2022-05-25 2022-05-25 Audio playing control method, terminal device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115022770A true CN115022770A (en) 2022-09-06

Family

ID=83068855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210575968.1A Pending CN115022770A (en) 2022-05-25 2022-05-25 Audio playing control method, terminal device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115022770A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981812A (en) * 2022-12-19 2023-04-18 广州文石信息科技有限公司 Application program management method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981812A (en) * 2022-12-19 2023-04-18 广州文石信息科技有限公司 Application program management method

Similar Documents

Publication Publication Date Title
US9076020B2 (en) Protected mode for mobile communication and other devices
US8432267B2 (en) Method and apparatus to remotely set alarms on a mobile device
CN107844342B (en) Control method and device for keeping application program alive, storage medium and mobile terminal
US20140115479A1 (en) Audio Management Method and Apparatus
US20080222707A1 (en) Systems and methods for controlling service access on a wireless communication device
US20140006769A1 (en) Device optimization modes
JP7020630B2 (en) Methods and equipment for managing hardware resource access in electronic devices
JP2015038745A (en) Wireless communication device having deterministic control of foreground access of user interface
CN104253899A (en) Method and device for controlling communication terminals
JP7481475B2 (en) Method and device for determining functional areas of dialogue text
WO2019101107A1 (en) System notification service control method, apparatus, terminal device, and storage medium
US20160057615A1 (en) Transfer of status information concerning a mobile device via a cloud based service
CN115022770A (en) Audio playing control method, terminal device and computer readable storage medium
CN107885588B (en) Application service control method and device, storage medium and mobile terminal
CN105786356A (en) Application (APP) operation method and device
CN112394901A (en) Audio output mode adjusting method and device and electronic equipment
TWI400650B (en) Audio stream notification and processing
US20150074202A1 (en) Processing action items from messages
CN103559080A (en) Constrained Execution of Background Application Code on Mobile Devices
CN113157439A (en) Resource statistical method, device and terminal
US7403605B1 (en) System and method for local replacement of music-on-hold
CN112015309A (en) Display switching method and device and mobile terminal
US11418839B2 (en) Automatic media control
CN114489419A (en) Authority control method and electronic equipment
CN113986558A (en) Application processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination