CN111586240A - Method and apparatus for playing audio - Google Patents

Method and apparatus for playing audio Download PDF

Info

Publication number
CN111586240A
CN111586240A CN202010448200.9A CN202010448200A CN111586240A CN 111586240 A CN111586240 A CN 111586240A CN 202010448200 A CN202010448200 A CN 202010448200A CN 111586240 A CN111586240 A CN 111586240A
Authority
CN
China
Prior art keywords
audio
sharing
application
sharing function
function
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
CN202010448200.9A
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.)
Samsung Electronics China R&D Center
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics China R&D Center
Samsung Electronics 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 Samsung Electronics China R&D Center, Samsung Electronics Co Ltd filed Critical Samsung Electronics China R&D Center
Priority to CN202010448200.9A priority Critical patent/CN111586240A/en
Publication of CN111586240A publication Critical patent/CN111586240A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
    • 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/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

Embodiments of the present disclosure disclose methods and apparatus for playing audio. One embodiment of the method comprises: in response to receiving a play request for a target audio, determining whether an audio sharing function is started; in response to determining that the audio sharing function is started, determining whether an application to which the target audio belongs is a sharing application predetermined for the audio sharing function; and in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function, selecting one set of earphones corresponding to the audio sharing function from two sets of earphones connected in advance to play the target audio. The embodiment is beneficial to realizing synchronous playing of different audios, and the diversity of audio playing is improved.

Description

Method and apparatus for playing audio
Technical Field
Embodiments of the present disclosure relate to the field of communications technologies, and in particular, to a method and an apparatus for playing audio.
Background
In practice, audio source devices such as mobile phones and tablet computers can output audio through earphones.
Currently, an audio source device may typically be connected to a pair of headphones (including both left and right headphones). While for audio source devices with dual audio technology, two pairs of headphones may also be connected.
In the prior art, whether an audio source device is connected to one pair of headphones or to two pairs of headphones, the connected headphones all output the same audio.
Disclosure of Invention
Embodiments of the present disclosure propose methods and apparatuses for playing audio.
In a first aspect, an embodiment of the present disclosure provides a method for playing audio, the method including: in response to receiving a play request for a target audio, determining whether an audio sharing function is started; in response to determining that the audio sharing function is started, determining whether an application to which the target audio belongs is a sharing application predetermined for the audio sharing function; and in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function, selecting one set of earphones corresponding to the audio sharing function from two sets of earphones connected in advance to play the target audio.
In some embodiments, the sharing application corresponding to the audio sharing function is determined by: determining applications with an audio playing function from pre-installed applications as candidate applications in response to receiving a sharing application setting request sent by a user; presenting the determined candidate application on an audio sharing interface preset for an audio sharing function; in response to the fact that the sharing operation of the user for the candidate application presented on the audio sharing interface is detected, the candidate application corresponding to the sharing operation is determined as the sharing application.
In some embodiments, presenting the determined candidate applications on an audio sharing interface predetermined for an audio sharing function comprises: determining the number of times of executing sharing operation on the candidate application by the user in a historical time period; and presenting the determined candidate application on an audio sharing interface predetermined for the audio sharing function according to the sequence of the number of the corresponding sharing operations from large to small.
In some embodiments, the method further comprises: and generating a control window for controlling the audio contained in the sharing application on the audio sharing interface.
In some embodiments, the method further comprises: and in response to determining that the audio sharing function is not started, playing the target audio by using the two groups of earphones which are connected in advance.
In some embodiments, the method further comprises: and in response to determining that the application to which the target audio belongs is not a sharing application predetermined for the audio sharing function, selecting one set of headphones, which does not correspond to the audio sharing function, from the two sets of headphones connected in advance to play the target audio.
In some embodiments, the method further comprises: in response to receiving a volume adjustment request for the played target audio, adjusting a volume of a set of headphones corresponding to the audio sharing function for playing the target audio.
In a second aspect, an embodiment of the present disclosure provides an apparatus for playing audio, the apparatus including: a first determination unit configured to determine whether an audio sharing function has been turned on in response to receiving a play request for a target audio; a second determination unit configured to determine, in response to determining that the audio sharing function has been turned on, whether an application to which the target audio belongs is a sharing application predetermined for the audio sharing function; the first selection unit is configured to select one set of earphones corresponding to the audio sharing function from two sets of earphones which are connected in advance to play the target audio in response to the fact that the application to which the target audio belongs is determined to be a sharing application which is determined in advance for the audio sharing function.
In a third aspect, an embodiment of the present disclosure provides a terminal device, including: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method of any of the embodiments of the method for playing audio described above.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, which when executed by a processor, implements the method of any of the above-described methods for playing audio.
According to the method and the device for playing the audio, whether the audio sharing function is started or not is determined in response to the received playing request for the target audio, then whether the application to which the target audio belongs is the sharing application predetermined for the audio sharing function is determined in response to the determination that the audio sharing function is started, and finally, in response to the determination that the application to which the target audio belongs is the sharing application predetermined for the audio sharing function, one set of earphones corresponding to the audio sharing function is selected from two sets of earphones connected in advance to play the target audio, so that the target audio belonging to the sharing application corresponding to the audio sharing function can be allocated to the earphones corresponding to the audio sharing function to be played under the condition that the audio sharing function is started, and the audio not belonging to the sharing application can be allocated to the earphones not corresponding to the audio sharing function to be played, and then can realize utilizing two sets of earphones of connection to broadcast different audios, help realizing the synchronous broadcast of different audios, improved the variety that the audio frequency broadcasts.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for playing audio according to the present disclosure;
FIG. 3 is an audio sharing interface presenting candidate applications according to embodiments of the present disclosure;
fig. 4 is an audio sharing interface presenting a control window corresponding to a sharing application according to an embodiment of the disclosure;
FIG. 5 is a schematic diagram of one application scenario of a method for playing audio in accordance with an embodiment of the present disclosure;
FIG. 6 is a flow diagram of yet another embodiment of a method for playing audio according to the present disclosure;
FIG. 7 is a schematic block diagram illustrating one embodiment of an apparatus for playing audio according to the present disclosure;
FIG. 8 is a block diagram of a computer system suitable for use with a terminal device implementing an embodiment of the disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the disclosed method for playing audio or apparatus for playing audio may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, networks 104, 105, a server 106, and a headset 107. Network 104 is the medium used to provide communication links between terminal devices 101, 102, 103 and server 106. The network 105 serves to provide a medium for communication links between the terminal devices 101, 102, 103 and the headset 107. The networks 104, 105 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may use the terminal devices 101, 102, 103 to interact with the server 106 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various client applications installed thereon, such as an audio processing application, a telephone application, an audio playing application, a web browser application, an instant messaging tool, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they may be various electronic devices having an Audio playing function, including but not limited to smart phones, tablet computers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 106 may be a server providing various services, such as a background server providing support for audio playback type applications installed on the terminal devices 101, 102, 103. The background server may analyze and process the received data such as the audio playing request, and feed back a processing result (e.g., an audio file) to the terminal device.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
The terminal devices 101, 102, 103 may send audio files to the headset 107 over the network 105 to play audio over the headset 107. Specifically, the earphone 107 may be various earphones for playing audio, such as a wired earphone, a wireless bluetooth earphone, and the like.
It should be noted that the method for playing audio provided by the embodiment of the present disclosure is generally performed by the terminal devices 101, 102, 103, and accordingly, the apparatus for playing audio is generally disposed in the devices 101, 102, 103.
It should be understood that the number of terminal devices, networks, servers and headsets in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, servers, and headsets, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for playing audio in accordance with the present disclosure is shown. The method for playing audio comprises the following steps:
step 201, in response to receiving a play request for a target audio, determining whether an audio sharing function is already started.
In this embodiment, an execution subject of the method for playing audio (for example, the terminal devices 101, 102, 103 shown in fig. 1) may determine whether the audio sharing function is turned on in response to receiving a playing request for the target audio through a wired connection manner or a wireless connection manner. Wherein the target audio may be audio to be played. Specifically, the target audio may be various audio, such as music, voice, incoming call ringtone, and the like.
Specifically, the execution agent may receive a play request for the target audio from a remote location or a local location. As an example, the execution body may receive a play request for a song "thanks" (i.e., target audio) from a user; alternatively, the execution body may obtain a local ring tone (i.e., target audio) in response to receiving a call request sent by another user terminal, and generate a play request for the ring tone.
In this embodiment, the audio sharing function may be used to implement audio sharing. The audio sharing is used for enabling the two groups of earphones which are connected with the execution main body in advance to share two types of audio. One type of audio is the audio which has an association relation with the audio sharing function; another type of audio is audio that does not have an association with the audio sharing function. Specifically, a user or a technician may pre-establish a corresponding relationship between one of the two sets of earphones and the audio sharing function, and then the one set of earphones corresponding to the audio sharing function may be used to share the audio associated with the audio sharing function; the set of earphones which do not have a corresponding relationship with the audio sharing function can be used for sharing the audio which does not have an associated relationship with the audio sharing function. Furthermore, different types of audio can be played by different earphones pre-connected with the execution main body, and the audio playing processes of the different earphones are usually not interfered with each other, so that the synchronous playing of the different types of audio is facilitated.
It should be noted that, the manner of establishing the association relationship between the audio and the audio sharing function in this embodiment is described later, and is not described herein again.
In this embodiment, one earphone may be used as a set of earphones, and then the two sets of earphones pre-connected to the execution main body may be two earphones (i.e. a pair of earphones including a left earphone and a right earphone), or a pair of earphones may be used as a set of earphones, and then the two sets of earphones pre-connected to the execution main body may be two pairs of earphones. Specifically, when two sets of headphones are two headphones, a user or a technician can select any one of the left headphone and the right headphone as the headphone corresponding to the audio sharing function; when the two sets of headphones are two pairs of headphones, the user or technician can select any one pair of headphones from the two pairs of headphones as the headphones corresponding to the audio sharing function.
It can be understood that the audio sharing function of the embodiment is stored in the execution main body in the form of an application program, and the audio sharing function is started when the application program corresponding to the audio sharing function is run.
In practice, the audio sharing function may be started by a user, or may be automatically started by the execution main body after detecting the start condition. Specifically, the user may start the audio sharing function in various manners, for example, may click a button displayed on the display interface of the execution main body for starting the audio sharing function, input a voice instruction for starting the audio sharing function to the execution main body, and the like. The condition for starting the audio sharing function may be various conditions, for example, the current time may be a preset time (corresponding to a timing start); or the target audio corresponding to the received play request may be a preset type of audio (e.g., an incoming call ring tone type audio), and the like.
In response to determining that the audio sharing function is started, step 202 determines whether the application to which the target audio belongs is a sharing application predetermined for the audio sharing function.
In this embodiment, the execution main body may determine, in response to determining that the audio sharing function is already started, whether an application to which the target audio belongs is a sharing application predetermined for the audio sharing function.
In practice, various methods may be adopted to determine the sharing application for the audio sharing function, for example, when a technician develops an application program corresponding to the audio sharing function, the application suitable for the audio sharing function may be declared, and then the application suitable for the audio sharing function may be determined as the sharing application corresponding to the audio sharing function.
In some optional implementation manners of this embodiment, the sharing application corresponding to the audio sharing function may be determined through the following steps: determining applications with an audio playing function from pre-installed applications as candidate applications in response to receiving a sharing application setting request sent by a user; presenting the determined candidate application on an audio sharing interface preset for an audio sharing function; in response to the fact that the sharing operation of the user for the candidate application presented on the audio sharing interface is detected, the candidate application corresponding to the sharing operation is determined as the sharing application.
Here, the sharing application setting request is for requesting setting of the sharing application. Specifically, the user may send the sharing application setting request to the execution main body in various manners, for example, a button set for the sharing application may be clicked to send the sharing application setting request to the execution main body; or the user may send a sharing application setting request to the execution main body while starting the audio sharing function.
In this implementation manner, the execution main body may be pre-installed with an application having an audio playing function. Specifically, the application having the audio playing function may be various applications capable of outputting audio, and may be, for example, music playing software, video playing software, or the like.
After receiving the sharing application setting request, the execution main body can traverse the pre-installed applications, search the candidate applications with the audio playing function from the pre-installed applications, and present the searched candidate applications on the audio sharing interface preset for the audio sharing function. The audio sharing interface may be an interface preset by a technician for the audio sharing function for presenting candidate applications. In practice, the candidate application may be presented on the audio sharing interface in various forms, for example, may be presented on the audio sharing interface in the form of an icon, in the form of a name of the candidate application, and so on.
In particular, and by way of example, reference is made to FIG. 3, which illustrates an audio sharing interface for presenting candidate applications. Five candidate applications are presented on the audio sharing interface. The five candidate applications are respectively presented in the form of icons and names.
After the audio sharing interface including the candidate application is presented, the execution main body may detect a sharing operation of the user for the presented candidate application, and determine the candidate application corresponding to the sharing operation as the sharing application in response to the detection of the sharing operation. The sharing operation may be various operations executed on the candidate application presented on the audio sharing interface, for example, an operation of clicking a button corresponding to the candidate application may be performed.
Specifically, continuing with the above example, referring to fig. 3, each candidate application presented on the audio sharing interface of fig. 3 further corresponds to a "share" button, and the "share" button may be used for a user to click to perform a sharing operation for the candidate application. Furthermore, the execution main body may determine the candidate application corresponding to the "share" button clicked by the user as the share application.
In particular, an "add" button (e.g., a button corresponding to "+" in fig. 3) may also be included on the audio sharing interface, which may be used for a user to manually add a candidate application.
In this implementation manner, the execution main body may present the candidate applications on the audio sharing interface in various orders. As an example, the execution subject may present the candidate applications on the audio sharing interface according to an order of icon loading of the candidate applications. For example, the execution subject may present the candidate application with the icon loaded fast above the audio sharing interface and present the candidate application with the icon loaded slow below the audio sharing interface. As shown in fig. 3, the five candidate applications may be arranged according to an icon loading order, and specifically, the icon loading order of the five candidate applications may be that a is greater than B, B is greater than C, C is greater than D, and D is greater than E.
In some optional implementation manners of this embodiment, the execution main body may further determine the number of times that the user performs the sharing operation with respect to the candidate application in the historical time period. And then, presenting the determined candidate applications on an audio sharing interface predetermined for the audio sharing function according to the sequence of the corresponding sharing operation times from large to small.
The historical time period may be a time period (for example, may be the last week) which is a preset time length from the current time; or may be a time period starting from a historical time when the user first uses the audio sharing function and ending at a current time.
The method and the device have the advantages that the candidate applications with the large number of corresponding sharing operations are usually the applications frequently used by the user for audio sharing, the sharing application setting operation is performed on the applications frequently used by the user for audio sharing with high probability, the candidate applications are further arranged according to the number of the corresponding sharing operations, the candidate applications which are most likely to be subjected to the sharing application setting operation by the user can be firstly presented to the user, the situation that the user searches for a target to be operated after traversing all the candidate applications is avoided, and further the user experience is improved.
In some optional implementation manners of this embodiment, after determining the sharing application, the execution main body may further generate a control window for controlling an audio included in the sharing application on the audio sharing interface.
Here, the control window may include various buttons for controlling the audio included in the sharing application, for example, a button for controlling the playing and pausing of the audio of the sharing application, a button for adjusting the volume of the audio of the sharing application, a button for adjusting the sound effect of the audio of the sharing application, and the like may be included.
Specifically, as an example, please refer to fig. 4, which shows an audio sharing interface including a control window corresponding to the sharing application. Wherein, the sharing application is an A application. The audio shared is the song "thank" in the a application. The area selected by the dashed box in the figure is the control window for controlling the song "thank" in the a application.
According to the implementation mode, the control window is generated on the audio sharing interface, a user can conveniently and directly control the shared audio on the audio sharing interface without quitting the audio sharing interface and entering the sharing application, and then the shared audio is controlled on the interface of the sharing application, so that the steps of audio control are simplified, and the user experience is improved.
It should be noted that the determined correspondence between the sharing application and the audio sharing function may be characterized in various forms, for example, in the form of a correspondence table, or in the form of an application package of the sharing application containing an audio sharing identifier (for example, a package name of an application program for implementing the audio sharing function).
The embodiment establishes the association relationship between the audio and the audio sharing function through the application to which the audio belongs. Specifically, the user or the technician may pre-establish a corresponding relationship between the application and the audio sharing function, and the execution main body may determine the application having the corresponding relationship with the audio sharing function as the sharing application, where the audio included in the sharing application is the audio having the associated relationship with the audio sharing function.
Furthermore, in this embodiment, the execution main body may determine whether the target audio is an audio having an association relationship with the audio sharing function by determining whether the application to which the target audio belongs is a sharing application corresponding to the audio sharing function when the audio sharing function is turned on.
In some optional implementation manners of this embodiment, the execution main body may further play the target audio by using two sets of earphones that are connected in advance in response to determining that the audio sharing function is not turned on.
Through the implementation mode, whether a set of earphones is used for playing the target audio or not can be considered under the condition that the audio sharing function is started, and under the condition that the audio sharing function is not started, two sets of earphones are used for playing the target audio simultaneously, so that the two sets of earphones share the same audio. Furthermore, whether the same audio is played by using the two sets of earphones can be judged by judging whether the audio sharing function is started or not, so that the flexibility and the diversity of audio playing are improved.
Step 203, in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function, selecting one set of earphones corresponding to the audio sharing function from the two sets of earphones connected in advance to play the target audio.
In this embodiment, the execution main body may select one set of earphones corresponding to the audio sharing function from two sets of earphones connected in advance to play the target audio in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function. Therefore, the target audio which is associated with the audio sharing function can be played through the earphones which are associated with the audio sharing function correspondingly.
As an example, the execution main body is connected with a pair of earphones in advance, including a left earphone and a right earphone. The left earphone is an earphone which has a corresponding relation with the audio sharing function. Furthermore, the execution main body may output the target audio to the left headphone in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function (that is, the target audio and the audio sharing function have an association relationship), so as to play the target audio using the left headphone.
It can be understood that, through the audio sharing function, one of the two sets of earphones connected to the execution main body can play the target audio, while the other set of earphones is not affected by the target audio, and thus, the other set of earphones can be used for playing other audio.
As an example, in the process that a user a plays music a through a pair of earphones connected to a mobile phone, the mobile phone receives an incoming call of a user b, the mobile phone generates an incoming call ringtone playing request, a phone application to which the incoming ringtone belongs is a sharing application corresponding to an audio sharing function, and then the mobile phone can play the incoming ringtone through a left earphone corresponding to the audio sharing function, while a right earphone is not affected by the incoming ringtone and can continue to play music a.
In some optional implementation manners of this embodiment, the execution main body may further select, in response to determining that the application to which the target audio belongs is not a sharing application predetermined for the audio sharing function, one set of headphones that does not correspond to the audio sharing function from two sets of headphones connected in advance to play the target audio.
The implementation mode can take the audio sharing function as an identifier for playing the target audio by using one group of earphones, and specifically uses which group of earphones in the two groups of earphones to play the target audio, and determines whether the application to which the target audio belongs is the sharing application mode. Specifically, when the application to which the target audio belongs is a sharing application, the target audio is allocated to a group of earphones having a corresponding relationship with the audio sharing function; under the condition that the application to which the target audio belongs is not the sharing application, the target audio is shared with a group of earphones which do not have a corresponding relation with the audio sharing function, and the diversity of audio playing is improved.
With continued reference to fig. 5, fig. 5 is a schematic diagram of an application scenario of the method for playing audio according to the present embodiment. In the application scenario of fig. 5, the terminal device 501 may first determine whether the audio sharing function is turned on in response to receiving a play request 504 for the target audio 503 (e.g., song a) sent by the user 502. Then, the terminal device 501 may determine whether the application (for example, MM music) to which the target audio 503 belongs is a sharing application predetermined for the audio sharing function in response to determining that the audio sharing function has been turned on. Finally, in response to determining that the application to which the target audio 503 belongs is a sharing application predetermined for the audio sharing function, the terminal device 501 may select a left earphone 505 corresponding to the audio sharing function from the two earphones 505 and 506 (i.e., a pair of earphones) connected in advance to play the target audio 503, and specifically, the terminal device 501 may acquire the target audio 503 and send the target audio 503 to the left earphone 505, so as to play the target audio 503 through the left earphone 505.
According to the method provided by the embodiment of the disclosure, under the condition that the audio sharing function is started, the target audio belonging to the sharing application corresponding to the audio sharing function is distributed to the earphones corresponding to the audio sharing function for playing, and the audio not belonging to the sharing application can be distributed to the earphones not corresponding to the audio sharing function for playing, so that different audios can be played by using two groups of connected earphones, synchronous playing of different audios is facilitated, and diversity of audio playing is improved.
With further reference to fig. 6, a flow 600 of yet another embodiment of a method for playing audio is shown. The process 600 for playing an audio method includes the following steps:
step 601, in response to receiving a play request for a target audio, determining whether an audio sharing function is already started.
In this embodiment, an execution subject of the method for playing audio (for example, the terminal devices 101, 102, 103 shown in fig. 1) may determine whether the audio sharing function is turned on in response to receiving a playing request for the target audio through a wired connection manner or a wireless connection manner. Wherein the target audio may be audio to be played.
In this embodiment, the audio sharing function may be used to implement audio sharing. The audio sharing is used for enabling the two groups of earphones which are connected with the execution main body in advance to share two types of audio. One type of audio is the audio which has an association relation with the audio sharing function; another type of audio is audio that does not have an association with the audio sharing function. Specifically, a user or a technician may pre-establish a corresponding relationship between one of the two sets of earphones and the audio sharing function, and then the one set of earphones corresponding to the audio sharing function may be used to share the audio associated with the audio sharing function; the set of earphones which do not have a corresponding relationship with the audio sharing function can be used for sharing the audio which does not have an associated relationship with the audio sharing function.
In this embodiment, one earphone may be used as a set of earphones, and then the two sets of earphones connected in advance by the execution main body may be two earphones, or a pair of earphones may be used as a set of earphones, and then the two sets of earphones connected in advance by the execution main body may be two pairs of earphones.
Step 602, in response to determining that the audio sharing function is started, determining whether the application to which the target audio belongs is a sharing application predetermined for the audio sharing function.
In this embodiment, the execution main body may determine, in response to determining that the audio sharing function is already started, whether an application to which the target audio belongs is a sharing application predetermined for the audio sharing function.
Step 603, in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function, selecting one set of headphones corresponding to the audio sharing function from the two sets of headphones connected in advance to play the target audio.
In this embodiment, the execution main body may select one set of earphones corresponding to the audio sharing function from two sets of earphones connected in advance to play the target audio in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function. Therefore, the target audio which is associated with the audio sharing function can be played through the earphones which are associated with the audio sharing function correspondingly.
Step 601, step 602, and step 603 may be performed in a manner similar to that of step 201, step 202, and step 203 in the foregoing embodiment, respectively, and the above description for step 201, step 202, and step 203 also applies to step 601, step 602, and step 603, and is not repeated here.
In response to receiving the volume adjustment request for the played target audio, the volume of a set of earphones corresponding to the audio sharing function for playing the target audio is adjusted, step 604.
In this embodiment, in the process of playing the target audio by using the selected set of earphones corresponding to the audio sharing function, the execution main body may adjust the volume of the set of earphones corresponding to the audio sharing function for playing the target audio in response to receiving a volume adjustment request for the played target audio.
In this embodiment, the volume adjustment request may be a user initiated request. Specifically, the user may initiate an audio adjustment request for the played target audio by various methods, for example, the executing body may click the volume adjustment button in the control window described above to initiate an audio adjustment request for the played target audio; alternatively, the user may click a volume adjustment button on a user interaction interface included in the application to which the target audio belongs to initiate an audio adjustment request for the played target audio.
As can be seen from fig. 6, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for playing audio in the present embodiment highlights a step of adjusting the volume of the headphones corresponding to the audio sharing function for playing the target audio in response to receiving a volume adjustment request for the played target audio in the case of playing the target audio with the headphones corresponding to the audio sharing function. Therefore, the scheme described in this embodiment can only adjust the volume of the earphone (e.g., left earphone) playing the target audio when the audio sharing function is turned on, and can not adjust the volume of the earphone (e.g., right earphone) not playing the target audio, so that the independent adjustment of the earphone volume can be realized, and the pertinence of the earphone volume adjustment is improved.
With further reference to fig. 7, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of an apparatus for playing audio, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 7, the apparatus 700 for playing audio of the present embodiment includes: a first determination unit 701, a second determination unit 702, and a first selection unit 703. Wherein, the first determining unit 701 is configured to determine whether an audio sharing function has been turned on in response to receiving a play request for a target audio; the second determination unit 702 is configured to determine, in response to determining that the audio sharing function has been turned on, whether an application to which the target audio belongs is a sharing application predetermined for the audio sharing function; the first selection unit 703 is configured to, in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function, select one set of headphones corresponding to the audio sharing function from among two sets of headphones connected in advance to play the target audio.
In this embodiment, the first determining unit 501 of the apparatus 500 for playing audio may determine whether the audio sharing function is turned on in response to receiving a playing request for the target audio through a wired connection manner or a wireless connection manner. Wherein the target audio may be audio to be played.
In this embodiment, the audio sharing function may be used to implement audio sharing. The audio sharing is used to enable the two sets of headphones pre-connected with the device 500 to share two types of audio. One type of audio is the audio which has an association relation with the audio sharing function; another type of audio is audio that does not have an association with the audio sharing function. Specifically, a user or a technician may pre-establish a corresponding relationship between one of the two sets of earphones and the audio sharing function, and then the one set of earphones corresponding to the audio sharing function may be used to share the audio associated with the audio sharing function; the set of earphones which do not have a corresponding relationship with the audio sharing function can be used for sharing the audio which does not have an associated relationship with the audio sharing function.
In this embodiment, one earphone may be used as a set of earphones, or a pair of earphones may be used as a set of earphones.
In this embodiment, the second determining unit 502 may determine whether the application to which the target audio belongs is a sharing application predetermined for the audio sharing function in response to determining that the audio sharing function is turned on.
In this embodiment, the first selecting unit 503 may select, in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function, one set of headphones corresponding to the audio sharing function from two sets of headphones connected in advance to play the target audio. Therefore, the target audio which is associated with the audio sharing function can be played through the earphones which are associated with the audio sharing function correspondingly.
In some optional implementation manners of this embodiment, the sharing application corresponding to the audio sharing function may be determined by the apparatus 700 or other electronic devices through the following steps: determining applications with an audio playing function from pre-installed applications as candidate applications in response to receiving a sharing application setting request sent by a user; presenting the determined candidate application on an audio sharing interface preset for an audio sharing function; in response to the fact that the sharing operation of the user for the candidate application presented on the audio sharing interface is detected, the candidate application corresponding to the sharing operation is determined as the sharing application.
In some optional implementations of the present embodiment, presenting the determined candidate application on an audio sharing interface predetermined for an audio sharing function includes: determining the number of times of executing sharing operation on the candidate application by the user in a historical time period; and presenting the determined candidate application on an audio sharing interface predetermined for the audio sharing function according to the sequence of the number of the corresponding sharing operations from large to small.
In some optional implementations of this embodiment, the apparatus 700 further includes: and a generating unit (not shown in the figure) configured to generate a control window for controlling the audio contained in the sharing application on the audio sharing interface.
In some optional implementations of this embodiment, the apparatus 700 further includes: and a playing unit (not shown in the figure) configured to play the target audio by using the two sets of earphones connected in advance in response to determining that the audio sharing function is not turned on.
In some optional implementations of this embodiment, the apparatus 700 further includes: and a second selection unit (not shown in the figure) configured to select one of the two sets of headphones connected in advance to play the target audio, in response to a determination that the application to which the target audio belongs is not a sharing application predetermined for the audio sharing function.
In some optional implementations of this embodiment, the apparatus 700 further includes: an adjusting unit (not shown in the figure) configured to adjust a volume of a set of headphones corresponding to the audio sharing function for playing the target audio in response to receiving a volume adjustment request for the played target audio.
It will be understood that the elements described in the apparatus 700 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 700 and the units included therein, and will not be described herein again.
The device 700 provided by the above embodiment of the present disclosure can allocate the target audio belonging to the sharing application corresponding to the audio sharing function to the earphone playing corresponding to the audio sharing function when the audio sharing function is opened, and allocate the audio not belonging to the sharing application to the earphone playing not corresponding to the audio sharing function, so that two sets of connected earphones can be used to play different audios, thereby facilitating the synchronous playing of different audios, and improving the diversity of audio playing.
Referring now to fig. 8, a schematic diagram of a terminal device (e.g., terminal devices 101, 102, 103 of fig. 1) 800 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, the terminal device 800 may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the terminal apparatus 800 are also stored. The processing apparatus 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the terminal apparatus 800 to perform wireless or wired communication with other apparatuses to exchange data. While fig. 8 illustrates a terminal apparatus 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be included in the terminal device; or may exist separately without being assembled into the terminal device. The computer readable medium carries one or more programs which, when executed by the terminal device, cause the terminal device to: determining applications with an audio playing function from pre-installed applications as candidate applications in response to receiving a sharing application setting request sent by a user; presenting the determined candidate application on an audio sharing interface preset for an audio sharing function; in response to the fact that the sharing operation of the user for the candidate application presented on the audio sharing interface is detected, the candidate application corresponding to the sharing operation is determined as the sharing application.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a first determining unit, a second determining unit, and a first selecting unit. Where the names of the units do not in some cases constitute a limitation of the unit itself, for example, the first selection unit may also be described as "unit selecting headphones".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A method for playing audio, comprising:
in response to receiving a play request for a target audio, determining whether an audio sharing function is started;
in response to determining that an audio sharing function is started, determining whether an application to which the target audio belongs is a sharing application predetermined for the audio sharing function;
and in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function, selecting one set of earphones corresponding to the audio sharing function from two sets of earphones connected in advance to play the target audio.
2. The method of claim 1, wherein the sharing application corresponding to the audio sharing function is determined by:
determining applications with an audio playing function from pre-installed applications as candidate applications in response to receiving a sharing application setting request sent by a user;
presenting the determined candidate application on an audio sharing interface preset for the audio sharing function;
in response to the detection of the sharing operation of the user for the candidate application presented on the audio sharing interface, determining the candidate application corresponding to the sharing operation as the sharing application.
3. The method of claim 2, wherein the presenting the determined candidate applications on an audio sharing interface predetermined for the audio sharing function comprises:
determining the number of times of sharing operation executed by the user aiming at the candidate application in a historical time period;
and presenting the determined candidate application on an audio sharing interface predetermined for the audio sharing function according to the sequence of the number of the corresponding sharing operations from large to small.
4. The method of claim 2, wherein the method further comprises:
and generating a control window for controlling the audio contained in the sharing application on the audio sharing interface.
5. The method of claim 1, wherein the method further comprises:
and in response to determining that the audio sharing function is not started, playing the target audio by using two groups of earphones which are connected in advance.
6. The method of claim 1, wherein the method further comprises:
in response to determining that the application to which the target audio belongs is not a sharing application predetermined for the audio sharing function, selecting one set of headphones not corresponding to the audio sharing function from two sets of headphones connected in advance to play the target audio.
7. The method of claim 1, wherein the method further comprises:
in response to receiving a volume adjustment request for the played target audio, adjusting a volume of a set of headphones corresponding to an audio sharing function used to play the target audio.
8. An apparatus for playing audio, comprising:
a first determination unit configured to determine whether an audio sharing function has been turned on in response to receiving a play request for a target audio;
a second determination unit configured to determine, in response to determining that an audio sharing function has been turned on, whether an application to which the target audio belongs is a shared application predetermined for the audio sharing function;
a first selection unit configured to select, in response to determining that the application to which the target audio belongs is a sharing application predetermined for the audio sharing function, one set of headphones corresponding to the audio sharing function from among two sets of headphones connected in advance to play the target audio.
9. A terminal device, comprising:
one or more processors;
a storage device for storing one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010448200.9A 2020-05-25 2020-05-25 Method and apparatus for playing audio Pending CN111586240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010448200.9A CN111586240A (en) 2020-05-25 2020-05-25 Method and apparatus for playing audio

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010448200.9A CN111586240A (en) 2020-05-25 2020-05-25 Method and apparatus for playing audio

Publications (1)

Publication Number Publication Date
CN111586240A true CN111586240A (en) 2020-08-25

Family

ID=72111067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010448200.9A Pending CN111586240A (en) 2020-05-25 2020-05-25 Method and apparatus for playing audio

Country Status (1)

Country Link
CN (1) CN111586240A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153508A (en) * 2017-12-07 2018-06-12 天脉聚源(北京)传媒科技有限公司 A kind of method and device of audio frequency process
CN109862475A (en) * 2019-01-28 2019-06-07 Oppo广东移动通信有限公司 Audio-frequence player device and method, storage medium, communication terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153508A (en) * 2017-12-07 2018-06-12 天脉聚源(北京)传媒科技有限公司 A kind of method and device of audio frequency process
CN109862475A (en) * 2019-01-28 2019-06-07 Oppo广东移动通信有限公司 Audio-frequence player device and method, storage medium, communication terminal

Similar Documents

Publication Publication Date Title
US11240050B2 (en) Online document sharing method and apparatus, electronic device, and storage medium
US20220238139A1 (en) Video file generation method and device, terminal and storage medium
US7853649B2 (en) Audio processing for improved user experience
US20240192986A1 (en) Application handoff method and apparatus
RU2607994C2 (en) Information sharing device, information sharing method, information sharing program and terminal device
CN110289024B (en) Audio editing method and device, electronic equipment and storage medium
CN109582274B (en) Volume adjusting method and device, electronic equipment and computer readable storage medium
JP2015012612A (en) Method and system for providing ringtone using video multimedia
US20240127856A1 (en) Audio processing method and apparatus, and electronic device and storage medium
WO2019062667A1 (en) Method and device for transmitting conference content
US11902039B2 (en) Interaction method and apparatus, and electronic device
JP2023520570A (en) Volume automatic adjustment method, device, medium and equipment
CN112416289B (en) Audio synchronization method, device, equipment and storage medium
WO2024037480A1 (en) Interaction method and apparatus, electronic device, and storage medium
KR20090059263A (en) Service supporting method and system of distribution streaming of portable device
CN112188342A (en) Equalization parameter determination method and device, electronic equipment and storage medium
CN111586240A (en) Method and apparatus for playing audio
KR101483213B1 (en) Terminal controlling audio output path and method for controlling audio output path between terminals
CN112307161B (en) Method and apparatus for playing audio
CN114979344A (en) Echo cancellation method, device, equipment and storage medium
CN113992786A (en) Audio playing method and device
CN111159462A (en) Method and terminal for playing songs
CN113495712A (en) Automatic volume adjustment method, apparatus, medium, and device
CN113360117B (en) Control method, device, terminal and storage medium of electronic equipment
CN113838488B (en) Audio playing packet generation method and device and audio playing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200825