CN117406950A - Audio play control method and device, electronic equipment and storage medium - Google Patents

Audio play control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117406950A
CN117406950A CN202310506454.5A CN202310506454A CN117406950A CN 117406950 A CN117406950 A CN 117406950A CN 202310506454 A CN202310506454 A CN 202310506454A CN 117406950 A CN117406950 A CN 117406950A
Authority
CN
China
Prior art keywords
audio
data transfer
audio data
control
transfer program
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
CN202310506454.5A
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 TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology 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 TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202310506454.5A priority Critical patent/CN117406950A/en
Publication of CN117406950A publication Critical patent/CN117406950A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Abstract

The embodiment of the invention discloses an audio play control method, an audio play control device, electronic equipment and a storage medium; the method comprises the steps that a first audio data transfer program corresponding to a first application can be called based on a first audio playing request of the first application, so that audio playing equipment plays first audio corresponding to the first audio playing request, a second audio data transfer program is called based on a second audio playing request of a second application, the running state of the audio data transfer program in the audio playing equipment is detected, if the audio data transfer program in the running state in the audio playing equipment meets a preset first control condition, an audio playing control is displayed, and the first audio data transfer program and/or the second audio data transfer program are processed in response to audio selection operation of the audio playing control so as to control audio played by each application in the audio playing equipment; the audio played simultaneously can be controlled according to the operation of the user, and the hearing experience of the user is improved.

Description

Audio play control method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of audio technologies, and in particular, to an audio playing control method, an audio playing control device, an electronic device, and a storage medium.
Background
With the development of life and the advancement of technology, people often use electronic devices to play audio. Sometimes, people may run several applications on an electronic device at the same time, and the electronic device may play audio requested to be played by at least two different applications at the same time.
At present, the main method adopted when the problem of simultaneous audio playing is solved is that the standard application program meets a certain mechanism when being developed so as to actively stop playing or reduce the volume if some application programs need to play the audio when running. However, with this solution, it cannot be guaranteed that the application completely complies with this mechanism, which would negatively affect both the user's hearing experience and the operating experience of the electronic device if the application did not comply with this mechanism.
Disclosure of Invention
The embodiment of the invention provides an audio playing control method, an audio playing control device, electronic equipment and a storage medium, which can control audio played simultaneously according to the operation of a user and improve the hearing experience of the user and the operation experience of the electronic equipment.
The embodiment of the invention provides an audio play control method, which comprises the following steps:
calling a first audio data transfer program corresponding to a first application based on a first audio playing request of the first application, so that audio playing equipment plays first audio corresponding to the first audio playing request;
calling a second audio data transfer program corresponding to a second application based on a second audio playing request of the second application;
detecting the running state of an audio data transfer program in the audio playing device;
if the audio data transmission program in the running state in the audio playing device meets a preset first control condition, displaying an audio playing control;
and responding to the audio selection operation of the audio playing control, processing the first audio data transfer program and/or the second audio data transfer program to control the audio played by each application in the audio playing equipment.
Correspondingly, the embodiment of the invention also provides an audio playing control device, which comprises:
the first program calling unit is used for calling a first audio data transfer program corresponding to a first application based on a first audio playing request of the first application so as to enable audio playing equipment to play first audio corresponding to the first audio playing request;
A second program calling unit, configured to call a second audio data transfer program corresponding to a second application based on a second audio play request of the second application;
an operation state detection unit for detecting an operation state of an audio data transfer program in the audio playing device;
the control display unit is used for displaying an audio playing control if the audio data transmission program in the running state in the audio playing equipment meets a preset first control condition;
and the audio play control unit is used for responding to the audio selection operation of the audio play control, processing the first audio data transfer program and/or the second audio data transfer program, and controlling the audio played by each application in the audio play equipment.
In some optional embodiments, the audio playing control comprises a first control corresponding to the first application and a second control corresponding to the second application;
the audio playing control unit is used for responding to the selection operation of the first control or the second control, and determining a target audio data transfer program corresponding to the selection operation from the first audio data transfer program and the second audio data transfer program;
And stopping the running process of the target audio data transfer program.
In some optional embodiments, the control display unit is configured to determine, from the first audio data transfer program and the second audio data transfer program, an audio data transfer program that meets a preset second control condition as a target audio data transfer program if the audio data transfer program in the running state in the audio playing device meets a preset first control condition;
and acquiring audio control display information corresponding to the target audio data transfer program, and displaying an audio play control based on the audio control display information.
In some optional embodiments, the control display unit is configured to determine, from the first audio data delivery program and the second audio data delivery program in the running state, an audio data delivery program with a longest running time as a target audio data delivery program.
In some optional embodiments, the audio play control device provided by the embodiment of the present invention further includes an audio simultaneous play unit, configured to play, by using the audio play device, a first audio corresponding to the first audio play request and a second audio corresponding to the second audio play request if a triggering operation for the audio play control does not occur within a preset duration.
In some optional embodiments, the audio playing control unit is configured to delete, in response to an audio selection operation of the audio playing control, an operation process corresponding to the first audio data transfer program and/or the second audio data transfer program from an audio playing process corresponding to the audio playing device.
In some optional embodiments, the audio play control apparatus provided by the embodiment of the present invention further includes an audio play holding unit, configured to play, by the audio play device, the second audio corresponding to the second audio play request if the audio data transfer program in the running state does not exist in the audio play device or the audio data transfer program in the running state does not satisfy the first control condition.
Correspondingly, the embodiment of the invention also provides electronic equipment, which comprises a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory, so as to execute any step in the audio playing control method provided by the embodiment of the present invention.
Correspondingly, the embodiment of the invention also provides a computer readable storage medium, which stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps in any audio playing control method provided by the embodiment of the invention.
In addition, the embodiment of the invention also provides a computer program product, which comprises a computer program or instructions, wherein the computer program or instructions realize the steps in any one of the audio play control methods provided by the embodiment of the invention when being executed by a processor.
By adopting the scheme of the embodiment of the invention, the first audio data transfer program corresponding to the first application can be called based on the first audio play request of the first application, so that the audio play device plays the first audio corresponding to the first audio play request, the second audio data transfer program corresponding to the second application is called based on the second audio play request of the second application, the running state of the audio data transfer program in the audio play device is detected, if the audio data transfer program in the running state in the audio play device meets the preset first control condition, an audio play control is displayed, and the audio data transfer program and/or the second audio data transfer program of the audio play control are processed in response to the audio selection operation of the audio play control so as to control the audio played by each application in the audio play device; because in the embodiment of the invention, whether at least two applications request to play the audio or not can be detected, and the user can control the audio played in the audio playing device by triggering the audio playing control, the audio played simultaneously can be controlled according to the operation of the user, and the hearing experience of the user and the operation experience of the electronic device are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of an audio playback control method according to an embodiment of the present invention;
fig. 2 is a flowchart of an audio play control method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a technical implementation of an audio play control procedure according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an audio play control device according to an embodiment of the present invention;
fig. 5 is another schematic structural diagram of an audio play control device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the invention provides an audio play control method, an audio play control device, electronic equipment and a computer readable storage medium. Specifically, the embodiment of the invention provides an audio play control method suitable for an audio play control device, and the audio play control device can be integrated in electronic equipment.
The electronic device may be a terminal or the like, including but not limited to a mobile terminal and a fixed terminal, for example, a mobile terminal including but not limited to a smart phone, a smart watch, a tablet computer, a notebook computer, a smart car, etc., wherein the fixed terminal includes but not limited to a desktop computer, a smart television, etc.
The electronic device may be a server, which may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and artificial intelligence platform, but is not limited thereto.
The audio playing control method of the embodiment of the invention can be realized by a server or a terminal and the server together.
The method for controlling audio playback is described below by taking a case where the terminal and the server together implement the method for controlling audio playback.
As shown in fig. 1, an audio play control system provided by an embodiment of the present invention includes a terminal 10, a server 20, and the like; the terminal 10 and the server 20 are connected through a network, for example, a wired or wireless network connection, wherein the terminal 10 may exist as a terminal where the first application and the second application are deployed.
The terminal 10 may be configured to invoke a first audio data transfer program corresponding to a first application based on a first audio play request of the first application, so that an audio play device plays a first audio corresponding to the first audio play request obtained from the server 20, invoke a second audio data transfer program corresponding to a second application based on a second audio play request of the second application, detect an operation state of the audio data transfer program in the audio play device, and if the audio data transfer program in the operation state in the audio play device meets a preset first control condition, display an audio play control, and process the first audio data transfer program and/or the second audio data transfer program in response to an audio selection operation of the audio play control so as to control audio played by each application in the audio play device.
It will be appreciated that the audio played by the terminal 10 may be obtained from the server 20 or may be stored in the terminal 10, which is not limited by the embodiment of the present invention.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The embodiments of the present invention will be described in terms of an audio playback control apparatus that may be integrated in a terminal and/or a server in particular.
As shown in fig. 2, the specific flow of the audio playing control method of this embodiment may be as follows:
201. and calling a first audio data transfer program corresponding to the first application based on a first audio playing request of the first application, so that the audio playing device plays first audio corresponding to the first audio playing request.
Wherein the first application is an application that requests that audio be played before the second audio play request is generated. It is to be understood that the number of the first applications may be one or more, which is not limited in this embodiment of the present invention.
For example, sometimes a user may use a terminal to play the sound of two applications simultaneously, and when a third application that is restarted by the user needs to play audio, both applications that are playing sound may be used as the first application.
The first audio data transfer program may be a program for transferring audio data to a specific audio playing program for playing. For example, in an android system, the first audio data delivery program may be an AudioTrack program.
In particular, audioTrack is a class of data process for Android music play delivery. The audio data may be sampled, the output channel may be set, the decoded PCM stream may be played, etc. through the AudioTrack, for example, the AudioTrack may transfer the PCM stream to the audioplayer for mixing, and then transfer the PCM stream to the hardware for playing.
Alternatively, the audio playing device may be the electronic device itself loaded with the first application and/or the second application, or the audio playing device may be another device, such as a sound box, having a wired or wireless connection with the electronic device loaded with the first application and/or the second application.
Specifically, the first audio is the audio requested to be played by the first audio through the first audio playing request.
202. And calling a second audio data transfer program corresponding to a second application based on a second audio playing request of the second application.
Specifically, the second application is an application program that needs to determine whether audio playback control is to be performed.
Alternatively, the second audio data delivery program may be a program that delivers audio data to a specific audio playing program for playing. For example, audioTrack program, etc.
It may be appreciated that, before the running state is detected, the second audio corresponding to the second application may not start playing, or may already start playing, which is not limited by the embodiment of the present invention.
203. And detecting the running state of an audio data transfer program in the audio playing device.
Specifically, playing music in the Android system calls AudioTrack, and one audio corresponds to one Track of the operating system. By detecting the number of tracks, the running state of the audio data delivery program can be determined.
In some optional embodiments, if the situation that the audio playing control is not needed is found after the detection, the second audio corresponding to the second application may be played normally.
And if the audio data transmission program in the running state does not exist in the audio playing device or the audio data transmission program in the running state does not meet the first control condition, playing the second audio corresponding to the second audio playing request through the audio playing device.
That is, if the audio data transfer program is not in the running state, or the first control condition set by the user or the developer is not matched with the audio data transfer program in the running state, the second audio corresponding to the second application may be played normally.
204. And if the audio data transmission program in the running state in the audio playing equipment meets the preset first control condition, displaying an audio playing control.
The first control condition may be that if more than 2 audio data transfer programs are running, an audio playing control is displayed; alternatively, the first control condition may be that if more than 2 audio data transfer programs are running and there are running time periods of the audio data transfer programs greater than a certain time period threshold, an audio play control or the like is displayed. The first control condition may be set by a user or a technician according to actual requirements, which is not limited in the embodiment of the present invention.
In some optional embodiments, the step of displaying the audio playing control if the audio data transfer program in the running state in the audio playing device meets the preset first control condition may specifically include:
If the audio data transfer program in the running state in the audio playing device meets a preset first control condition, determining an audio data transfer program meeting a preset second control condition from the first audio data transfer program and the second audio data transfer program as a target audio data transfer program;
and acquiring audio control display information corresponding to the target audio data transfer program, and displaying an audio play control based on the audio control display information.
For example, when audio is to be played, it is detected that there are multiple active tracks, information of some or all tracks is called back to the Java layer through Android, and Notification is sent to the user at the Java layer.
The second control condition may be that one or more audio data transfer programs at later time of call are targeted audio data transfer programs, that one or more audio data transfer programs at earlier time of call are targeted audio data transfer programs, or the like.
In some examples, the earliest audio data transfer program may be regarded as a target audio data transfer program by default, and the step of determining, from the first audio data transfer program and the second audio data transfer program, an audio data transfer program satisfying a preset second control condition as a target audio data transfer program may specifically include:
From the first audio data transfer program and the second audio data transfer program in the running state, the audio data transfer program having the longest running time is determined as the target audio data transfer program.
For example, when playing the first music, it is detected that there are two active tracks, the information of the first Track is recalled to the Java layer through Android, and Notification is sent to the user at the Java layer.
205. And responding to the audio selection operation of the audio playing control, processing the first audio data transfer program and/or the second audio data transfer program to control the audio played by each application in the audio playing equipment.
The processing of the audio data transfer program may be to suspend the operation of the audio data transfer program or to stop the operation of the audio data transfer program completely.
In some optional embodiments, the audio playing control includes a first control corresponding to the first application and a second control corresponding to the second application, and the step of "responding to the audio selection operation of the audio playing control to process the first audio data transfer program and/or the second audio data transfer program" may specifically include:
In response to a selection operation of the first control or the second control, determining a target audio data transfer program corresponding to the selection operation from the first audio data transfer program and the second audio data transfer program;
and stopping the running process of the target audio data transfer program.
For example, the system may check the number of the current playing through the AudioTrack, and then return the control of the previous AudioTrack to the user in a Notification manner, as shown in fig. 3, the user may reach whether to stop playing of a certain application by operating Notification
In some embodiments, the audio playing control method provided by the embodiment of the present invention may further include:
and if the triggering operation of the audio playing control is not generated within the preset time, playing the first audio corresponding to the first audio playing request and the second audio corresponding to the second audio playing request through the audio playing equipment.
That is, if the user does not trigger the audio play control, the second audio is normally played.
Optionally, the step of "processing the first audio data transfer program and/or the second audio data transfer program in response to the audio selection operation of the audio play control may specifically include:
And responding to the audio selection operation of the audio playing control, and deleting the operation process corresponding to the first audio data transfer program and/or the second audio data transfer program from the audio playing process corresponding to the audio playing device.
For example, when the user clicks Notification, a method of technician pre-encapsulation is called, and the first Track is removed from the AudioTrack, so that only one audio is played in the current system.
As can be seen from the foregoing, in the embodiment of the present invention, a first audio data transfer program corresponding to a first application may be invoked based on a first audio play request of the first application, so that an audio play device plays a first audio corresponding to the first audio play request, a second audio data transfer program corresponding to a second application is invoked based on a second audio play request of the second application, an operation state of the audio data transfer program in the audio play device is detected, if the audio data transfer program in the operation state in the audio play device meets a preset first control condition, an audio play control is displayed, and in response to an audio selection operation for the audio play control, the first audio data transfer program and/or the second audio data transfer program are processed to control audio played by each application in the audio play device; because in the embodiment of the invention, whether at least two applications request to play the audio or not can be detected, and the user can control the audio played in the audio playing device by triggering the audio playing control, the audio played simultaneously can be controlled according to the operation of the user, and the hearing experience of the user and the operation experience of the electronic device are improved.
In order to better implement the above method, correspondingly, the embodiment of the invention also provides an audio playing control device.
Referring to fig. 4, the apparatus may include:
the first program calling unit 401 may be configured to call, based on a first audio playing request of a first application, a first audio data transfer program corresponding to the first application, so that an audio playing device plays a first audio corresponding to the first audio playing request;
a second program calling unit 402, configured to call a second audio data transfer program corresponding to a second application based on a second audio play request of the second application;
an operation state detection unit 403, configured to detect an operation state of an audio data transfer program in the audio playback apparatus;
the control display unit 404 may be configured to display an audio playing control if the audio data transmission program in the running state in the audio playing device meets a preset first control condition;
the audio play control unit 405 may be configured to process the first audio data transfer program and/or the second audio data transfer program in response to an audio selection operation of the audio play control, so as to control audio played by each application in the audio play device.
In some optional embodiments, the audio playing control may include a first control corresponding to the first application and a second control corresponding to the second application;
the audio play control unit 405 may be configured to determine, in response to a selection operation of the first control or the second control, a target audio data delivery program corresponding to the selection operation from the first audio data delivery program and the second audio data delivery program;
and stopping the running process of the target audio data transfer program.
In some optional embodiments, the control display unit 404 may be configured to determine, as the target audio data transfer program, an audio data transfer program that meets the preset second control condition from the first audio data transfer program and the second audio data transfer program if the audio data transfer program in the running state in the audio playing device meets the preset first control condition;
and acquiring audio control display information corresponding to the target audio data transfer program, and displaying an audio play control based on the audio control display information.
In some alternative embodiments, the control display unit 404 may be configured to determine, from the first audio data delivery program and the second audio data delivery program in the running state, the audio data delivery program with the longest running time as the target audio data delivery program.
In some optional embodiments, as shown in fig. 5, the audio play control device provided in the embodiment of the present invention may further include an audio simultaneous play unit 406, which may be configured to play, by the audio playing device, the first audio corresponding to the first audio play request and the second audio corresponding to the second audio play request if no triggering operation for the audio play control is performed within a preset duration.
In some optional embodiments, the audio playing control unit 405 may be configured to delete, in response to an audio selection operation of the audio playing control, an operation process corresponding to the first audio data transfer program and/or the second audio data transfer program from an audio playing process corresponding to the audio playing device.
In some optional embodiments, the audio play control apparatus provided by the embodiment of the present invention may further include an audio play holding unit 407, which may be configured to play, by the audio playing device, the second audio corresponding to the second audio play request if the audio data transfer program in the running state does not exist in the audio playing device or the audio data transfer program in the running state does not satisfy the first control condition.
As can be seen from the above, through the audio play control device, a first audio data transfer program corresponding to a first application can be called based on a first audio play request of the first application, so that an audio play device plays first audio corresponding to the first audio play request, a second audio data transfer program corresponding to a second application is called based on a second audio play request of the second application, an operation state of the audio data transfer program in the audio play device is detected, if the audio data transfer program in the operation state in the audio play device meets a preset first control condition, an audio play control is displayed, and in response to an audio selection operation of the audio play control, the first audio data transfer program and/or the second audio data transfer program are processed, so that audio played by each application in the audio play device is controlled; because in the embodiment of the invention, whether at least two applications request to play the audio or not can be detected, and the user can control the audio played in the audio playing device by triggering the audio playing control, the audio played simultaneously can be controlled according to the operation of the user, and the hearing experience of the user and the operation experience of the electronic device are improved.
In addition, the embodiment of the present invention further provides an electronic device, which may be a terminal or a server, as shown in fig. 6, and shows a schematic structural diagram of the electronic device according to the embodiment of the present invention, specifically:
the electronic device may include Radio Frequency (RF) circuitry 601, memory 602 including one or more computer readable storage media, input unit 603, display unit 604, sensor 605, audio circuitry 606, wireless fidelity (WiFi, wireless Fidelity) module 607, processor 608 including one or more processing cores, and power supply 609. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 6 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Wherein:
the RF circuit 601 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, the downlink information is processed by one or more processors 608; in addition, data relating to uplink is transmitted to the base station. Typically, RF circuitry 601 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM, subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 601 may also communicate with networks and other devices through wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications (GSM, global System of Mobile communication), general packet radio service (GPRS, general Packet Radio Service), code division multiple access (CDMA, code Division Multiple Access), wideband code division multiple access (WCDMA, wideband Code Division Multiple Access), long term evolution (LTE, long Term Evolution), email, short message service (SMS, short Messaging Service), and the like.
The memory 602 may be used to store software programs and modules that are stored in the memory 602 for execution by the processor 608 to perform various functional applications and data processing. The memory 602 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device (such as audio data, phonebooks, etc.), and the like. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide access to the memory 602 by the processor 608 and the input unit 603.
The input unit 603 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 603 may include a touch-sensitive surface, as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations thereon or thereabout by a user using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. Alternatively, the touch-sensitive surface may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 608, and can receive commands from the processor 608 and execute them. In addition, touch sensitive surfaces may be implemented in a variety of types, such as resistive, capacitive, infrared, and surface acoustic waves. The input unit 603 may comprise other input devices in addition to a touch sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 604 may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of the electronic device, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 604 may include a display panel, which may be optionally configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay a display panel, and upon detection of a touch operation thereon or thereabout, the touch-sensitive surface is passed to the processor 608 to determine the type of touch event, and the processor 608 then provides a corresponding visual output on the display panel based on the type of touch event. Although in fig. 6 the touch sensitive surface and the display panel are implemented as two separate components for input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement the input and output functions.
The electronic device may also include at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the electronic device are not described in detail herein.
Audio circuitry 606, speakers, and a microphone may provide an audio interface between the user and the electronic device. The audio circuit 606 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted to a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 606 and converted into audio data, which are processed by the audio data output processor 608 for transmission via the RF circuit 601 to, for example, another electronic device, or which are output to the memory 602 for further processing. The audio circuit 606 may also include an ear bud jack to provide communication of the peripheral ear bud with the electronic device.
WiFi belongs to a short-distance wireless transmission technology, and the electronic equipment can help a user to send and receive emails, browse webpages, access streaming media and the like through the WiFi module 607, so that wireless broadband Internet access is provided for the user. Although fig. 6 shows a WiFi module 607, it is understood that it does not belong to the necessary constitution of the electronic device, and can be omitted entirely as needed within the scope of not changing the essence of the invention.
The processor 608 is a control center of the electronic device that utilizes various interfaces and lines to connect the various parts of the overall handset, perform various functions of the electronic device and process data by running or executing software programs and/or modules stored in the memory 602, and invoking data stored in the memory 602. Optionally, the processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608.
The electronic device also includes a power supply 609 (e.g., a battery) for powering the various components, which may be logically connected to the processor 608 via a power management system so as to perform functions such as managing charge, discharge, and power consumption via the power management system. The power supply 609 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the electronic device may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the processor 608 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 608 executes the application programs stored in the memory 602, so as to implement various functions as follows:
calling a first audio data transfer program corresponding to a first application based on a first audio playing request of the first application, so that audio playing equipment plays first audio corresponding to the first audio playing request;
calling a second audio data transfer program corresponding to a second application based on a second audio playing request of the second application;
Detecting the running state of an audio data transfer program in the audio playing device;
if the audio data transmission program in the running state in the audio playing device meets a preset first control condition, displaying an audio playing control;
and responding to the audio selection operation of the audio playing control, processing the first audio data transfer program and/or the second audio data transfer program to control the audio played by each application in the audio playing equipment.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any one of the audio playback control methods provided by the embodiment of the present invention. For example, the instructions may perform the steps of:
calling a first audio data transfer program corresponding to a first application based on a first audio playing request of the first application, so that audio playing equipment plays first audio corresponding to the first audio playing request;
Calling a second audio data transfer program corresponding to a second application based on a second audio playing request of the second application;
detecting the running state of an audio data transfer program in the audio playing device;
if the audio data transmission program in the running state in the audio playing device meets a preset first control condition, displaying an audio playing control;
and responding to the audio selection operation of the audio playing control, processing the first audio data transfer program and/or the second audio data transfer program to control the audio played by each application in the audio playing equipment.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the instructions stored in the computer readable storage medium can execute the steps in any audio playing control method provided by the embodiment of the present invention, the beneficial effects that any audio playing control method provided by the embodiment of the present invention can be achieved, and detailed descriptions of the foregoing embodiments are omitted herein.
According to one aspect of the present application, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the electronic device to perform the methods provided in the various alternative implementations of the embodiments described above.
The foregoing describes in detail a method, apparatus, electronic device and storage medium for controlling audio playing according to the embodiments of the present invention, and specific examples are applied to illustrate principles and implementations of the present invention, where the foregoing description of the embodiments is only for helping to understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.

Claims (10)

1. An audio play control method, comprising:
calling a first audio data transfer program corresponding to a first application based on a first audio playing request of the first application, so that audio playing equipment plays first audio corresponding to the first audio playing request;
Calling a second audio data transfer program corresponding to a second application based on a second audio playing request of the second application;
detecting the running state of an audio data transfer program in the audio playing device;
if the audio data transmission program in the running state in the audio playing device meets a preset first control condition, displaying an audio playing control;
and responding to the audio selection operation of the audio playing control, processing the first audio data transfer program and/or the second audio data transfer program to control the audio played by each application in the audio playing equipment.
2. The audio playback control method of claim 1, wherein the audio playback control comprises a first control corresponding to the first application and a second control corresponding to the second application;
the processing of the first audio data delivery program and/or the second audio data delivery program in response to the audio selection operation of the audio play control comprises:
in response to a selection operation of the first control or the second control, determining a target audio data transfer program corresponding to the selection operation from the first audio data transfer program and the second audio data transfer program;
And stopping the running process of the target audio data transfer program.
3. The audio playing control method according to claim 1, wherein displaying the audio playing control if the audio data transfer program in the running state in the audio playing device meets the preset first control condition includes:
if the audio data transfer program in the running state in the audio playing device meets a preset first control condition, determining an audio data transfer program meeting a preset second control condition from the first audio data transfer program and the second audio data transfer program as a target audio data transfer program;
and acquiring audio control display information corresponding to the target audio data transfer program, and displaying an audio play control based on the audio control display information.
4. The audio play control method according to claim 3, wherein the determining, from the first audio data transfer program and the second audio data transfer program, an audio data transfer program satisfying a preset second control condition as a target audio data transfer program includes:
From the first audio data transfer program and the second audio data transfer program in the running state, the audio data transfer program having the longest running time is determined as the target audio data transfer program.
5. The audio play control method according to claim 1, characterized in that the method further comprises:
and if the triggering operation of the audio playing control is not generated within the preset time, playing the first audio corresponding to the first audio playing request and the second audio corresponding to the second audio playing request through the audio playing equipment.
6. The audio playback control method of claim 1, wherein the processing of the first audio data delivery program and/or the second audio data delivery program in response to an audio selection operation of the audio playback control comprises:
and responding to the audio selection operation of the audio playing control, and deleting the operation process corresponding to the first audio data transfer program and/or the second audio data transfer program from the audio playing process corresponding to the audio playing device.
7. The audio play control method according to claim 1, characterized in that the method further comprises:
And if the audio data transmission program in the running state does not exist in the audio playing device or the audio data transmission program in the running state does not meet the first control condition, playing the second audio corresponding to the second audio playing request through the audio playing device.
8. An audio playback control apparatus, comprising:
the first program calling unit is used for calling a first audio data transfer program corresponding to a first application based on a first audio playing request of the first application so as to enable audio playing equipment to play first audio corresponding to the first audio playing request;
a second program calling unit, configured to call a second audio data transfer program corresponding to a second application based on a second audio play request of the second application;
an operation state detection unit for detecting an operation state of an audio data transfer program in the audio playing device;
the control display unit is used for displaying an audio playing control if the audio data transmission program in the running state in the audio playing equipment meets a preset first control condition;
and the audio play control unit is used for responding to the audio selection operation of the audio play control, processing the first audio data transfer program and/or the second audio data transfer program, and controlling the audio played by each application in the audio play equipment.
9. An electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps in the audio play control method according to any one of claims 1 to 7.
10. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the audio playback control method of any one of claims 1 to 7.
CN202310506454.5A 2023-05-06 2023-05-06 Audio play control method and device, electronic equipment and storage medium Pending CN117406950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310506454.5A CN117406950A (en) 2023-05-06 2023-05-06 Audio play control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310506454.5A CN117406950A (en) 2023-05-06 2023-05-06 Audio play control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117406950A true CN117406950A (en) 2024-01-16

Family

ID=89485932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310506454.5A Pending CN117406950A (en) 2023-05-06 2023-05-06 Audio play control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117406950A (en)

Similar Documents

Publication Publication Date Title
US10635449B2 (en) Method and apparatus for running game client
CN106993227B (en) Method and device for information display
WO2017008569A1 (en) Message updating method, apparatus, and terminal
CN106254910B (en) Method and device for recording image
WO2015043476A1 (en) Devices and methods for webpage display
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
WO2019076250A1 (en) Push message management method and related products
CN111273955B (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
WO2018161788A1 (en) Multimedia data sharing method and device
KR101876394B1 (en) Method and device for playing media data on a terminal
CN106454953B (en) Flow control method, device and terminal
CN107463395B (en) Component calling method and device
CN109743469B (en) VOLTE-based communication method and mobile terminal
CN105159655B (en) Behavior event playing method and device
CN106210325B (en) Method, device and terminal for setting incoming call ringtone of social application
CN111144845B (en) Mobile terminal meeting reminding method and device
CN113852450A (en) Message push feedback method and device, electronic equipment and storage medium
CN117406950A (en) Audio play control method and device, electronic equipment and storage medium
CN106358070B (en) Multimedia file uploading method and device
CN115225966B (en) Application starting method, device, terminal equipment and storage medium
CN111966271B (en) Screen panorama screenshot method and device, terminal equipment and storage medium
CN112799857B (en) Application access method, device, terminal and storage medium
CN111405649B (en) Information transmission method and device and mobile terminal
CN112087763B (en) Wireless fidelity WiFi connection method and device and electronic equipment
CN117193898A (en) Application icon management method and device, electronic equipment and storage medium

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