CN111078186A - Playing method and electronic equipment - Google Patents

Playing method and electronic equipment Download PDF

Info

Publication number
CN111078186A
CN111078186A CN201911420655.3A CN201911420655A CN111078186A CN 111078186 A CN111078186 A CN 111078186A CN 201911420655 A CN201911420655 A CN 201911420655A CN 111078186 A CN111078186 A CN 111078186A
Authority
CN
China
Prior art keywords
application program
audio output
audio
target
electronic
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
CN201911420655.3A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201911420655.3A priority Critical patent/CN111078186A/en
Publication of CN111078186A publication Critical patent/CN111078186A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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; 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/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback

Abstract

The invention provides a playing method and electronic equipment, wherein the method is applied to first electronic equipment and comprises the following steps: under the condition that the first electronic device and the second electronic device are connected, sharing an application interface and audio data of a first application program of the first electronic device to the second electronic device; controlling the working state of a target audio output end according to the audio playing state of the first application program in the first electronic equipment; wherein each of the target audio outputs is allowed to output at most an application's audio at the same time; the target audio output includes at least one of: the audio output device is installed on the first electronic equipment, and the audio output equipment is connected with the first electronic equipment. The invention can improve the audio output effect.

Description

Playing method and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a playing method and electronic equipment.
Background
With the rapid development of computer technology, the functions of electronic devices are more and more abundant, and the function sharing requirements among different electronic devices are more and more strong, for example, application sharing is a common sharing requirement.
At present, when a first electronic device shares an application with an audio playing function, such as a video application, with a second electronic device, if the first electronic device switches the video application to a background operation, a foreground operation is performed on another application with an audio playing function, such as a music application, and an audio output device of the first electronic device outputs audio of the video application and the music application at the same time, resulting in a poor audio output effect.
Disclosure of Invention
Embodiments of the present invention provide a playing method and an electronic device, so as to solve a problem in the prior art that an audio output effect is poor because the electronic device simultaneously outputs an audio of a shared application program and an audio of another application program.
In order to solve the problems, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a playing method, where the method includes:
under the condition that the first electronic device and the second electronic device are connected, sharing an application interface and audio data of a first application program of the first electronic device to the second electronic device;
controlling the working state of a target audio output end according to the audio playing state of the first application program in the first electronic equipment;
wherein each of the target audio outputs is allowed to output at most an application's audio at the same time; the target audio output includes at least one of: the audio output device is installed on the first electronic equipment, and the audio output equipment is connected with the first electronic equipment.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device is a first electronic device, and the electronic device includes:
the sharing module is used for sharing an application interface and audio data of a first application program of the first electronic equipment to the second electronic equipment under the condition that the first electronic equipment and the second electronic equipment are connected;
the control module is used for controlling the working state of a target audio output end according to the audio playing state of the first application program in the first electronic equipment;
wherein each of the target audio outputs is allowed to output at most an application's audio at the same time; the target audio output includes at least one of: the audio output device is installed on the first electronic equipment, and the audio output equipment is connected with the first electronic equipment.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the playing method described above.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the playing method as described above.
In the embodiment of the present invention, after sharing a first application program to a second electronic device, a first electronic device may control a working state of a target audio output end according to an audio playing state of the first application program in the first electronic device, where each of the target audio output ends allows at most one application program to be output at the same time. Therefore, compared with the prior art that one audio output port can output the audio of a plurality of application programs, the embodiment of the invention can improve the audio output effect; on the other hand, because the audio playing state of the first application program in the first electronic device can be set by the user, the embodiment of the invention controls the working state of the target audio output end through the audio playing state of the first application program in the first electronic device, so that the working state of the target audio output end can meet the expectation of the user, and the audio output effect is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart of a playing method provided in an embodiment of the present invention;
FIG. 2a is a schematic view of an interface provided by an embodiment of the present invention;
FIG. 2b is a second schematic diagram of an interface provided by the embodiment of the present invention;
fig. 3 is a second flowchart of a playing method according to an embodiment of the present invention;
FIG. 4 is a block diagram of an electronic device according to an embodiment of the present invention;
fig. 5 is a second structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description herein are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The playing method of the embodiment of the invention can be applied to electronic equipment, wherein the electronic equipment has at least one of the following characteristics: the electronic equipment is provided with an audio output device; the electronic device may be connectable to an audio output device. It is to be understood that an audio output means is to be understood as an audio output of the electronic device itself, and an audio output device is to be understood as an audio output independent of the electronic device.
In practical applications, the electronic Device may be a mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Wearable Device (Wearable Device), or the like.
The following describes a playback method according to an embodiment of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a playing method according to an embodiment of the present invention. The present embodiment can be applied to the first electronic device.
As shown in fig. 1, the audio processing method may include the steps of:
step 101, sharing an application interface and audio data of a first application program of the first electronic device to the second electronic device under the condition that the first electronic device and the second electronic device are connected.
In this embodiment, the connection between the first electronic device and the second electronic device may be used to: and sharing the application program. In a specific implementation, the connection mode between the first electronic device and the second electronic device may be a wired mode or a wireless mode, such as a bluetooth connection, and the like, and the connection mode between the first electronic device and the second electronic device is not limited in the present invention, that is, any connection mode that enables sharing of an application program between the first electronic device and the second electronic device falls within the protection scope of the present invention.
In this embodiment, the first electronic device shares the first application program with the second electronic device, which is specifically represented as: sharing the application interface and the audio data of the first application program of the first electronic equipment to the second electronic equipment. The first application may be referred to as a sharing application.
In specific implementation, the first electronic device may implement sharing of the first application program in the following manner:
under the condition that the first electronic device and the second electronic device are connected and the first electronic device selects to share a first application program to the second electronic device, displaying an application interface of the first application program in a virtual screen of the first electronic device;
recording a screen of the virtual screen to obtain screen recording data;
acquiring audio data corresponding to an application interface of the first application program;
and sending the screen recording data and the audio data to second electronic equipment.
It should be understood that the above-described implementation manners are only examples of application sharing, and are not limited to the implementation manners of application sharing, and any implementation manners that can implement application sharing fall within the protection scope of the present invention.
In this embodiment, after acquiring the application interface and the audio data of the first application program, the second electronic device may display the application interface of the first application program and play the audio of the first application program. Further, the running state of the first application program in the second electronic device is not influenced by the running state of the first application program in the first electronic device.
And step 102, controlling the working state of a target audio output end according to the audio playing state of the first application program in the first electronic equipment.
Wherein the target audio output comprises at least one of: an audio output device installed on the first electronic equipment; the audio output device is connected with the first electronic device; each of the target audio outputs is allowed to output at most one application's audio at the same time.
It should be noted that the audio output device connected to the first electronic device does not include the second electronic device. That is, in the present embodiment, the audio output device connected to the first electronic device and the second electronic device are two independent devices.
In particular, the audio playing state may be represented as an off state or an on state. To facilitate understanding of the effect of the audio playing state on the audio processing, a third application of the electronic device without application sharing is illustrated below.
And under the condition that the audio playing state of the third application program of the first electronic equipment is in the closed state, the target audio output end cannot output the audio of the third application program, even if the volume of the third application program is greater than zero.
In the case that the audio playing state of the third application program of the first electronic device is the on state, the target audio output end allows the audio of the third application program to be output, but it should be understood that this does not mean that the target audio output end necessarily outputs the audio of the third application program. Specifically, when the volume of the third application program is zero, that is, the third application program is in a mute state, the target audio output end does not output the audio of the third application program; and under the condition that the volume of the third application program is larger than zero, namely the third application program is in a non-mute state, the target audio output end can output the audio of the third application program.
In this embodiment, the first electronic device may set a target control, and the user may trigger the first electronic device to switch the audio playing state of the application program by touching the target control. Further, the target control may include a first display state and a second display state, where the first display state represents that the audio playing state is an on state, and the first display state represents that the audio playing state is an off state.
In a specific implementation manner, in a first implementation manner, the target control may correspond to a first electronic device; in a second implementation, the target control may correspond to an application.
In a first implementation manner, for all the applications in the first electronic device, the audio playing state of any application may be controlled by one target control. In this implementation manner, optionally, the first electronic device may control the audio playing state of any application program by:
under the condition that a first input aiming at the target control is received, displaying identification information of N application programs in the first electronic equipment, wherein the identification information of the N application programs can be changed, and N is a positive integer;
under the condition that a second input aiming at target identification information is received, determining an application program corresponding to the target identification information as a fourth application program;
switching an audio play state of the fourth application if a third input is received for the target control.
Specifically, if the playing state of the fourth application program is the off state before the third input is received, the audio playing state of the fourth application program is switched to the playing state; otherwise, the state is switched to the closed state.
In a second implementation, one target control may correspond to one or more applications.
In a case where one target control corresponds to at least two applications, a control manner for controlling an audio playing state of any one of the at least two applications through the target control may participate in implementation of the first implementation manner, which is not described herein again.
Under the condition that one target control corresponds to one application program, if a user wants to change the audio playing state of a certain application program, the electronic device can be triggered to switch the audio playing state of the application program by touching the target control corresponding to the application program. In some embodiments, optionally, the first electronic device may display only the sharing application, i.e., the target control of the first application.
In practical application, the display position, the display shape and the display size of the target control can be set according to practical requirements, which is not limited in the embodiment of the invention.
For the case that one target control corresponds to one application program in the second implementation manner, optionally, the target control of a certain application program may be set on the application interface of the application program in the background application browsing interface. For ease of understanding, please refer to fig. 2a and 2 b.
As shown in fig. 2a and fig. 2b, the background application browsing interface 20 includes application interfaces of the application program 1, the application program 2, and the application program 3, and a target control 21 is disposed at an upper right corner of the application interface of the application program 2.
In fig. 2a, the target control 21 is in a first display state, which represents that the audio playing state of the application program 2 is in an open state; in fig. 2b, the target control 21 is in the second display state, which indicates that the audio playing state of the application 2 is in the closed state.
Considering that the shared application program, that is, the first application program may normally operate in the second electronic device, optionally, the audio playing state of the first application program may be set to the off state by default, and the audio playing state of the non-shared application program, for example, the audio playing state of the second application program, may be set to the on state by default, that is, the target output end is preferentially controlled to output the audio of the non-shared application program. Of course, it should be understood that the user can switch the audio playing state of the shared application and the non-shared application through the target control.
In the audio processing method of this embodiment, after the first electronic device shares the first application program with the second electronic device, the first electronic device may control the working state of the target audio output end according to the audio playing state of the first application program in the first electronic device. The embodiment of the invention can ensure that each audio output end in the target audio output ends is allowed to output at most one audio of an application program at the same time, thereby improving the audio output effect compared with the prior art.
In this embodiment of the present invention, optionally, the controlling the working state of the target audio output end according to the audio playing state of the first application program in the first electronic device includes at least one of the following:
under the condition that the audio playing state of the first electronic equipment is the closed state, the target audio output end is forbidden to output the audio of the first electronic equipment;
under the condition that the audio playing state of the first application program in the first electronic device is an open state, if a second application program with an audio playing function is also included in target application programs operated by the first electronic device, controlling the working state of a target audio output end according to the target operating states of the first application program and the second application program;
the target running state comprises a foreground running state or a background running state.
The following describes a case where the audio playback state of the first application program in the first electronic device is in different expressions.
In case one, the audio playing state of the first application program in the first electronic device is a closed state.
In case one, the first electronic device may prohibit the target audio output from outputting the audio of the first electronic device, that is, the audio of the first electronic device is not output through the target audio output.
In case one, when the first electronic device further runs a second application having an audio playing function, the audio of the second application may be output through the target audio output terminal.
And in the second situation, the audio playing state of the first application program in the first electronic equipment is a playing state.
In case two, the first electronic device may further detect whether a second application having an audio playing function is included in the target applications run by the first electronic device.
In the case where the target application does not include the second application, the first electronic device may allow the target audio output to output audio of the first electronic device. Further, the first electronic device may allow the target audio output terminal to output the audio of the first application program only when the first application program is in a foreground operating state in the first electronic device, and may prohibit the target audio output terminal from outputting the audio of the first application program otherwise.
In a case that the target application program comprises the second application program, the first electronic device may further control an operating state of the target audio output end according to a target operating state of the first application program and the second application program; the target running state comprises a foreground running state or a background running state.
From the foregoing, the target audio output in the embodiment of the present invention may include the following expressions: and in the first expression mode, the target audio output end comprises an audio output device installed on the first electronic equipment or audio output equipment connected with the first electronic equipment. And in the second expression mode, the target audio output end comprises an audio output device installed on the first electronic equipment and audio output equipment connected with the first electronic equipment.
The audio processing method of the embodiment of the invention aims to ensure that each audio output end in the target audio output ends is allowed to output the audio of at most one application program at the same time. Therefore, for different expressions of the target audio output end, "controlling the working state of the target audio output end according to the target running states of the first application program and the second application program; the specific implementation manners of the target running state including a foreground running state or a background running state "may be different, and are specifically described as follows:
for the target audio output of presentation one.
Optionally, the controlling the working state of the target audio output end according to the target running states of the first application program and the second application program includes at least one of the following:
when the target running state of the first application program is a foreground running state and the target running state of the second application program is a background running state, allowing the target audio output end to output the audio of the first application program and forbidding the target audio output end to output the audio of the second application program;
and under the condition that the target running state of the first application program is a background running state and the target running state of the second application program is a foreground running state, forbidding the target audio output end to output the audio of the first application program, and allowing the target audio output end to output the audio of the second application program.
In this optional implementation manner, the first electronic device may output the audio of the application program in the foreground running state through the target audio output terminal, and may not output the audio of the application program in the background running state through the target audio output terminal, so that it may be ensured that the target audio output terminal outputs only the audio of one application program at the same time, and further, an audio output effect is ensured.
For the target audio output of presentation two.
Optionally, the controlling the working state of the target audio output end according to the target running states of the first application program and the second application program includes:
and controlling the working state of the target audio output end according to the target running states of the first application program and the second application program and the types of the application programs corresponding to the audio output device and the audio output equipment.
In a specific implementation, the types of the applications may be divided based on the target running states of the applications, that is, the applications in the foreground running state belong to one type, and the applications in the background running state belong to another type.
In practical application, the types of the audio output device and the application program corresponding to the audio output equipment can be flexibly set according to practical requirements and can be adjusted.
Optionally, the controlling the operating state of the target audio output end according to the target operating states of the first application program and the second application program and the types of the application programs corresponding to the audio output apparatus and the audio output device includes at least one of:
when the target running state of the first application program is a foreground running state, the target running state of the second application program is a background running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state, the first audio output end is allowed to output the audio of the first application program, and the second audio output end is allowed to output the audio of the second application program;
when the target running state of the first application program is a background running state, the target running state of the second application program is a foreground running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state, the first audio output end is allowed to output the audio of the second application program, and the second audio output end is allowed to output the audio of the first application program;
wherein the first audio output is one of the audio output device and the audio output apparatus, and the second audio output is the other of the audio output device and the audio output apparatus.
In this alternative embodiment, the target audio output of the first electronic device includes two types: an own audio output, i.e. an audio output means, and an audio output, i.e. an audio output device, independent of the first electronic device. In addition, the first electronic device may further set types of the application programs corresponding to different categories of audio output ends, where one category of audio output end corresponds to one type of application program, and the types of the application programs corresponding to different categories of audio output ends are different. For example, the audio output device may correspond to an application in a foreground running state, and the audio output device may correspond to an application in a background running state.
In specific implementation, when the first electronic device outputs audio through a certain type of audio output end, the specific application program corresponding to the type of audio output end can be determined according to the type of the application program corresponding to the type of audio output end. For example, it is assumed that the audio output device corresponds to an application in a background running state, the audio output device corresponds to an application in a foreground running state, the first application is in the background running state, the second application is in the foreground running state, in this scenario, the audio output device corresponds to the first application, and the audio of the first application is output from the audio output device and is not output from the audio output device; the audio output device corresponds to the second application program, and the audio of the first application program can be output from the audio output device and can not be output from the audio output device.
Therefore, the target audio output end can only output the audio of one application program at the same time, and the audio output effect is further ensured.
It should be noted that, various optional implementations described in the embodiments of the present invention may be implemented in combination with each other or separately without conflict between the implementations, and the embodiments of the present invention are not limited in this respect.
It should be noted that the present embodiment is implemented as a mobile communication terminal corresponding to the above method embodiment, and therefore, reference may be made to the relevant description in the above method embodiment, and the same beneficial effects may be achieved. To avoid repetition of the description, the description is omitted.
For ease of understanding, examples are illustrated below:
as shown in fig. 3, the audio processing method may include the steps of:
step 301, after the sharing end and the receiving end establish connection, the sharing end synchronously shares a certain APP to the receiving end.
The shared APP may be referred to as a shared APP.
Step 302, the sharing end determines whether the audio playing state of the sharing APP is in a closed state.
If the status is off, go to step 306; otherwise, step 303 is performed.
Optionally, the audio playing state of the shared APP is set to the closed state by default.
The user can set the playing state of the shared APP in the browsing interface of the recent application (which can be understood as a background application). Referring to fig. 2b, the audio playing status of the shared application 2 is in the off state, and step 306 is executed. Clicking the "volume" button switches the state, as shown in fig. 2a, the audio playing state of the shared application 2 is changed to the on state, and step 303 can be executed.
And step 303, sharing whether the APP is in a background running state.
If so, go to step 304, otherwise go to step 305.
Optionally, in the case that the sharing APP is an application that does not need to play audio, step 303 may not be performed.
And step 304, judging whether the APP operated by the foreground of the sharing end plays sound.
If so, step 306, otherwise, step 305 is performed.
And 305, the sharing end normally plays the sound of the sharing APP.
Step 306, the sharing end mutes the shared APP, but the sound data is still transmitted to the receiving end, and the sharing end plays the sound of the APP running in the foreground.
During specific implementation, when the sound tone of the APP to be shared is mute, the control can be reduced through touch control volume, or the preset gesture control and other modes are implemented.
According to the content, when the sharing end shares the APP to the receiving end, the user can select whether to play the sound resource corresponding to the shared APP on the foreground, and if the sharing play is not selected, the sound resource of the APP only shares the receiving end and cannot be played on the sharing end; if the user selects the sharing APP to play the sound resource on the foreground, if the APP is on the foreground, the sharing end plays the sound resource corresponding to the APP, if the APP is on the background, whether the application of the sharing end foreground has the operation of playing the sound or not is judged, if yes, the sound of the sharing APP is set to be in a mute state, the audio data can still be transmitted to the receiving end, if the current application does not play the sound operation, the sound of the sharing APP is still played normally by default, and the sound can be muted through the shortcut. Therefore, in the embodiment of the invention, when sharing the APP, the user can freely select whether to play the sound of the shared APP, and meanwhile, the problem that the shared APP and the local APP need to play the sound at the same time can be solved, and the experience of the user in using the shared application function can be well ensured.
In addition, the embodiment of the invention can realize the independent sound separation playing based on the multi-audio output port, if the Bluetooth sound box is connected, the music sound source and the game sound source can be separated to play, the game sound is played by using the mobile phone, and the sound box plays the music, thereby avoiding the mutual interference of the music and the game sound during the game playing; connected bluetooth headset, when listening to the music through the earphone, through the sound separation, place the mobile phone in with notice sound such as news, phone and remind, avoided the interference of prompt tone to the music, promoted the experience that the user listened to the music.
Referring to fig. 4, fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention. The electronic device 400 is a first electronic device, and as shown in fig. 4, the electronic device 400 includes:
the sharing module 401 is configured to share an application interface and audio data of a first application program of the first electronic device with the second electronic device when the first electronic device and the second electronic device are connected;
a control module 402, configured to control a working state of a target audio output end according to an audio playing state of the first application program in the first electronic device;
wherein the target audio output comprises at least one of: an audio output device installed on the first electronic equipment; the audio output device is connected with the first electronic device; each of the target audio outputs is allowed to output at most one application's audio at the same time.
Optionally, the control module 402 includes at least one of:
the first control submodule is used for prohibiting the target audio output end from outputting the audio of the first electronic equipment under the condition that the audio playing state of the first application program in the first electronic equipment is a closed state;
the second control submodule is used for controlling the working state of the target audio output end according to the target running states of the first application program and the second application program if the target application program operated by the first electronic equipment also comprises the second application program with an audio playing function under the condition that the audio playing state of the first application program in the first electronic equipment is an open state;
the target running state comprises a foreground running state or a background running state.
Optionally, in a case that the target audio output end is the audio output device or the audio output apparatus, the second control sub-module is specifically configured to at least one of:
when the target running state of the first application program is a foreground running state and the target running state of the second application program is a background running state, allowing the target audio output end to output the audio of the first application program and forbidding the target audio output end to output the audio of the second application program;
and under the condition that the target running state of the first application program is a background running state and the target running state of the second application program is a foreground running state, forbidding the target audio output end to output the audio of the first application program, and allowing the target audio output end to output the audio of the second application program.
Optionally, the target audio output end includes the audio output device and the audio output device, and the second control sub-module is specifically configured to:
and controlling the working state of the target audio output end according to the target running states of the first application program and the second application program and the types of the application programs corresponding to the audio output device and the audio output equipment.
Optionally, the second control sub-module includes at least one of:
the first control unit is used for allowing the first audio output end to output the audio of the first application program and allowing the second audio output end to output the audio of the second application program under the condition that the target running state of the first application program is a foreground running state, the target running state of the second application program is a background running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state;
the second control unit is used for allowing the first audio output end to output the audio of the second application program and allowing the second audio output end to output the audio of the first application program under the condition that the target running state of the first application program is a background running state, the target running state of the second application program is a foreground running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state;
wherein the first audio output is one of the audio output device and the audio output apparatus, and the second audio output is the other of the audio output device and the audio output apparatus.
The electronic device 400 can implement the processes in the method embodiment of the present invention and achieve the same beneficial effects, and is not described herein again to avoid repetition.
Referring to fig. 5, fig. 5 is a second structural diagram of an electronic device according to a second embodiment of the present invention, where the electronic device may be a hardware structural diagram of an electronic device for implementing various embodiments of the present invention. As shown in fig. 5, the electronic device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The radio frequency unit 501 is configured to:
under the condition that the first electronic device and the second electronic device are connected, sharing an application interface and audio data of a first application program of the first electronic device to the second electronic device;
a processor 510 for:
controlling the working state of a target audio output end according to the audio playing state of the first application program in the first electronic equipment;
wherein the target audio output comprises at least one of: an audio output device installed on the first electronic equipment; the audio output device is connected with the first electronic device; each of the target audio outputs is allowed to output at most one application's audio at the same time.
Optionally, the processor 510 is further configured to at least one of:
under the condition that the audio playing state of the first electronic equipment is the closed state, the target audio output end is forbidden to output the audio of the first electronic equipment;
under the condition that the audio playing state of the first application program in the first electronic device is an open state, if a second application program with an audio playing function is also included in target application programs operated by the first electronic device, controlling the working state of a target audio output end according to the target operating states of the first application program and the second application program;
the target running state comprises a foreground running state or a background running state.
Optionally, in the case that the target audio output end is the audio output device or the audio output apparatus, the processor 510 is further configured to at least one of:
when the target running state of the first application program is a foreground running state and the target running state of the second application program is a background running state, allowing the target audio output end to output the audio of the first application program and forbidding the target audio output end to output the audio of the second application program;
and under the condition that the target running state of the first application program is a background running state and the target running state of the second application program is a foreground running state, forbidding the target audio output end to output the audio of the first application program, and allowing the target audio output end to output the audio of the second application program.
Optionally, the target audio output end includes the audio output device and the audio output device, and the processor 510 is further configured to:
and controlling the working state of the target audio output end according to the target running states of the first application program and the second application program and the types of the application programs corresponding to the audio output device and the audio output equipment.
Optionally, the processor 510 is further configured to at least one of:
when the target running state of the first application program is a foreground running state, the target running state of the second application program is a background running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state, the first audio output end is allowed to output the audio of the first application program, and the second audio output end is allowed to output the audio of the second application program;
when the target running state of the first application program is a background running state, the target running state of the second application program is a foreground running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state, the first audio output end is allowed to output the audio of the second application program, and the second audio output end is allowed to output the audio of the first application program;
wherein the first audio output is one of the audio output device and the audio output apparatus, and the second audio output is the other of the audio output device and the audio output apparatus.
It should be noted that, in this embodiment, the electronic device 500 may implement each process in the method embodiment of the present invention and achieve the same beneficial effects, and for avoiding repetition, details are not described here again.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 501 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 502, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the electronic apparatus 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 501 in case of the phone call mode.
The electronic device 500 also includes at least one sensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 5061 and/or a backlight when the electronic device 500 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 505 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, and the Display panel 5061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 507 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction 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 sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 5, the touch panel 5071 and the display panel 5061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 508 is an interface for connecting an external device to the electronic apparatus 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic apparatus 500 or may be used to transmit data between the electronic apparatus 500 and external devices.
The memory 509 may be used to store software programs as well as various data. The memory 509 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 required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 509 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.
The processor 510 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the electronic device. Processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The electronic device 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system.
In addition, the electronic device 500 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 510, a memory 509, and a computer program that is stored in the memory 509 and can be run on the processor 510, and when the computer program is executed by the processor 510, the processes of the audio processing method embodiment are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned audio processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
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 apparatus 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 apparatus. 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 apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A playing method is applied to a first electronic device, and is characterized by comprising the following steps:
under the condition that the first electronic device and the second electronic device are connected, sharing an application interface and audio data of a first application program of the first electronic device to the second electronic device;
controlling the working state of a target audio output end according to the audio playing state of the first application program in the first electronic equipment;
wherein each of the target audio outputs is allowed to output at most an application's audio at the same time; the target audio output includes at least one of: the audio output device is installed on the first electronic equipment, and the audio output equipment is connected with the first electronic equipment.
2. The method of claim 1, wherein controlling the operating state of a target audio output according to the audio playing state of the first application program on the first electronic device comprises at least one of:
under the condition that the audio playing state of the first electronic equipment is the closed state, the target audio output end is forbidden to output the audio of the first electronic equipment;
under the condition that the audio playing state of the first application program in the first electronic device is an open state, if a second application program with an audio playing function is also included in target application programs operated by the first electronic device, controlling the working state of a target audio output end according to the target operating states of the first application program and the second application program;
the target running state comprises a foreground running state or a background running state.
3. The method according to claim 2, wherein in the case that the target audio output is an audio output device installed in the first electronic device or an audio output device connected to the first electronic device, the controlling the operating state of the target audio output according to the target operating states of the first application program and the second application program includes at least one of:
when the target running state of the first application program is a foreground running state and the target running state of the second application program is a background running state, allowing the target audio output end to output the audio of the first application program and forbidding the target audio output end to output the audio of the second application program;
and under the condition that the target running state of the first application program is a background running state and the target running state of the second application program is a foreground running state, forbidding the target audio output end to output the audio of the first application program, and allowing the target audio output end to output the audio of the second application program.
4. The method of claim 2, wherein in the case that the target audio output comprises an audio output device installed in the first electronic device and an audio output device connected to the first electronic device, the controlling the operating state of the target audio output according to the target operating states of the first application program and the second application program comprises:
and controlling the working state of the target audio output end according to the target running states of the first application program and the second application program and the types of the application programs corresponding to the audio output device and the audio output equipment.
5. The method according to claim 4, wherein the controlling the operation state of the target audio output end according to the target operation state of the first application program and the second application program and the type of the application program corresponding to the audio output device and the audio output apparatus comprises at least one of:
when the target running state of the first application program is a foreground running state, the target running state of the second application program is a background running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state, the first audio output end is allowed to output the audio of the first application program, and the second audio output end is allowed to output the audio of the second application program;
when the target running state of the first application program is a background running state, the target running state of the second application program is a foreground running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state, the first audio output end is allowed to output the audio of the second application program, and the second audio output end is allowed to output the audio of the first application program;
wherein the first audio output is one of the audio output device and the audio output apparatus, and the second audio output is the other of the audio output device and the audio output apparatus.
6. An electronic device, the electronic device being a first electronic device, the electronic device comprising:
the sharing module is used for sharing an application interface and audio data of a first application program of the first electronic equipment to the second electronic equipment under the condition that the first electronic equipment and the second electronic equipment are connected;
the control module is used for controlling the working state of a target audio output end according to the audio playing state of the first application program in the first electronic equipment;
wherein each of the target audio outputs is allowed to output at most an application's audio at the same time; the target audio output includes at least one of: the audio output device is installed on the first electronic equipment, and the audio output equipment is connected with the first electronic equipment.
7. The electronic device of claim 6, wherein the control module comprises at least one of:
the first control submodule is used for prohibiting the target audio output end from outputting the audio of the first electronic equipment under the condition that the audio playing state of the first application program in the first electronic equipment is a closed state;
the second control submodule is used for controlling the working state of the target audio output end according to the target running states of the first application program and the second application program if the target application program operated by the first electronic equipment also comprises the second application program with an audio playing function under the condition that the audio playing state of the first application program in the first electronic equipment is an open state;
the target running state comprises a foreground running state or a background running state.
8. The electronic device of claim 7, wherein in the case where the target audio output is an audio output device mounted to the first electronic device or an audio output device connected to the first electronic device, the second control sub-module is specifically configured to at least one of:
when the target running state of the first application program is a foreground running state and the target running state of the second application program is a background running state, allowing the target audio output end to output the audio of the first application program and forbidding the target audio output end to output the audio of the second application program;
and under the condition that the target running state of the first application program is a background running state and the target running state of the second application program is a foreground running state, forbidding the target audio output end to output the audio of the first application program, and allowing the target audio output end to output the audio of the second application program.
9. The electronic device of claim 7, wherein in the case where the target audio output comprises the first electronic device mounted audio output apparatus and the first electronic device connected audio output device, the second control sub-module is specifically configured to:
and controlling the working state of the target audio output end according to the target running states of the first application program and the second application program and the types of the application programs corresponding to the audio output device and the audio output equipment.
10. The electronic device of claim 9, wherein the second control sub-module comprises at least one of:
the first control unit is used for allowing the first audio output end to output the audio of the first application program and allowing the second audio output end to output the audio of the second application program under the condition that the target running state of the first application program is a foreground running state, the target running state of the second application program is a background running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state;
the second control unit is used for allowing the first audio output end to output the audio of the second application program and allowing the second audio output end to output the audio of the first application program under the condition that the target running state of the first application program is a background running state, the target running state of the second application program is a foreground running state, the first audio output end corresponds to the application program in the foreground running state, and the second audio output end corresponds to the background running state;
wherein the first audio output is one of the audio output device and the audio output apparatus, and the second audio output is the other of the audio output device and the audio output apparatus.
11. An electronic device, comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the playback method according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the playback method according to one of claims 1 to 5.
CN201911420655.3A 2019-12-31 2019-12-31 Playing method and electronic equipment Pending CN111078186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911420655.3A CN111078186A (en) 2019-12-31 2019-12-31 Playing method and electronic equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911420655.3A CN111078186A (en) 2019-12-31 2019-12-31 Playing method and electronic equipment
PCT/CN2020/139910 WO2021136141A1 (en) 2019-12-31 2020-12-28 Playback method and electronic device

Publications (1)

Publication Number Publication Date
CN111078186A true CN111078186A (en) 2020-04-28

Family

ID=70321311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911420655.3A Pending CN111078186A (en) 2019-12-31 2019-12-31 Playing method and electronic equipment

Country Status (2)

Country Link
CN (1) CN111078186A (en)
WO (1) WO2021136141A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076082A (en) * 2021-06-03 2021-07-06 杭州星犀科技有限公司 Method, system, electronic device and storage medium for audio source processing
WO2021136141A1 (en) * 2019-12-31 2021-07-08 维沃移动通信有限公司 Playback method and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079986A (en) * 2014-06-05 2014-10-01 上海聚力传媒技术有限公司 Method and device for achieving video playing between devices
CN107229448A (en) * 2017-06-30 2017-10-03 联想(北京)有限公司 Audio frequency playing method and electronic equipment
CN107783833A (en) * 2016-08-25 2018-03-09 华为技术有限公司 A kind of management method and device of terminal background application
CN107835979A (en) * 2015-06-29 2018-03-23 微软技术许可有限责任公司 Intelligent audio routing management
CN108509176A (en) * 2018-04-10 2018-09-07 Oppo广东移动通信有限公司 A kind of method, apparatus of playing audio-fequency data, storage medium and intelligent terminal
CN108781236A (en) * 2017-06-16 2018-11-09 华为技术有限公司 Audio frequency playing method and electronic equipment
US20190341038A1 (en) * 2018-05-07 2019-11-07 Spotify Ab Voice recognition system for use with a personal media streaming appliance

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241640B (en) * 2017-06-26 2019-05-24 中广热点云科技有限公司 A kind of method that mobile device and television equipment are played simultaneously
CN108958684A (en) * 2018-06-22 2018-12-07 维沃移动通信有限公司 Throw screen method and mobile terminal
CN111078186A (en) * 2019-12-31 2020-04-28 维沃移动通信有限公司 Playing method and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079986A (en) * 2014-06-05 2014-10-01 上海聚力传媒技术有限公司 Method and device for achieving video playing between devices
CN107835979A (en) * 2015-06-29 2018-03-23 微软技术许可有限责任公司 Intelligent audio routing management
CN107783833A (en) * 2016-08-25 2018-03-09 华为技术有限公司 A kind of management method and device of terminal background application
CN108781236A (en) * 2017-06-16 2018-11-09 华为技术有限公司 Audio frequency playing method and electronic equipment
CN107229448A (en) * 2017-06-30 2017-10-03 联想(北京)有限公司 Audio frequency playing method and electronic equipment
CN108509176A (en) * 2018-04-10 2018-09-07 Oppo广东移动通信有限公司 A kind of method, apparatus of playing audio-fequency data, storage medium and intelligent terminal
US20190341038A1 (en) * 2018-05-07 2019-11-07 Spotify Ab Voice recognition system for use with a personal media streaming appliance

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021136141A1 (en) * 2019-12-31 2021-07-08 维沃移动通信有限公司 Playback method and electronic device
CN113076082A (en) * 2021-06-03 2021-07-06 杭州星犀科技有限公司 Method, system, electronic device and storage medium for audio source processing

Also Published As

Publication number Publication date
WO2021136141A1 (en) 2021-07-08

Similar Documents

Publication Publication Date Title
CN108182019B (en) Suspension control display processing method and mobile terminal
CN108255378B (en) Display control method and mobile terminal
CN108551636B (en) Loudspeaker control method and mobile terminal
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN109379484B (en) Information processing method and terminal
CN111078186A (en) Playing method and electronic equipment
CN108446156B (en) Application program control method and terminal
EP3691235A1 (en) Display method and mobile terminal
WO2019154182A1 (en) Method for setting volume of application program, and mobile terminal
WO2020024770A1 (en) Method for determining communication object, and mobile terminal
CN109710130B (en) Display method and terminal
CN109407920B (en) Status icon display method, status icon processing method and related equipment
CN111526248B (en) Audio output mode switching method and electronic equipment
WO2021068885A1 (en) Control method and electronic device
WO2021204045A1 (en) Audio control method and electronic device
CN110597478A (en) Audio output method and electronic equipment
CN110990172A (en) Application sharing method, first electronic device and computer-readable storage medium
CN111443968A (en) Screenshot method and electronic equipment
CN109558046B (en) Information display method and terminal equipment
CN109445589B (en) Multimedia file playing control method and terminal equipment
CN111061407B (en) Video program operation control method, electronic device, and storage medium
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN110825295B (en) Application program control method and electronic equipment
CN109819118B (en) Volume adjusting method and mobile terminal
CN111147919A (en) Play adjustment method, electronic equipment and computer readable 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