WO2021136141A1 - 播放方法及电子设备 - Google Patents

播放方法及电子设备 Download PDF

Info

Publication number
WO2021136141A1
WO2021136141A1 PCT/CN2020/139910 CN2020139910W WO2021136141A1 WO 2021136141 A1 WO2021136141 A1 WO 2021136141A1 CN 2020139910 W CN2020139910 W CN 2020139910W WO 2021136141 A1 WO2021136141 A1 WO 2021136141A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
electronic device
audio output
audio
target
Prior art date
Application number
PCT/CN2020/139910
Other languages
English (en)
French (fr)
Inventor
李学宾
张雷
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2021136141A1 publication Critical patent/WO2021136141A1/zh

Links

Images

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/16Sound input; Sound output
    • G06F3/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback

Definitions

  • the embodiments of the present invention relate to the field of communication technologies, and in particular, to a playback method and electronic equipment.
  • the audio output device of the first electronic device will simultaneously output the audio of the video application and the music application, resulting in poor audio output effects.
  • the embodiments of the present invention provide a playback method and an electronic device to solve the problem of poor audio output effects caused by the electronic device simultaneously outputting the audio of a sharing application and another application in the prior art.
  • the present invention is implemented as follows:
  • an embodiment of the present invention provides a playback method, which includes:
  • each audio output terminal of the target audio output terminal is allowed to output at most one application audio at the same time;
  • the target audio output terminal includes at least one of the following: an audio output device installed in the first electronic device An audio output device connected to the first electronic device.
  • an embodiment of the present invention also provides an electronic device, the electronic device is a first electronic device, and the electronic device includes:
  • the sharing module is configured to share the application interface and audio data of the first application program of the first electronic device to the second electronic device when the connection between the first electronic device and the second electronic device is established;
  • the control module is configured to control the working state of the target audio output terminal according to the audio playing state of the first application in the first electronic device;
  • each audio output terminal of the target audio output terminal is allowed to output at most one application audio at the same time;
  • the target audio output terminal includes at least one of the following: an audio output device installed in the first electronic device An audio output device connected to the first electronic device.
  • an embodiment of the present invention also provides an electronic device that includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor.
  • the computer program is The processor implements the steps of the playback method as described above when executed.
  • an embodiment of the present invention also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the playback method described above are implemented.
  • the first electronic device shares the first application with the second electronic device, it can control the audio output of the target audio output terminal according to the audio playing state of the first application on the first electronic device.
  • Working state wherein each of the target audio output terminals is allowed to output at most one application audio at the same time. It can be seen that, compared with the audio output of multiple applications in the prior art, one audio output port can improve the audio output effect; on the other hand, because the first application is in the audio playing state of the first electronic device It can be set independently by the user. Therefore, the embodiment of the present invention controls the working state of the target audio output terminal through the audio playback state of the first application on the first electronic device, which can make the working state of the target audio output terminal meet the user's expectations, thereby improving Audio output effect.
  • FIG. 1 is one of the flowcharts of the playback method provided by the embodiment of the present invention.
  • Figure 2a is one of the schematic diagrams of the interface provided by the embodiment of the present invention.
  • Figure 2b is the second schematic diagram of an interface provided by an embodiment of the present invention.
  • FIG. 3 is the second flowchart of the playback method provided by the embodiment of the present invention.
  • Figure 4 is one of the structural diagrams of the electronic device provided by the embodiment of the present invention.
  • Fig. 5 is a second structural diagram of an electronic device provided by an embodiment of the present invention.
  • first”, “second”, etc. in the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.
  • the terms “including” and “having” and any variations of them are intended to cover non-exclusive inclusions.
  • a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those clearly listed. Those steps or units may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or equipment.
  • the playback method of the embodiment of the present invention can be applied to an electronic device, wherein the electronic device has at least one of the following characteristics: the electronic device is equipped with an audio output device; the electronic device can be connected to an audio output device.
  • the audio output device can be understood as the audio output terminal of the electronic device itself, and the audio output device can be understood as the audio output terminal independent of the electronic device.
  • the electronic device can be a mobile phone, a tablet (Personal Computer), a laptop (a laptop computer), a personal digital assistant (a personal digital assistant, PDA), or a wearable device (Wearable Device), etc.
  • Fig. 1 is one of the flowcharts of the playback method provided by the embodiment of the present invention. This embodiment can be applied to the first electronic device.
  • the audio processing method may include the following steps:
  • Step 101 When the first electronic device and the second electronic device are connected, share the application interface and audio data of the first application program of the first electronic device to the second electronic device.
  • the establishment of a connection between the first electronic device and the second electronic device may be used to: share an application.
  • the first electronic device and the second electronic device may be connected in a wired manner or a wireless manner, such as a Bluetooth connection.
  • the present invention does not limit the first electronic device and the second electronic device.
  • the connection mode between the second electronic device that is, any connection mode that enables the sharing of applications between the first electronic device and the second electronic device falls within the protection scope of the present invention .
  • the sharing of the first application program by the first electronic device with the second electronic device is specifically expressed as: sharing the application interface and audio data of the first application program of the first electronic device with the second electronic device equipment.
  • the first application can be referred to as a sharing application.
  • the first electronic device may realize the sharing of the first application program in the following manner:
  • the virtual screen of the first electronic device is displayed. State the application interface of the first application;
  • the second electronic device may display the application interface of the first application and play the audio of the first application. Further, the running state of the first application on the second electronic device will not be affected by the running state of the first application on the first electronic device.
  • Step 102 Control the working state of the target audio output terminal according to the audio playing state of the first application on the first electronic device.
  • the target audio output terminal includes at least one of the following: an audio output device installed in the first electronic device; an audio output device connected to the first electronic device; each audio output in the target audio output terminal The terminal allows at most one application's audio to be output at the same time.
  • the audio output device connected to the first electronic device does not include the second electronic device. That is, in this embodiment, the audio output device connected to the first electronic device and the second electronic device are two independent devices.
  • the audio playback state can be specifically represented as an off state or an on state.
  • the third application program of the electronic device that has not been shared by the application program is used as an example for description.
  • the target audio output terminal When the audio playing state of the third application of the first electronic device is in the closed state, the target audio output terminal will not output the audio of the third application, even if the volume of the third application is greater than zero.
  • the target audio output terminal is allowed to output the audio of the third application, but it should be understood that this does not mean that the target audio output must be The audio of the third application will be output. Specifically, when the volume of the third application is zero, that is, when the third application is in a mute state, the target audio output terminal will not output the audio of the third application; if the volume of the third application is greater than zero, that is, the third application When the application is in a non-mute state, the target audio output terminal will output the audio of the third application.
  • the first electronic device can set a target control, and the user can trigger the first electronic device to switch the audio playing state of the application by touching the target control.
  • the target control may include a first display state and a second display state, wherein the first display state indicates that the audio playback state is an on state, and the first display state indicates that the audio playback state is an off state.
  • the target control may correspond to the first electronic device; in the second implementation manner, the target control may correspond to an application program.
  • the audio playback state of any application can be controlled by a target control.
  • the first electronic device may control the audio playback state of any application program in the following manner:
  • the identification information of the N applications can be changed, and N is a positive integer
  • the audio playing state of the fourth application is switched to the playing state; otherwise, the audio playing state is switched to the closed state.
  • one target control can correspond to one or more applications.
  • the control method of controlling the audio playback state of any one of the at least two applications through the target control can participate in the realization of the first implementation manner, here No longer.
  • the electronic device can be triggered to switch the audio playing state of the application by touching the target control corresponding to the application.
  • the first electronic device may only display the shared application, that is, the target control of the first application.
  • the display position, display shape, and display size of the target control can be set according to actual requirements, which is not limited in the embodiment of the present invention.
  • the target control of a certain application can be set on the application interface of the application in the background application browsing interface.
  • the target control of a certain application can be set on the application interface of the application in the background application browsing interface.
  • the background application browsing interface 20 includes application interfaces of application 1, application 2, and application 3.
  • the upper right corner of the application interface of application 2 is provided with a target control 21.
  • the target control 21 is in the first display state, which means that the audio playback state of the application 2 is in the on state; in Figure 2b, the target control 21 is in the second display state, which means that the audio playback state of the application 2 is off status.
  • the audio playback state of the first application can be set to the off state by default, and the non-shared application, such as the second The audio playback state of the application is set to on by default, which means that the target output terminal is controlled to output the audio of the non-sharing application first.
  • the user can switch the audio playback state of the shared application and the non-shared application through the target control.
  • the first electronic device shares the first application with the second electronic device, it can control the target audio output according to the audio playing state of the first application on the first electronic device The working status of the terminal.
  • the embodiment of the present invention can ensure that each audio output terminal of the target audio output terminal is allowed to output the audio of one application program at the same time, thereby improving the audio output effect compared with the prior art.
  • controlling the working state of the target audio output terminal according to the audio playing state of the first application on the first electronic device includes at least one of the following:
  • the target application running on the first electronic device further includes a second application with an audio playing function, Controlling the working state of the target audio output terminal according to the target running state of the first application and the second application;
  • the target operating state includes a foreground operating state or a background operating state.
  • Case 1 The audio playing state of the first application in the first electronic device is in the closed state.
  • the first electronic device may prohibit the target audio output terminal from outputting the audio of the first electronic device, that is, the target audio output terminal will not output the audio of the first electronic device.
  • the audio of the second application program can be output through the target audio output terminal.
  • Case 2 The audio playing state of the first application program in the first electronic device is in an open state.
  • the first electronic device may further detect whether the target application program run by the first electronic device further includes a second application program with an audio playback function.
  • the first electronic device may allow the target audio output terminal to output the 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 only when the first application is in the foreground running state of the first electronic device, otherwise it may The target audio output terminal is prohibited from outputting the audio of the first application program.
  • the first electronic device may further control the operation of the target audio output terminal according to the target running status of the first application and the second application State; wherein, the target operating state includes a foreground operating state or a background operating state.
  • the target audio output terminal in the embodiment of the present invention may include the following manifestations: Manner 1.
  • the target audio output terminal includes the audio output device installed in the first electronic device or the first electronic device Connected audio output device.
  • Expression mode 2 The target audio output terminal includes an audio output device installed in the first electronic device and an audio output device connected to the first electronic device.
  • the audio processing method of the embodiment of the present invention aims to ensure that each audio output terminal of the target audio output terminal is allowed to output audio of at most one application program at the same time. Therefore, for the different expressions of the target audio output terminal, "control the working status of the target audio output terminal according to the target running status of the first application and the second application; wherein, the target running status includes the foreground.
  • the specific implementation methods of "running state or background running state” can be different, and the specific instructions are as follows:
  • controlling the working state of the target audio output terminal according to the target running state of the first application and the second application includes at least one of the following:
  • the target audio output terminal is allowed to output the audio of the first application , Prohibiting the target audio output terminal from outputting the audio of the second application;
  • the target audio output terminal is prohibited from outputting the audio of the first application To allow the target audio output terminal to output the audio of the second application.
  • the first electronic device can output the audio of the application running in the foreground through the target audio output terminal, and will not output the audio of the application running in the background through the target audio output terminal, so that it can be guaranteed
  • the target audio output terminal only outputs the audio of one application program at the same time, thereby ensuring the audio output effect.
  • controlling the working state of the target audio output terminal according to the target running state of the first application and the second application includes:
  • the working state of the target audio output terminal is controlled according to the target running 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 device.
  • the types of applications can be divided based on the target operating state of the application, that is, applications in the foreground operating state belong to one type, and applications in the background operating state belong to another type.
  • the audio output device and the type of the application corresponding to the audio output device can be flexibly set and adjusted according to actual needs.
  • the target audio output is controlled according to the target running state of the first application and the second application, and the type of the application corresponding to the audio output device and the audio output device
  • the working status of the terminal including at least one of the following:
  • the target running state of the first application program is the foreground running state
  • the target running state of the second application program is the background running state
  • the first audio output terminal corresponds to the application in the foreground running state
  • the second audio When the output terminal corresponds to the background running state, the first audio output terminal is allowed to output the audio of the first application, and the second audio output terminal is allowed to output the audio of the second application;
  • the target running state of the first application is the background running state
  • the target running state of the second application is the foreground running state
  • the first audio output terminal corresponds to the application in the foreground running state
  • the second audio When the output terminal corresponds to the background running state, allowing the first audio output terminal to output the audio of the second application program, and allowing the second audio output terminal to output the audio of the first application program;
  • the first audio output terminal is one of the audio output device and the audio output device
  • the second audio output terminal is the other of the audio output device and the audio output device.
  • the target audio output terminal of the first electronic device includes two types: its own audio output terminal, that is, an audio output device, and an audio output terminal independent of the first electronic device, that is, audio output. equipment.
  • the first electronic device may also set the types of applications corresponding to different types of audio output terminals, where one type of audio output terminal corresponds to one type of application, and different types of audio output terminals correspond to the type of application program different.
  • the audio output device may correspond to an application program running in the foreground, and the audio output device may correspond to an application program running in the background.
  • the specific application program corresponding to the type of audio output terminal can be determined by the type of the application program corresponding to the type of audio output terminal.
  • the audio output device corresponds to an application in the background running state
  • the audio output device corresponds to an application in the foreground running state
  • the first application is in the background running state
  • the second application is in the foreground running state.
  • the audio output device corresponds to the first application
  • the audio of the first application will be output from the audio output device, not the audio output device
  • the audio output device corresponds to the second application, the audio of the first application Will be output from the audio output device, not from the audio output device.
  • the target audio output terminal only outputs the audio of one application program at the same time, thereby ensuring the audio output effect.
  • this embodiment serves as an implementation manner of a mobile communication terminal corresponding to the foregoing method embodiment. Therefore, reference may be made to the relevant description in the foregoing method embodiment, and the same beneficial effects can be achieved. In order to avoid repeating the description, it will not be repeated here.
  • the audio processing method may include the following steps:
  • Step 301 After the sharing terminal and the receiving terminal establish a connection, the sharing terminal synchronously shares an APP to the receiving terminal.
  • the app being shared can be called a sharing app.
  • Step 302 The sharing terminal judges whether the audio playing state of the sharing APP is in the off state.
  • step 306 If it is closed, go to step 306; otherwise, go to step 303.
  • the audio playback state of the sharing APP is set to the off state by default.
  • the user can set the playback status of the sharing APP through the browsing interface of the recent application (which can be understood as a background application).
  • the audio playback state of the shared application 2 is in the closed state, and step 306 is executed. Click the "volume" button to switch the state.
  • the audio playback state of the shared application 2 is turned to the on state, and step 303 can be performed.
  • Step 303 Whether the sharing APP is running in the background.
  • step 304 If yes, go to step 304, if not, go to step 305.
  • step 303 may not be performed.
  • Step 304 Determine whether the APP running in the foreground of the sharing terminal plays a sound.
  • step 306 If yes, go to step 306, if not, go to step 305.
  • Step 305 The sharing terminal normally plays the sound of the sharing APP.
  • Step 306 The sharing terminal implements mute processing on the sharing APP, but the sound data is still transmitted to the receiving terminal, and the sharing terminal plays the sound of the APP running in the foreground.
  • the sound of the sharing APP when the sound of the sharing APP is muted, it can be achieved by means of touch volume reduction control, or preset gesture control.
  • the sharing terminal shares the APP to the receiving terminal, the user can choose whether to play the sound resources corresponding to the shared APP in the foreground. If you do not choose to share and play, the sound resources of the APP will only be shared to the receiving terminal. It will not be played on the sharing terminal; if the user selects the sharing app to play the sound resource in the foreground, if the app is in the foreground, the sharing terminal will play the sound resource corresponding to the app, and if the app is in the background, judge whether the application in the foreground of the sharing terminal is There is an operation to play sound. If there is, the sound of the sharing APP will be muted, but the audio data can still be transmitted to the receiving end.
  • the sound of the sharing APP will still play normally by default.
  • the shortcut is set to mute it. It can be seen that in the embodiment of the present invention, when sharing an APP, the user can freely choose whether to play the sound of the shared APP, and can solve the problem that the shared APP and the local APP need to play sounds at the same time, which can well ensure that the user uses the shared application. Functional experience.
  • the embodiment of the present invention can realize separate and independent sound playback based on multiple audio output ports.
  • the music sound source and the game sound source can be separated and played, and the mobile phone can be used to play the game sound and the stereo to play the music.
  • FIG. 4 is one of the structural diagrams of the electronic device provided by the embodiment of the present invention.
  • the electronic device 400 is a first electronic device. As shown in FIG. 4, the electronic device 400 includes:
  • the sharing module 401 is configured to share the application interface and audio data of the first application program of the first electronic device to the second electronic device when the connection between the first electronic device and the second electronic device is established ;
  • the control module 402 is configured to control the working state of the target audio output terminal according to the audio playing state of the first application in the first electronic device;
  • the target audio output terminal includes at least one of the following: an audio output device installed in the first electronic device; an audio output device connected to the first electronic device; each audio output in the target audio output terminal The terminal allows at most one application's audio to be output at the same time.
  • control module 402 includes at least one of the following:
  • the first control sub-module is configured to prohibit the target audio output terminal from outputting the audio of the first electronic device when the audio playback state of the first electronic device is closed by the first application;
  • the second control sub-module is configured to, when the audio playing state of the first electronic device of the first application is in the on state, if the target application running on the first electronic device also includes audio
  • the second application program with the playback function controls the working state of the target audio output terminal according to the target running state of the first application program and the second application program;
  • the target operating state includes a foreground operating state or a background operating state.
  • the second control submodule is specifically used for at least one of the following:
  • the target audio output terminal is allowed to output the audio of the first application , Prohibiting the target audio output terminal from outputting the audio of the second application;
  • the target audio output terminal is prohibited from outputting the audio of the first application To allow the target audio output terminal to output the audio of the second application.
  • the target audio output terminal includes the audio output device and the audio output device
  • the second control submodule is specifically configured to:
  • the working state of the target audio output terminal is controlled according to the target running 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 device.
  • the second control submodule includes at least one of the following:
  • the first control unit is used for when the target running state of the first application program is the foreground running state, the target running state of the second application program is the background running state, and the first audio output terminal is in the foreground running state.
  • the second audio output terminal corresponds to the application program
  • the second audio output terminal corresponds to the background running state
  • the first audio output terminal is allowed to output the audio of the first application program
  • the second audio output terminal is allowed to output the second Audio of the application
  • the second control unit is used when the target running state of the first application program is the background running state, the target running state of the second application program is the foreground running state, and the first audio output terminal is in the foreground running state.
  • the first audio output terminal is allowed to output the audio of the second application program, and the second audio output terminal is allowed to output the first audio output terminal. Audio of the application;
  • the first audio output terminal is one of the audio output device and the audio output device
  • the second audio output terminal is the other of the audio output device and the audio output device.
  • the electronic device 400 can implement each process in the method embodiment of the present invention and achieve the same beneficial effects. In order to avoid repetition, details are not described herein again.
  • FIG. 5 is a second structural diagram of an electronic device provided by an embodiment of the present invention.
  • the electronic device may be a schematic diagram of a hardware structure of an electronic device that implements various embodiments of the present invention.
  • 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, The processor 510, and the power supply 511 and other components.
  • a radio frequency unit 501 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
  • the processor 510 and the power supply 511 and other components.
  • the structure of the electronic device shown in FIG. 5 does not constitute a limitation on the electronic device.
  • the electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. Layout.
  • electronic devices include, but are not limited to, mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted terminals, wearable devices, and pedometers.
  • the radio frequency unit 501 is used for:
  • the processor 510 is used for:
  • the target audio output terminal includes at least one of the following: an audio output device installed in the first electronic device; an audio output device connected to the first electronic device; each audio output in the target audio output terminal The terminal allows at most one application's audio to be output at the same time.
  • processor 510 is further used for at least one of the following:
  • the target application running on the first electronic device further includes a second application with an audio playing function, Controlling the working state of the target audio output terminal according to the target running state of the first application and the second application;
  • the target operating state includes a foreground operating state or a background operating state.
  • the processor 510 is further configured to be used for at least one of the following:
  • the target audio output terminal is allowed to output the audio of the first application , Prohibiting the target audio output terminal from outputting the audio of the second application;
  • the target audio output terminal is prohibited from outputting the audio of the first application To allow the target audio output terminal to output the audio of the second application.
  • the target audio output terminal includes the audio output device and the audio output device, and the processor 510 is further configured to:
  • the working state of the target audio output terminal is controlled according to the target running 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 device.
  • processor 510 is further used for at least one of the following:
  • the target running state of the first application program is the foreground running state
  • the target running state of the second application program is the background running state
  • the first audio output terminal corresponds to the application in the foreground running state
  • the second audio When the output terminal corresponds to the background running state, the first audio output terminal is allowed to output the audio of the first application, and the second audio output terminal is allowed to output the audio of the second application;
  • the target running state of the first application is the background running state
  • the target running state of the second application is the foreground running state
  • the first audio output terminal corresponds to the application in the foreground running state
  • the second audio When the output terminal corresponds to the background running state, allowing the first audio output terminal to output the audio of the second application program, and allowing the second audio output terminal to output the audio of the first application program;
  • the first audio output terminal is one of the audio output device and the audio output device
  • the second audio output terminal is the other of the audio output device and the audio output device.
  • the radio frequency unit 501 can be used for receiving and sending signals in the process of sending and receiving information or talking. Specifically, after receiving the downlink data from the base station, it is processed by the processor 510; Uplink data is sent to the base station.
  • the 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.
  • the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.
  • the electronic device provides users with wireless broadband Internet access through the network module 502, such as helping users to send and receive emails, browse web pages, and access streaming media.
  • the audio output unit 503 can convert the 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 it as sound. Moreover, the audio output unit 503 may also provide audio output related to a specific function performed by the electronic device 500 (for example, call signal reception sound, 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 audio or video signals.
  • the input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042.
  • the graphics processor 5041 is configured to monitor images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. Data is processed.
  • the processed image frame may be displayed on the display unit 506.
  • the image frame processed by the graphics processor 5041 may be stored in the memory 509 (or other storage medium) or sent via the radio frequency unit 501 or the network module 502.
  • the microphone 5042 can receive sound, and can process such sound into audio data.
  • the processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 501 for output in the case of a telephone call mode.
  • the electronic device 500 further includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor includes an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light.
  • the proximity sensor can close the display panel 5061 and the display panel 5061 when the electronic device 500 is moved to the ear. / Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games) , Magnetometer attitude calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 505 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
  • 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), etc.
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • the user input unit 507 can be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the electronic device.
  • the user input unit 507 includes a touch panel 5071 and other input devices 5072.
  • the touch panel 5071 also called a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 5071 or near the touch panel 5071. operating).
  • the touch panel 5071 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 510, the command sent by the processor 510 is received and executed.
  • the touch panel 5071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the user input unit 507 may also include other input devices 5072.
  • other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
  • the touch panel 5071 can be overlaid on the display panel 5061.
  • the touch panel 5071 detects a touch operation on or near it, it is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 determines the type of the touch event according to the touch.
  • the type of event provides corresponding visual output on the display panel 5061.
  • the touch panel 5071 and the display panel 5061 are used as 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 can be integrated
  • the implementation of the input and output functions of the electronic device is not specifically limited here.
  • the interface unit 508 is an interface for connecting an external device and the electronic device 500.
  • the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc.
  • the interface unit 508 can be used to receive input (for example, data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic device 500 or can be used to connect the electronic device 500 to an external device. Transfer data between devices.
  • the memory 509 can be used to store software programs and various data.
  • the memory 509 may mainly include a storage program area and a storage data area.
  • the storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
  • the memory 509 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the processor 510 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, runs or executes software programs and/or modules stored in the memory 509, and calls data stored in the memory 509 , Perform various functions of electronic equipment and process data, so as to monitor the electronic equipment as a whole.
  • the processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem The processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 510.
  • the electronic device 500 may also include a power source 511 (such as a battery) for supplying power to various components.
  • a power source 511 such as a battery
  • the power source 511 may be logically connected to the processor 510 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. And other functions.
  • the electronic device 500 includes some functional modules not shown, which will not be repeated here.
  • the embodiment of the present invention also provides an electronic device, including a processor 510, a memory 509, and a computer program stored on the memory 509 and running on the processor 510.
  • an electronic device including a processor 510, a memory 509, and a computer program stored on the memory 509 and running on the processor 510.
  • the computer program is executed by the processor 510.
  • the various processes of the foregoing audio processing method embodiments are implemented, and the same technical effects can be achieved. To avoid repetition, details are not repeated here.
  • the embodiment of the present invention also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, each process of the above-mentioned audio processing method embodiment is realized, and the same technology can be achieved. The effect, in order to avoid repetition, will not be repeated here.
  • the computer-readable storage medium such as read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk, or optical disk, etc.
  • the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present invention.
  • a terminal which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

一种播放方法及电子设备,该方法应用于第一电子设备,包括:在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备(101);根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态(102);其中,所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频;所述目标音频输出端包括以下至少一项:所述第一电子设备安装的音频输出装置、所述第一电子设备连接的音频输出设备。

Description

播放方法及电子设备
相关申请的交叉引用
本申请主张在2019年12月31日在中国提交的中国专利申请号No.201911420655.3的优先权,其全部内容通过引用包含于此。
技术领域
本发明实施例涉及通信技术领域,尤其涉及一种播放方法及电子设备。
背景技术
随着计算机技术的快速发展,电子设备的功能越来越丰富,不同电子设备之间的功能分享需求越来越强烈,例如,应用分享是一种常见的分享需求。
目前,当第一电子设备将具有音频播放功能的应用程序,如视频应用程序分享给第二电子设备时,若第一电子设备将视频应用程序切换至后台运行,前台运行另外的具有音频播放功能的应用程序,如音乐应用程序,第一电子设备的音频输出装置会同时输出视频应用程序和音乐应用程序的音频,造成音频输出效果较差。
发明内容
本发明实施例提供一种播放方法及电子设备,以解决现有技术因电子设备同时输出分享应用程序和另一应用程序的音频,造成音频输出效果较差的问题。
为解决上述问题,本发明是这样实现的:
第一方面,本发明实施例提供了一种播放方法,该方法包括:
在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备;
根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态;
其中,所述目标音频输出端中的每个音频输出端在同一时刻至多允许输 出一个应用程序的音频;所述目标音频输出端包括以下至少一项:所述第一电子设备安装的音频输出装置、所述第一电子设备连接的音频输出设备。
第二方面,本发明实施例还提供一种电子设备,所述电子设备为第一电子设备,所述电子设备包括:
分享模块,用于在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备;
控制模块,用于根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态;
其中,所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频;所述目标音频输出端包括以下至少一项:所述第一电子设备安装的音频输出装置、所述第一电子设备连接的音频输出设备。
第三方面,本发明实施例还提供一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的播放方法的步骤。
第四方面,本发明实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的播放方法的步骤。
在本发明实施例中,第一电子设备在将第一应用程序分享给第二电子设备后,可以根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态,其中,所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频。可见,相比于现有技术中一个音频输出端口会输出多个应用程序的音频,本发明实施例可以提高音频输出效果;另一方面,由于第一应用程序在第一电子设备的音频播放状态可以由用户自主设置,因此,本发明实施例通过第一应用程序在第一电子设备的音频播放状态来控制目标音频输出端的工作状态,可以使得目标音频输出端的工作状态符合用户的期望,进而提高音频输出效果。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的播放方法的流程图之一;
图2a是本发明实施例提供的界面示意图之一;
图2b是本发明实施例提供的界面示意图之二;
图3是本发明实施例提供的播放方法的流程图之二;
图4是本发明实施例提供的电子设备的结构图之一;
图5是本发明实施例提供的电子设备的结构图之二。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本发明实施例的播放方法可以应用于电子设备,其中,该电子设备具有以下至少一项特征:该电子设备安装有音频输出装置;该电子设备可连接音频输出设备。应理解的是,音频输出装置可理解为电子设备自身的音频输出端,音频输出设备可理解为独立于电子设备之外的音频输出端。
在实际应用中,电子设备可以是手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digital assistant,PDA)、或可穿戴式设备(Wearable Device)等。
以下对本发明实施例的播放方法进行说明。
参见图1,图1是本发明实施例提供的播放方法的流程图之一。本实施例的可以应用于第一电子设备。
如图1所示,音频处理方法可以包括以下步骤:
步骤101、在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备。
在本实施例中,所述第一电子设备和所述第二电子设备建立连接可以用于:分享应用程序。具体实现时,所述第一电子设备和所述第二电子设备的连接方式可以是有线方式,也可以是无线方式,如通过蓝牙连接等,本发明并不限制所述第一电子设备和所述第二电子设备之间的连接方式,也就是说,任何可使所述第一电子设备和所述第二电子设备之间进行应用程序的分享的连接方式都落入本发明的保护范围内。
在本实施例中,第一电子设备向第二电子设备分享第一应用程序,具体表现为:将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备。第一应用程序可以称为分享应用程序。
具体实现时,第一电子设备可以通过以下方式实现所述第一应用程序的分享:
在所述第一电子设备和第二电子设备建立连接,且所述第一电子设备选择向第二电子设备分享第一应用程序的情况下,在所述第一电子设备的虚拟屏幕中显示所述第一应用程序的应用界面;
对虚拟屏幕进行录屏,得到录屏数据;
获取所述第一应用程序的应用界面对应的音频数据;
向第二电子设备发送所述录屏数据和所述音频数据。
应理解的是,上述实现方式仅为应用程序分享的示例,并不因此限制应用程序分享的实现方式,任何可实现应用程序分享的实现方式都落入本发明的保护范围内。
在本实施例中,第二电子设备在获取到第一应用程序的应用界面和音频数据后,可显示所述第一应用程序的应用界面,并播放第一应用程序的音频。 进一步地,第一应用程序在第二电子设备的运行状态不会受第一应用程序在第一电子设备的运行状态影响。
步骤102、根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态。
其中,所述目标音频输出端包括以下至少一项:所述第一电子设备安装的音频输出装置;所述第一电子设备连接的音频输出设备;所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频。
需要说明的是,所述第一电子设备连接的音频输出设备不包括第二电子设备。也就是说,在本实施例中,第一电子设备连接的音频输出设备与第二电子设备为两个独立的设备。
具体实现时,音频播放状态具体可表现为关闭状态或开启状态。为方便理解音频播放状态对音频处理的影响,以下以未进行应用程序分享的电子设备的第三应用程序进行示例说明。
在第一电子设备的第三应用程序的音频播放状态为关闭状态的情况下,目标音频输出端不会输出第三应用程序的音频,即使第三应用程序的音量大于零。
在第一电子设备的第三应用程序的音频播放状态为开启状态的情况下,目标音频输出端允许输出第三应用程序的音频,但应理解的是,这并不意味着目标音频输出端一定会输出第三应用程序的音频。具体地,在第三应用程序的音量为零,即第三应用程序处于静音状态时,目标音频输出端不会输出第三应用程序的音频;在第三应用程序的音量大于零,即第三应用程序处于非静音状态的情况下,目标音频输出端会输出第三应用程序的音频。
在本实施例中,第一电子设备可以设置目标控件,用户可以通过触控目标控件触发第一电子设备切换应用程序的音频播放状态。进一步地,目标控件可以包括第一显示状态和第二显示状态,其中,所述第一显示状态表示音频播放状态为开启状态,所述第一显示状态表示音频播放状态为关闭状态。
具体实现时,第一实现方式中,所述目标控件可以与第一电子设备对应;第二实现方式中,所述目标控件可以与应用程序对应。
在第一实现方式中,对于第一电子设备中的全部应用程序,任一应用程 序的音频播放状态都可以通过一个目标控件控制。在此实现方式中,可选的,第一电子设备可以通过以下方式控制任一应用程序的音频播放状态:
在接收到针对所述目标控件的第一输入的情况下,显示所述第一电子设备中N个应用程序的标识信息,所述N个应用程序的标识信息可改变,N为正整数;
在接收到针对目标标识信息的第二输入的情况下,将所述目标标识信息对应的应用程序确定为第四应用程序;
在接收到针对所述目标控件的第三输入的情况下,切换所述第四应用程序的音频播放状态。
具体地,若在接收到所述第三输入之前,所述第四应用程序的播放状态为关闭状态,则将所述第四应用程序的音频播放状态切换为播放状态;反之切换为关闭状态。
在第二实现方式中,一个目标控件可以对应一个或多个应用程序。
在一个目标控件对应至少两个应用程序的情况下,通过该目标控件控制所述至少两个应用程序中的任一应用程序的音频播放状态的控制方式可参与第一实现方式的实现,此处不再赘述。
在一个目标控件对应一个应用程序的情况下,若用户想改变某应用程序的音频播放状态,则可以通过触控该应用程序对应的目标控件触发电子设备切换该应用程序的音频播放状态。在某些实施方式中,可选的,第一电子设备可以仅显示分享应用程序,即第一应用程序的目标控件。
在实际应用中,目标控件的显示位置、显示形状和显示大小可根据实际需求设置,本发明实施例对此不作限定。
对于第二实现方式中一个目标控件对应一个应用程序的情况,可选的,某应用程序的目标控件可以设置在后台应用浏览界面中该应用程序的应用界面上。为方便理解,请参阅图2a和图2b。
如图2a和图2b所示,在后台应用浏览界面20中包括应用程序1、应用程序2、应用程序3的应用界面,应用程序2的应用界面的右上角设置有目标控件21。
在图2a中,目标控件21处于第一显示状态,表示应用程序2的音频播 放状态处于开启状态;在图2b中,目标控件21处于第二显示状态,表示应用程序2的音频播放状态处于关闭状态。
考虑到分享的应用程序,即第一应用程序可在第二电子设备正常运行,可选的,可以将第一应用程序的音频播放状态默认设置为关闭状态,将非分享应用程序,如第二应用程序的音频播放状态默认设置为开启状态,即优先控制目标输出端输出非分享应用程序的音频。当然,应理解的是,用户可以通过目标控件切换分享应用程序和非分享应用程序的音频播放状态。
本实施例的音频处理方法,第一电子设备在将第一应用程序分享给第二电子设备后,可以根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态。本发明实施例可以保证所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频,从而相比于现有技术,可以提高音频输出效果。
在本发明实施例中,可选的,所述根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态,包括以下至少一项:
在所述第一应用程序在所述第一电子设备的音频播放状态为关闭状态的情况下,禁止所述目标音频输出端输出所述第一电子设备的音频;
在所述第一应用程序在所述第一电子设备的音频播放状态为开启状态的情况下,若所述第一电子设备运行的目标应用程序中还包括具有音频播放功能的第二应用程序,则根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态;
其中,所述目标运行状态包括前台运行状态或后台运行状态。
以下对所述第一应用程序在所述第一电子设备的音频播放状态为不同表现形式的情况进行说明。
情况一、第一应用程序在所述第一电子设备的音频播放状态为关闭状态。
在情况一中,第一电子设备可以禁止所述目标音频输出端输出所述第一电子设备的音频,即不会通过所述目标音频输出端输出所述第一电子设备的音频。
在情况一中,在第一电子设备还运行有具有音频播放功能的第二应用程 序时,第二应用程序的音频可以通过目标音频输出端输出。
情况二、第一应用程序在所述第一电子设备的音频播放状态为开启状态。
在情况二中,第一电子设备可以进一步检测所述第一电子设备运行的目标应用程序中是否还包括具有音频播放功能的第二应用程序。
在所述目标应用程序未包括所述第二应用程序的情况下,第一电子设备可以允许所述目标音频输出端输出所述第一电子设备的音频。进一步地,第一电子设备可以在所述第一应用程序在所述第一电子设备处于前台运行状态的情况下,才允许所述目标音频输出端输出所述第一应用程序的音频,否则可以禁止所述目标音频输出端输出所述第一应用程序的音频。
在所述目标应用程序包括所述第二应用程序的情况下,第一电子设备可以进一步根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态;其中,所述目标运行状态包括前台运行状态或后台运行状态。
由前述内容可知,本发明实施例中的目标音频输出端可以包括以下几种表现形式:表现方式一、目标音频输出端包括所述第一电子设备安装的音频输出装置或所述第一电子设备连接的音频输出设备。表现方式二、目标音频输出端包括所述第一电子设备安装的音频输出装置和所述第一电子设备连接的音频输出设备。
本发明实施例的音频处理方法旨在保证所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频。因此,对于目标音频输出端的不同表现方式,“根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态;其中,所述目标运行状态包括前台运行状态或后台运行状态”的具体实施方式可以不同,具体说明如下:
对于表现方式一的目标音频输出端。
可选的,所述根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态,包括以下至少一项:
在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态的情况下,允许所述目标音频输出端输出 所述第一应用程序的音频,禁止所述目标音频输出端输出所述第二应用程序的音频;
在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态的情况下,禁止所述目标音频输出端输出所述第一应用程序的音频,允许所述目标音频输出端输出所述第二应用程序的音频。
在本可选实施方式中,第一电子设备可以通过目标音频输出端输出处于前台运行状态的应用程序的音频,不会通过目标音频输出端输出处于后台运行状态的应用程序的音频,从而可以保证目标音频输出端在同一时刻仅输出一个应用程序的音频,进而保证音频输出效果。
对于表现方式二的目标音频输出端。
可选的,所述根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态,包括:
根据所述第一应用程序和所述第二应用程序的目标运行状态,以及所述音频输出装置和所述音频输出设备对应的应用程序的类型,控制所述目标音频输出端的工作状态。
具体实现时,应用程序的类型可以基于应用程序的目标运行状态进行划分,也就是说,处于前台运行状态的应用程序属于一种类型,处于后台运行状态的应用程序属于另一种类型。
在实际应用中,所述音频输出装置和所述音频输出设备对应的应用程序的类型可以根据实际需求灵活设置,且可调整。
可选的,所述根据所述第一应用程序和所述第二应用程序的目标运行状态,以及所述音频输出装置和所述音频输出设备对应的应用程序的类型,控制所述目标音频输出端的工作状态,包括以下至少一项:
在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第一应用程序的音频,允许所述第二音频输出端输出所述第二应用程序的音频;
在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第二应用程序的音频,允许所述第二音频输出端输出所述第一应用程序的音频;
其中,所述第一音频输出端为所述音频输出装置和所述音频输出设备中的一个,所述第二音频输出端为所述音频输出装置和所述音频输出设备中的另一个。
在本可选实施方式中,第一电子设备的目标音频输出端包括两个类型:自身的音频输出端,即音频输出装置,以及独立于第一电子设备之外的音频输出端,即音频输出设备。另外,第一电子设备还可以设置不同类别的音频输出端对应的应用程序的类型,其中,一个类别的音频输出端对应一个类型的应用程序,且不同类别的音频输出端对应的应用程序的类型不同。示例性的,音频输出装置可以与处于前台运行状态的应用程序对应,音频输出装置可以与处于后台运行状态的应用程序对应。
具体实现时,第一电子设备在通过某类型的音频输出端输出音频时,可以通过该类型的音频输出端对应的应用程序的类型确定该类型的音频输出端对应的具体应用程序。示例性的,假设音频输出装置与处于后台运行状态的应用程序对应,音频输出装置与处于前台运行状态的应用程序对应,第一应用程序处于后台运行状态,第二应用程序处于前台运行状态,在此场景中,音频输出装置对应第一应用程序,第一应用程序的音频会从音频输出装置输出,不会从音频输出设备输出;音频输出装置与第二应用程序对应,第一应用程序的音频会从音频输出设备输出,不会从音频输出装置输出。
这样,可以保证目标音频输出端在同一时刻仅输出一个应用程序的音频,进而保证音频输出效果。
需要说明的是,本发明实施例中介绍的多种可选的实施方式,在彼此不冲突的情况下可以相互结合实现,也可以单独实现,对此本发明实施例不作限定。
需要说明的是,本实施例作为与上述方法实施例对应的移动通信终端的 实施方式,因此,可以参见上述方法实施例中的相关说明,且可以达到相同的有益效果。为了避免重复说明,在此不再赘述。
为方便理解,示例说明如下:
如图3所示,音频处理方法可以包括以下步骤:
步骤301、当分享端和接收端建立连接之后,分享端把某个APP同步分享给接收端。
被分享的APP可以称为分享APP。
步骤302、分享端判断分享APP的音频播放状态是否处于关闭状态。
若为关闭状态,则执行步骤306;否则,执行步骤303。
可选的,分享APP的音频播放状态默认设置为关闭状态。
用户可通过近期应用(可以理解为后台应用)的浏览界面中设置分享APP的播放状态。如图2b,被分享的应用2的音频播放状态处于关闭状态,执行步骤306。点击“音量”按钮可进行状态切换,如图2a,被分享的应用2的音频播放状态转为开启状态,可执行步骤303。
步骤303、分享APP是否处于后台运行状态。
若是则执行步骤304,若否则执行步骤305。
可选的,在分享APP为不需要播放音频的应用的情况下,可以不执行步骤303。
步骤304、判断分享端前台运行的APP是否播放声音。
若是则步骤306,若否则执行步骤305。
步骤305、分享端正常播放分享APP的声音。
步骤306、分享端对分享APP实现静音处理,但声音数据仍会传输给接收端,分享端播放前台运行的APP的声音。
具体实现时,在将分享APP的声音调为静音时,可以通过触控音量减控件,或预设的手势控制等方式实现。
由上述内容可知,分享端把APP分享给接收端时,用户可选择是否在前台播放所分享的APP对应的声音资源,如果不选择分享播放,则该APP的声音资源只会分享给接收端,不会在分享端播放;如果用户选择该分享APP可在前台播放声音资源,则若该APP处于前台,分享端播放该APP对应的声音 资源,若该APP处于后台则判断分享端前台的应用是否有播放声音的操作,若有则将分享APP的声音置为静音状态,但仍能把音频数据传输给接收端,若当前应用没有播放声音操作,则默认分享APP的声音仍正常播放,可通过快捷方式对其设置静音。可见,在本发明实施例中,在分享APP时,用户能够自由的选择是否播放分享APP的声音,同时能够解决分享APP和本地APP同时需要播放声音的问题,能够很好地保证用户使用分享应用功能的体验。
另外,本发明实施例可以基于多音频输出端口实现声音分离独立播放,如连接了蓝牙音响,此时可以将音乐声源和游戏声源分离播放,使用手机播放游戏声音,音响播放音乐,避免了打游戏时对音乐和游戏声音的互相干扰;连接了蓝牙耳机,通过耳机听音乐时,通过声音分离,将消息、电话等通知声音置于手机提醒,避免了提示音对音乐的干扰,提升了用户听音乐的体验。
参见图4,图4是本发明实施例提供的电子设备的结构图之一。电子设备400为第一电子设备,如图4所示,电子设备400包括:
分享模块401,用于在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备;
控制模块402,用于根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态;
其中,所述目标音频输出端包括以下至少一项:所述第一电子设备安装的音频输出装置;所述第一电子设备连接的音频输出设备;所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频。
可选的,所述控制模块402,包括以下至少一项:
第一控制子模块,用于在所述第一应用程序在所述第一电子设备的音频播放状态为关闭状态的情况下,禁止所述目标音频输出端输出所述第一电子设备的音频;
第二控制子模块,用于在所述第一应用程序在所述第一电子设备的音频播放状态为开启状态的情况下,若所述第一电子设备运行的目标应用程序中还包括具有音频播放功能的第二应用程序,则根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态;
其中,所述目标运行状态包括前台运行状态或后台运行状态。
可选的,在所述目标音频输出端为所述音频输出装置或所述音频输出设备的情况下,所述第二控制子模块具体用于以下至少一项:
在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态的情况下,允许所述目标音频输出端输出所述第一应用程序的音频,禁止所述目标音频输出端输出所述第二应用程序的音频;
在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态的情况下,禁止所述目标音频输出端输出所述第一应用程序的音频,允许所述目标音频输出端输出所述第二应用程序的音频。
可选的,在所述目标音频输出端包括所述音频输出装置和所述音频输出设备,所述第二控制子模块具体用于:
根据所述第一应用程序和所述第二应用程序的目标运行状态,以及所述音频输出装置和所述音频输出设备对应的应用程序的类型,控制所述目标音频输出端的工作状态。
可选的,所述第二控制子模块,包括以下至少一项:
第一控制单元,用于在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第一应用程序的音频,允许所述第二音频输出端输出所述第二应用程序的音频;
第二控制单元,用于在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第二应用程序的音频,允许所述第二音频输出端输出所述第一应用程序的音频;
其中,所述第一音频输出端为所述音频输出装置和所述音频输出设备中的一个,所述第二音频输出端为所述音频输出装置和所述音频输出设备中的 另一个。
电子设备400能够实现本发明方法实施例中的各个过程,以及达到相同的有益效果,为避免重复,这里不再赘述。
请参考图5,图5是本发明实施例提供的电子设备的结构图之二,该电子设备可以为实现本发明各个实施例的一种电子设备的硬件结构示意图。如图5所示,电子设备500包括但不限于:射频单元501、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、处理器510、以及电源511等部件。本领域技术人员可以理解,图5中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。
其中,射频单元501,用于:
在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备;
处理器510,用于:
根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态;
其中,所述目标音频输出端包括以下至少一项:所述第一电子设备安装的音频输出装置;所述第一电子设备连接的音频输出设备;所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频。
可选的,处理器510,还用于以下至少一项:
在所述第一应用程序在所述第一电子设备的音频播放状态为关闭状态的情况下,禁止所述目标音频输出端输出所述第一电子设备的音频;
在所述第一应用程序在所述第一电子设备的音频播放状态为开启状态的情况下,若所述第一电子设备运行的目标应用程序中还包括具有音频播放功能的第二应用程序,则根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态;
其中,所述目标运行状态包括前台运行状态或后台运行状态。
可选的,在所述目标音频输出端为所述音频输出装置或所述音频输出设备的情况下,处理器510,还用于以下至少一项:
在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态的情况下,允许所述目标音频输出端输出所述第一应用程序的音频,禁止所述目标音频输出端输出所述第二应用程序的音频;
在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态的情况下,禁止所述目标音频输出端输出所述第一应用程序的音频,允许所述目标音频输出端输出所述第二应用程序的音频。
可选的,在所述目标音频输出端包括所述音频输出装置和所述音频输出设备,处理器510,还用于:
根据所述第一应用程序和所述第二应用程序的目标运行状态,以及所述音频输出装置和所述音频输出设备对应的应用程序的类型,控制所述目标音频输出端的工作状态。
可选的,处理器510,还用于以下至少一项:
在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第一应用程序的音频,允许所述第二音频输出端输出所述第二应用程序的音频;
在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第二应用程序的音频,允许所述第二音频输出端输出所述第一应用程序的音频;
其中,所述第一音频输出端为所述音频输出装置和所述音频输出设备中的一个,所述第二音频输出端为所述音频输出装置和所述音频输出设备中的另一个。
需要说明的是,本实施例中上述电子设备500可以实现本发明实施例中方法实施例中的各个过程,以及达到相同的有益效果,为避免重复,此处不再赘述。
应理解的是,本发明实施例中,射频单元501可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器510处理;另外,将上行的数据发送给基站。通常,射频单元501包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元501还可以通过无线通信系统与网络和其他设备通信。
电子设备通过网络模块502为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。
音频输出单元503可以将射频单元501或网络模块502接收的或者在存储器509中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元503还可以提供与电子设备500执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元503包括扬声器、蜂鸣器以及受话器等。
输入单元504用于接收音频或视频信号。输入单元504可以包括图形处理器(Graphics Processing Unit,GPU)5041和麦克风5042,图形处理器5041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元506上。经图形处理器5041处理后的图像帧可以存储在存储器509(或其它存储介质)中或者经由射频单元501或网络模块502进行发送。麦克风5042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元501发送到移动通信基站的格式输出。
电子设备500还包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板5061的亮度,接近传感器可在电子设备500移动到耳边时,关闭显示面板5061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大 小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器505还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。
显示单元506用于显示由用户输入的信息或提供给用户的信息。显示单元506可包括显示面板5061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板5061。
用户输入单元507可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元507包括触控面板5071以及其他输入设备5072。触控面板5071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板5071上或在触控面板5071附近的操作)。触控面板5071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器510,接收处理器510发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板5071。除了触控面板5071,用户输入单元507还可以包括其他输入设备5072。具体地,其他输入设备5072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
进一步的,触控面板5071可覆盖在显示面板5061上,当触控面板5071检测到在其上或附近的触摸操作后,传送给处理器510以确定触摸事件的类型,随后处理器510根据触摸事件的类型在显示面板5061上提供相应的视觉输出。虽然在图5中,触控面板5071与显示面板5061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板5071与显示面板5061集成而实现电子设备的输入和输出功能,具体此处不做限定。
接口单元508为外部装置与电子设备500连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元508可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备500内的一个或多个元件或者可以用于在电子设备500和外部装置之间传输数据。
存储器509可用于存储软件程序以及各种数据。存储器509可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器509可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器510是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器509内的软件程序和/或模块,以及调用存储在存储器509内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器510可包括一个或多个处理单元;优选的,处理器510可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器510中。
电子设备500还可以包括给各个部件供电的电源511(比如电池),优选的,电源511可以通过电源管理系统与处理器510逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
另外,电子设备500包括一些未示出的功能模块,在此不再赘述。
优选的,本发明实施例还提供一种电子设备,包括处理器510,存储器509,存储在存储器509上并可在所述处理器510上运行的计算机程序,该计算机程序被处理器510执行时实现上述音频处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上 存储有计算机程序,该计算机程序被处理器执行时实现上述音频处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。

Claims (16)

  1. 一种播放方法,应用于第一电子设备,所述方法包括:
    在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备;
    根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态;
    其中,所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频;所述目标音频输出端包括以下至少一项:所述第一电子设备安装的音频输出装置、所述第一电子设备连接的音频输出设备。
  2. 根据权利要求1所述的方法,其中,所述根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态,包括以下至少一项:
    在所述第一应用程序在所述第一电子设备的音频播放状态为关闭状态的情况下,禁止所述目标音频输出端输出所述第一电子设备的音频;
    在所述第一应用程序在所述第一电子设备的音频播放状态为开启状态的情况下,若所述第一电子设备运行的目标应用程序中还包括具有音频播放功能的第二应用程序,则根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态;
    其中,所述目标运行状态包括前台运行状态或后台运行状态。
  3. 根据权利要求2所述的方法,其中,在所述目标音频输出端为所述第一电子设备安装的音频输出装置或所述第一电子设备连接的音频输出设备的情况下,所述根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态,包括以下至少一项:
    在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态的情况下,允许所述目标音频输出端输出所述第一应用程序的音频,禁止所述目标音频输出端输出所述第二应用程序的音频;
    在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程 序的目标运行状态为前台运行状态的情况下,禁止所述目标音频输出端输出所述第一应用程序的音频,允许所述目标音频输出端输出所述第二应用程序的音频。
  4. 根据权利要求2所述的方法,其中,在所述目标音频输出端包括所述第一电子设备安装的音频输出装置和所述第一电子设备连接的音频输出设备的情况下,所述根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态,包括:
    根据所述第一应用程序和所述第二应用程序的目标运行状态,以及所述音频输出装置和所述音频输出设备对应的应用程序的类型,控制所述目标音频输出端的工作状态。
  5. 根据权利要求4所述的方法,其中,所述根据所述第一应用程序和所述第二应用程序的目标运行状态,以及所述音频输出装置和所述音频输出设备对应的应用程序的类型,控制所述目标音频输出端的工作状态,包括以下至少一项:
    在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第一应用程序的音频,允许所述第二音频输出端输出所述第二应用程序的音频;
    在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第二应用程序的音频,允许所述第二音频输出端输出所述第一应用程序的音频;
    其中,所述第一音频输出端为所述音频输出装置和所述音频输出设备中的一个,所述第二音频输出端为所述音频输出装置和所述音频输出设备中的另一个。
  6. 根据权利要求1所述的方法,其中,所述在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界 面和音频数据分享给所述第二电子设备,包括:
    在所述第一电子设备和第二电子设备建立连接,且所述第一电子设备选择向第二电子设备分享第一应用程序的情况下,在所述第一电子设备的虚拟屏幕中显示所述第一应用程序的应用界面;
    对虚拟屏幕进行录屏,得到录屏数据;
    获取所述第一应用程序的应用界面对应的音频数据;
    向第二电子设备发送所述录屏数据和所述音频数据。
  7. 一种电子设备,所述电子设备为第一电子设备,所述电子设备包括:
    分享模块,用于在所述第一电子设备和第二电子设备建立连接的情况下,将所述第一电子设备的第一应用程序的应用界面和音频数据分享给所述第二电子设备;
    控制模块,用于根据所述第一应用程序在所述第一电子设备的音频播放状态,控制目标音频输出端的工作状态;
    其中,所述目标音频输出端中的每个音频输出端在同一时刻至多允许输出一个应用程序的音频;所述目标音频输出端包括以下至少一项:所述第一电子设备安装的音频输出装置、所述第一电子设备连接的音频输出设备。
  8. 根据权利要求7所述的电子设备,其中,所述控制模块,包括以下至少一项:
    第一控制子模块,用于在所述第一应用程序在所述第一电子设备的音频播放状态为关闭状态的情况下,禁止所述目标音频输出端输出所述第一电子设备的音频;
    第二控制子模块,用于在所述第一应用程序在所述第一电子设备的音频播放状态为开启状态的情况下,若所述第一电子设备运行的目标应用程序中还包括具有音频播放功能的第二应用程序,则根据所述第一应用程序和所述第二应用程序的目标运行状态,控制所述目标音频输出端的工作状态;
    其中,所述目标运行状态包括前台运行状态或后台运行状态。
  9. 根据权利要求8所述的电子设备,其中,在所述目标音频输出端为所述第一电子设备安装的音频输出装置或所述第一电子设备连接的音频输出设备的情况下,所述第二控制子模块具体用于以下至少一项:
    在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态的情况下,允许所述目标音频输出端输出所述第一应用程序的音频,禁止所述目标音频输出端输出所述第二应用程序的音频;
    在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态的情况下,禁止所述目标音频输出端输出所述第一应用程序的音频,允许所述目标音频输出端输出所述第二应用程序的音频。
  10. 根据权利要求8所述的电子设备,其中,在所述目标音频输出端包括所述第一电子设备安装的音频输出装置和所述第一电子设备连接的音频输出设备的情况下,所述第二控制子模块具体用于:
    根据所述第一应用程序和所述第二应用程序的目标运行状态,以及所述音频输出装置和所述音频输出设备对应的应用程序的类型,控制所述目标音频输出端的工作状态。
  11. 根据权利要求10所述的电子设备,其中,所述第二控制子模块,包括以下至少一项:
    第一控制单元,用于在所述第一应用程序的目标运行状态为前台运行状态,所述第二应用程序的目标运行状态为后台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第一应用程序的音频,允许所述第二音频输出端输出所述第二应用程序的音频;
    第二控制单元,用于在所述第一应用程序的目标运行状态为后台运行状态,所述第二应用程序的目标运行状态为前台运行状态,且第一音频输出端与处于前台运行状态的应用程序对应,第二音频输出端与处于后台运行状态对应的情况下,允许所述第一音频输出端输出所述第二应用程序的音频,允许所述第二音频输出端输出所述第一应用程序的音频;
    其中,所述第一音频输出端为所述音频输出装置和所述音频输出设备中的一个,所述第二音频输出端为所述音频输出装置和所述音频输出设备中的另一个。
  12. 根据权利要求7所述的电子设备,其中,所述分享模块还用于:
    在所述第一电子设备和第二电子设备建立连接,且所述第一电子设备选择向第二电子设备分享第一应用程序的情况下,在所述第一电子设备的虚拟屏幕中显示所述第一应用程序的应用界面;
    对虚拟屏幕进行录屏,得到录屏数据;
    获取所述第一应用程序的应用界面对应的音频数据;
    向第二电子设备发送所述录屏数据和所述音频数据。
  13. 一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至6中任一项所述的播放方法的步骤。
  14. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6中任一项所述的播放方法的步骤。
  15. 一种计算机程序产品,所述程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1-6任一项所述的播放方法。
  16. 一种电子设备,所述电子设备被配置用于执行如权利要求1-6任一项所述的播放方法。
PCT/CN2020/139910 2019-12-31 2020-12-28 播放方法及电子设备 WO2021136141A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911420655.3 2019-12-31
CN201911420655.3A CN111078186A (zh) 2019-12-31 2019-12-31 一种播放方法及电子设备

Publications (1)

Publication Number Publication Date
WO2021136141A1 true WO2021136141A1 (zh) 2021-07-08

Family

ID=70321311

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/139910 WO2021136141A1 (zh) 2019-12-31 2020-12-28 播放方法及电子设备

Country Status (2)

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

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078186A (zh) * 2019-12-31 2020-04-28 维沃移动通信有限公司 一种播放方法及电子设备
CN111831190B (zh) * 2020-07-10 2022-05-03 维沃移动通信有限公司 音乐应用程序控制方法、装置及电子设备
CN113076082B (zh) * 2021-06-03 2021-09-03 杭州星犀科技有限公司 音频源处理的方法、系统、电子装置和存储介质
CN115268821B (zh) * 2022-06-22 2023-07-11 阿波罗智联(北京)科技有限公司 音频播放方法及装置、设备和介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107229448A (zh) * 2017-06-30 2017-10-03 联想(北京)有限公司 音频播放方法及电子设备
CN107241640A (zh) * 2017-06-26 2017-10-10 中广热点云科技有限公司 一种移动设备和电视设备同步播放的方法
CN107835979A (zh) * 2015-06-29 2018-03-23 微软技术许可有限责任公司 智能音频路由管理
CN108781236A (zh) * 2017-06-16 2018-11-09 华为技术有限公司 音频播放方法及电子设备
CN108958684A (zh) * 2018-06-22 2018-12-07 维沃移动通信有限公司 投屏方法及移动终端
US20190341038A1 (en) * 2018-05-07 2019-11-07 Spotify Ab Voice recognition system for use with a personal media streaming appliance
CN111078186A (zh) * 2019-12-31 2020-04-28 维沃移动通信有限公司 一种播放方法及电子设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079986A (zh) * 2014-06-05 2014-10-01 上海聚力传媒技术有限公司 一种用于实现设备间播放视频的方法与设备
CN107783833B (zh) * 2016-08-25 2020-04-28 华为技术有限公司 一种终端后台应用程序的管理方法及装置
CN108509176B (zh) * 2018-04-10 2021-06-08 Oppo广东移动通信有限公司 一种播放音频数据的方法、装置、存储介质及智能终端

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107835979A (zh) * 2015-06-29 2018-03-23 微软技术许可有限责任公司 智能音频路由管理
CN108781236A (zh) * 2017-06-16 2018-11-09 华为技术有限公司 音频播放方法及电子设备
CN107241640A (zh) * 2017-06-26 2017-10-10 中广热点云科技有限公司 一种移动设备和电视设备同步播放的方法
CN107229448A (zh) * 2017-06-30 2017-10-03 联想(北京)有限公司 音频播放方法及电子设备
US20190341038A1 (en) * 2018-05-07 2019-11-07 Spotify Ab Voice recognition system for use with a personal media streaming appliance
CN108958684A (zh) * 2018-06-22 2018-12-07 维沃移动通信有限公司 投屏方法及移动终端
CN111078186A (zh) * 2019-12-31 2020-04-28 维沃移动通信有限公司 一种播放方法及电子设备

Also Published As

Publication number Publication date
CN111078186A (zh) 2020-04-28

Similar Documents

Publication Publication Date Title
WO2021098678A1 (zh) 投屏控制方法及电子设备
US11496835B2 (en) Speaker control method and mobile terminal
WO2021204045A1 (zh) 音频的控制方法及电子设备
WO2021136141A1 (zh) 播放方法及电子设备
WO2020042785A1 (zh) 应用显示方法和移动终端
WO2021109907A1 (zh) 应用分享方法、第一电子设备及计算机可读存储介质
WO2020233285A1 (zh) 消息显示方法及终端设备
EP3691235A1 (en) Display method and mobile terminal
KR102554191B1 (ko) 정보 처리 방법 및 단말
WO2021063249A1 (zh) 电子设备的控制方法及电子设备
WO2021104230A1 (zh) 同步方法及电子设备
WO2020186964A1 (zh) 音频信号的输出方法及终端设备
WO2021109925A1 (zh) 应用分享方法、电子设备及计算机可读存储介质
WO2021098705A1 (zh) 显示方法及电子设备
WO2021004317A1 (zh) 发射天线的切换方法及终端设备
WO2021129529A1 (zh) 设备切换方法及相关设备
WO2020042892A1 (zh) 通话模式切换方法及终端设备
WO2021083256A1 (zh) 触控响应方法及电子设备
WO2021037074A1 (zh) 音频输出方法及电子设备
WO2021109959A1 (zh) 应用程序分享方法及电子设备
WO2021104251A1 (zh) 控制方法及第一电子设备
WO2019223569A1 (zh) 信息处理方法及移动终端
WO2021129835A1 (zh) 音量控制方法、设备及计算机可读存储介质
CN111147919A (zh) 一种播放调整方法、电子设备及计算机可读存储介质
WO2021068885A1 (zh) 控制方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20910862

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20910862

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/01/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20910862

Country of ref document: EP

Kind code of ref document: A1