CN112286481A - Audio output method and electronic equipment - Google Patents
Audio output method and electronic equipment Download PDFInfo
- Publication number
- CN112286481A CN112286481A CN202011174161.4A CN202011174161A CN112286481A CN 112286481 A CN112286481 A CN 112286481A CN 202011174161 A CN202011174161 A CN 202011174161A CN 112286481 A CN112286481 A CN 112286481A
- Authority
- CN
- China
- Prior art keywords
- output
- audio data
- sound output
- audio
- electronic device
- 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
Links
- 238000000034 method Methods 0.000 claims abstract description 60
- 230000004044 response Effects 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 21
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
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)
- Circuit For Audible Band Transducer (AREA)
Abstract
The application discloses an audio output method and electronic equipment, belongs to the technical field of communication, and can solve the problems that when the electronic equipment plays a plurality of audios by using default sound output equipment, the audio playing effect is single, and the personalized audio playing requirements of users cannot be met. The method comprises the following steps: acquiring N audio data to be output, wherein N is a positive integer; determining a target sound output device corresponding to each audio data to be output from the M sound output devices; the N audio data to be output correspond to at least two different target sound output devices; and respectively outputting each audio data to be output through the corresponding target sound output equipment. The embodiment of the application is applied to an audio playing scene.
Description
Technical Field
The application belongs to the technical field of communication, and particularly relates to an audio output method and electronic equipment.
Background
Currently, a user may output audio through a sound output device of an electronic device (e.g., a sound output device of the electronic device itself or an external sound output device connected to the electronic device).
In the related art, in a case where an electronic device is connected to a plurality of sound output devices, when a user wants to output a plurality of audio through the electronic device, a sound output device of a system default is generally selected from the plurality of sound output devices to output the plurality of audio. For example, when an electronic device is connected to both a headset and a bluetooth speaker, the electronic device will typically prefer to use the headset to play audio by default.
Therefore, when the electronic device uses the default sound output device to play a plurality of audios, the audio playing effect is single, and the personalized audio playing requirement of the user cannot be met.
Disclosure of Invention
An object of the embodiments of the present application is to provide an audio output method and an electronic device, which can solve the problem that when the electronic device uses a default sound output device to play multiple audios, the audio playing effect is single, and the personalized audio playing requirement of a user cannot be met.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an audio output method, where the method includes: acquiring N audio data to be output, wherein N is a positive integer; determining a target sound output device corresponding to each audio data to be output from the M sound output devices; the N audio data to be output correspond to at least two different target sound output devices; and respectively outputting each audio data to be output through the corresponding target sound output equipment.
In a second aspect, an embodiment of the present application provides an electronic device, where the electronic device is applied to an electronic device, the electronic device is connected to M sound output devices, M is an integer greater than 1, and the electronic device includes: the device comprises an acquisition module, a determination module and a control module, wherein: the acquiring module is configured to acquire N audio data to be output, where N is a positive integer; the determining module is configured to determine, from the M sound output devices, a target sound output device corresponding to each to-be-output audio data acquired by the acquiring module; the N audio data to be output correspond to at least two different target sound output devices; the control module is configured to output each to-be-output audio data acquired by the acquisition module through the corresponding target sound output device determined by the determination module.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In this embodiment of the application, when the electronic device is connected to at least two sound output devices, after the electronic device acquires the N audio data to be output, a suitable audio output device may be selected for each audio data to be output from the at least two sound output devices currently connected to the electronic device to output the audio data. Therefore, a plurality of audio data are output through different audio output devices, so that the mutual interference of the plurality of audio data to be output is avoided, the overall playing effect of audio is improved, the audio data to be output in the electronic device can be accurately output according to the user requirement, the audio playing effect is improved, and the personalized audio playing requirement of a user can be met.
Drawings
Fig. 1 is a flowchart of an audio output method provided in an embodiment of the present application;
fig. 2 is an exemplary diagram of an interface applied by an audio output method according to an embodiment of the present application;
fig. 3 is a second exemplary diagram of an interface applied by an audio output method according to the embodiment of the present application;
fig. 4 is a third exemplary diagram of an interface applied by an audio output method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a second schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 7 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
fig. 8 is a second schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The audio output method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
The audio output method provided by the embodiment of the application can be applied to scenes for playing audio data.
Take the example that the electronic device outputs audio data through the sound output device. Assume that an electronic device is connected to both a wired headset and a bluetooth speaker, and a user wants to output an incoming ringtone and audio in a movie through a sound output device of the electronic device. When the electronic equipment is connected with a plurality of sound output devices, the electronic equipment outputs audio data through the sound output devices which are defaulted by the system. Specifically, under the condition that the electronic device is connected with the wired earphone and the bluetooth speaker at the same time, because the system defaults to output audio data through the wired earphone, when the electronic device is connected with the wired earphone and the bluetooth speaker at the same time, the incoming call ringtone of the electronic device and the audio in the movie can be output through the wired earphone. Therefore, the playing effect of the electronic device playing the multiple audios is single, and the personalized audio playing requirement of the user cannot be met.
In the embodiment of the present application, it is assumed that the electronic device is connected with a wired headset and a bluetooth speaker at the same time, and the user wants to output an incoming ringtone and audio in a movie through a sound output device of the electronic device. Then, the electronic device may select a sound output device suitable for the incoming call ringtone and the movie from the two sound output devices, i.e., the wired earphone and the bluetooth speaker, to output the incoming ringtone and the sound of the movie. Therefore, a plurality of audio data to be output in the electronic equipment can be accurately output according to the user requirements, the audio playing effect is improved, and the personalized audio playing requirements of the user can be met.
In other words, an execution subject of the audio output method provided in the embodiment of the present invention may be the electronic device described above, or may also be a functional module and/or a functional entity capable of implementing the method in the electronic device, which may be determined specifically according to actual use requirements, and the embodiment of the present invention is not limited. The electronic equipment is connected with M sound output equipment, and M is an integer larger than 1.
For example, the sound output device may be a built-in sound output device (e.g., an earphone, a speaker, etc.) of the electronic device, or may be an external sound output device (e.g., a wired earphone, a bluetooth headset, a bluetooth speaker, etc.) independent of the electronic device. Further, the M sound output devices include: the sound output device is built in the electronic device, and/or the sound output device is externally connected with the electronic device. It should be noted that the sound output device is any device capable of converting audio into sound after D/a conversion and noise filtering, and the type of the sound output device is not limited in this embodiment.
The following takes an electronic device as an example to exemplarily explain an audio output method provided by the embodiment of the present invention.
An embodiment of the present application provides an audio output method, and as shown in fig. 1, the audio output method provided by the embodiment of the present application may include the following steps 101 to 103:
step 101: and acquiring N audio data to be output.
Wherein N is a positive integer.
In this embodiment, the N audio data to be output are audio data corresponding to the N audio data to be output. For example, the N to-be-output audios may be to-be-output audios of one or more audios, that is, one audio corresponds to at least one to-be-output audio. In one example, the N audio data to be output may include audio data of N tracks of one audio.
In an embodiment of the present application, the audio to be output may include at least one of: system alert tones (e.g., ring tone, alarm, notification alert tone, etc.), multimedia audio, call audio, and recording.
Step 102: and determining a target sound output device corresponding to each audio data to be output from the M sound output devices.
In this embodiment of the application, the N audio data to be output correspond to at least two different target sound output devices. That is, the target sound output apparatuses of at least two audio data to be output among the above N audio data to be output are different.
It should be noted that, each audio data to be output in the N audio to be output may correspond to one or more sound output devices. That is, when a certain audio data to be output corresponds to a plurality of sound output apparatuses, the audio data to be output may be sequentially or simultaneously output through the plurality of sound output apparatuses.
Optionally, in this embodiment of the application, each to-be-output audio data in the N to-be-output audio data may correspond to a different target sound output device. Or, when N is greater than or equal to 3, a part of the audio data to be output in the N audio data to be output may correspond to the same target sound output device.
Further optionally, in this embodiment of the application, when at least two audio data to be output in the N audio to be output correspond to the same target sound output device, the electronic device may control the sound output device to sequentially output the at least two audio data at a certain time interval (for example, 30s) (that is, output in a serial manner), or may control the electronic device to simultaneously output the at least two audio data (that is, output in a parallel manner). It should be noted that, when one sound output device outputs two audio data simultaneously, the two audio data may be mixed first, and then the mixed audio data may be output through the sound output device. For example, in a case where the electronic device is connected to a headset, when the N to-be-output audios include an incoming call ringtone, a multimedia audio 1, and a multimedia audio 2, the electronic device may output both the incoming call ringtone and the multimedia audio 1 through a speaker, and output the multimedia audio 2 through the headset.
Optionally, in this embodiment of the application, the target sound output device corresponding to the audio data to be output may be: the default sound output device preset by the user for the audio data to be output can also be a sound output device manually selected by the user according to the preference.
For example, the user may set a default sound output device at the sound output device management interface.
For example, in the case of displaying an audio playing interface, as shown in (a) of fig. 2, after the user clicks the output device selection control, the electronic device displays a plurality of sound output device options, as shown in (b) of fig. 2, and after the user selects "multimedia" from the options, the output device of the media audio is determined to be the bluetooth device 1.
Step 103: and respectively outputting each audio data to be output through the corresponding target sound output equipment.
In this embodiment, when the electronic device outputs the N audio data to be output, the electronic device may output the N audio data to be output simultaneously, or may output the N audio data to be output sequentially.
In the audio output method provided by the embodiment of the application, when the electronic device is connected with at least two sound output devices, after the electronic device acquires the N audio data to be output, a suitable audio output device can be respectively selected for each audio data to be output from the at least two sound output devices currently connected with the electronic device to output. Therefore, a plurality of audio data are output through different audio output devices, so that the mutual interference of the plurality of audio data to be output is avoided, the overall playing effect of audio is improved, the audio data to be output in the electronic device can be accurately output according to the user requirement, the audio playing effect is improved, and the personalized audio playing requirement of a user can be met.
Alternatively, in the embodiment of the present application, in the case of playing a video (e.g., a movie), the electronic device may output a plurality of different audio tracks in the video (e.g., a chinese dubbing, an english dubbing, etc. of the movie) through the corresponding target sound output devices, respectively.
Illustratively, the step 101 may include the following step a 1:
step A1: and under the condition of playing the target video, acquiring N audio track data of the target video.
Illustratively, the N audio data to be output are N audio track data of the target video. The tracks are parallel "tracks" of one of the strips seen in the sequencer software. Each track defines attributes of the track, such as the timbre, the timbre library, the number of channels, the input/output ports, the volume, etc., of the track. For a movie video, the character dialog in the movie can use one audio track, the background music can use one audio track, and the special sound effect can use one audio track, so that post-processing personnel can manage and process the sound effects more conveniently, and different sound effects such as stereo, 3D and surround can be set in different audio tracks, and different sound effects can be achieved under the same picture.
Illustratively, the N track data of the target video may include: audio data of N dubbing in the target video (e.g., chinese dubbing, english dubbing, japanese dubbing, etc.), or audio data of background sound and audio data of character dialog in the target video. In this way, audio data of different tracks of the same video are output through different sound output devices, so that the viewing experience of the video can be increased.
For example, the electronic device may extract audio data for each of a plurality of audio tracks in the target video via a file analyzer. Then, a corresponding channel is added to each track, and audio data of the track is output through the channel by a target sound output apparatus corresponding to the track.
Therefore, the electronic equipment can output different dubbing in the video through different sound output equipment respectively, and the actual playing requirements of users can be met.
Optionally, in this embodiment of the application, the electronic device may determine, according to the category of the audio data to be output, a target sound output device corresponding to the audio data of the category.
Illustratively, the step 102 may include the following steps B1 and B2:
step B1: and according to the audio category of the first audio data to be output, using the first sound output equipment corresponding to the audio category as the target sound output equipment of the first audio data to be output.
For example, the first audio data to be output is any one of the N audio data to be output; the first sound output device is one of the M sound output devices.
Illustratively, the audio category of the first audio data to be output is determined according to a classification criterion or a sound source preset by a system.
In one example, where the audio is classified by characteristics of sound waves, the audio category of the audio data may include at least one of: speech, music and sound effects.
In one example, in the case of classifying audio according to the format of audio, the audio category of the audio data may include at least one of: cda (cda track index format), WAV (waveform audio file), MP3 (motion picture experts group compression standard audio layer 3), FLAC (lossless audio compression coding).
In one example, where the audio is classified by audio source, the audio category of the audio data may include at least one of: media, system alert tone, recording, conversation.
The sound source preset by the system may include at least one of the following: media, ring tones, alarm clocks, talk, announcement, and smart voice, etc.
It should be noted that, when the electronic device classifies the audio, the electronic device may classify the audio according to at least one of the above audio classification manners, which is not limited in this embodiment of the application.
Thus, by associating audio categories with sound output devices and outputting one category of audio through a corresponding target sound output device, the flexibility of audio output is improved.
Optionally, in this embodiment of the application, in a case that the electronic device selects one audio data to be output for playing, the user may manually select an appropriate sound output device for the audio data to be output.
Illustratively, before the step 102, the audio output method provided by the embodiment of the present application further includes the following step C1:
step C1: and receiving a first input of a user under the condition of displaying a playing interface of the second audio data to be output.
In conjunction with the step C1, the step 102 may include the step C2:
step C2: and responding to the first input, and taking a second sound output device selected by a user as a target sound output device of the second audio data to be output.
Illustratively, the second sound output device is one of the M sound output devices.
For example, when the audio corresponding to the second audio data to be output is a recording audio, the playing interface may be a recording interface; when the audio corresponding to the second audio data to be output is a call audio, the playing interface may be a call interface; when the audio corresponding to the second audio data to be output is the audio of the video, the playing interface may be the playing interface of the video.
Illustratively, the first input includes: any feasible input, such as touch input, gesture input, and voice input.
Further optionally, in combination with the step C1 and the step C2, before the step C1, the audio output method provided by the embodiment of the present application further includes the following step D1:
step D1: and under the condition of displaying a playing interface of the second audio data to be output, displaying M identifiers, wherein one identifier is used for indicating one sound output device in the M sound output devices.
Illustratively, the first input includes: a first input of a target identifier in the M identifiers by a user; the second sound output device is the sound output device indicated by the target identifier.
For example, the M sound output devices indicated by the M identifiers may be all or part of sound output devices currently provided by the electronic device.
For example, in a case that a playing interface of second audio data to be output is displayed, the electronic device may directly display the M identifiers on the playing interface of the second audio data to be output, or may display the M identifiers after receiving a touch input of a user to a first control in the playing interface of the second audio data to be output.
For example, as shown in fig. 3 (a), in the case where the electronic device plays a video a, after the user clicks the first control 31, the electronic device acquires 3 language audio tracks (chinese, english, and japanese, respectively) of the current video, then adds 3 channels (channel 1, channel 2, and channel 3) corresponding to the 3 audio tracks, and displays the output device setting interface 32. As shown in fig. 3 (b), the user can set one or more sound output devices for each channel at the output device setting interface 32, thereby determining the sound output device corresponding to each track.
Therefore, the user can conveniently and quickly set the target sound output equipment of the current audio data to be output on the audio playing interface of the current audio to be output.
Further alternatively, the electronic device may select a corresponding target sound output device for each to-be-output audio data on the play interface of the to-be-output audio data.
For example, after the step C2, the electronic device may switch the playing interface of the second audio data to be output to the playing interface of the fifth audio data to be output, and then select a corresponding target sound output device for the fifth audio data to be output, referring to the above process of selecting the corresponding target sound output device for the second audio data to be output.
For example, when switching the playing interface of the audio data to be output, the electronic device may switch automatically (e.g., automatically switch to the playing interface of the next audio data to be output after selecting a corresponding target sound output device for the audio data to be output), or may switch manually (e.g., a user slides left and right on the playing interface to switch to the playing interface of the previous or next audio data to be output).
For example, when the fifth to-be-output audio data is to-be-output audio data of a certain audio, the playing interface of the fifth to-be-output audio data is an audio playing interface of the certain audio. If the N audio data to be output include at least two audio data to be output of the audio, the user may determine corresponding target sound output devices for the audio data to be output on the audio playing interface of the audio according to the above scheme.
For example, the N audio data to be output may correspond to N playback instances, and the N playback instances may be N playback instances that have been created by the electronic device. The user may determine a corresponding target sound output device for the audio data to be output corresponding to each playing instance in turn.
For example, taking the current 2 audio data to be output as "music 1" and "music 2" respectively as an example, the audio playing interface of "music 1" is the interface 41, and the audio playing interface of "music 2" is the interface 42. As shown in (a) of fig. 4, in the case that the electronic device displays the play interface 41 of "music 1", the user may first select the corresponding target sound output device for "music 1" through the control a on the play interface 41 (the specific selection process may refer to the process shown in fig. 3). Then, as shown in (b) in fig. 4, the user slides to the left on the play interface 41, thereby switching the play interface 41 to the play interface 42, so that the user can select the corresponding target sound output apparatus for "music 2" through the control b on the play interface 42 (as above, the specific selection process may refer to the process shown in fig. 3).
Therefore, a user can select corresponding sound output equipment on each playing interface by switching a plurality of playing interfaces of the audio data to be output, so that each target sound output equipment of the audio data to be output is set quickly, and the flexibility of audio output is improved.
Optionally, in this embodiment of the present application, in a case that a target sound output device for outputting audio data is a bluetooth device, if the bluetooth device is currently outputting audio data, the audio data to be output is mixed with the audio data currently being output by the bluetooth device, and then the mixed audio data is output by the bluetooth device.
Exemplarily, the M sound output devices include a first bluetooth device; the N audio data to be output comprise third audio data to be output and fourth audio data to be output; the first bluetooth device is the fourth target sound output device to be output with the audio.
For example, before transmitting the audio to be output to the first bluetooth device, the electronic device may first acquire a current state of the first bluetooth device, where the state of the first bluetooth device includes: an operating state and an idle state, it is understood that the operating state refers to that the bluetooth device is currently transmitting data, and the idle state refers to that the bluetooth device is not currently transmitting data.
For example, when the first bluetooth device is in an operating state, the step 103 may include the following step E1:
step E1: and mixing the third audio data to be output and the fourth audio data to be output under the condition that the third audio data to be output is output through the first Bluetooth equipment, and outputting the mixed audio data through the first Bluetooth equipment.
Further, the electronic device may obtain third audio data to be output currently output by the first bluetooth device, then synthesize (e.g., directly add) two paths of audio data, i.e., fourth audio data to be output and third audio data to be output, to obtain one path of audio data, transmit the one path of audio data to the target sound output device for output, and finally output the one path of audio data through the target sound output device.
Further, the electronic device may obtain a data format of one channel of audio data when obtaining the one channel of audio data through audio mixing, determine whether the first bluetooth device supports the data format, re-encode the one channel of audio data when the first bluetooth device does not support the data format, and transmit the encoded audio data to the first bluetooth device.
Therefore, the electronic equipment outputs the audio data to be output through the Bluetooth equipment which is outputting the audio data, so that one target sound output equipment can output a plurality of audio data, and the flexibility of audio output is improved.
Optionally, in this embodiment of the present application, when a target sound output device that is to output audio data is a bluetooth device, if the bluetooth device is currently in an idle state, the current audio data to be output is directly output through the bluetooth device.
Optionally, in this embodiment of the application, when the electronic device is connected to at least two bluetooth devices and audio data to be output needs to be output through at least two bluetooth devices, due to limitations of bluetooth transmission bandwidths and states and transmission capabilities of different electronic devices, when the audio data to be output is output through a plurality of bluetooth devices, corresponding judgment and processing need to be performed according to the current audio data to be output and the current transmission bandwidth, so that the audio data to be output can be output normally.
For example, in the case of transmitting each audio data to be output, the electronic device may obtain audio description information of the audio data to be output that needs to be currently transmitted and a current idle bandwidth of the electronic device, and determine whether the idle bandwidth is sufficient to transmit the audio data to be output. It should be noted that, because the bluetooth system is a time division duplex system, each audio data to be output is transmitted in a different time slot, and therefore, the audio data to be output currently needing to be transmitted is audio data of an audio to be output.
Further, the audio description information of the audio data to be output includes at least one of the following: number of channels, sampling frequency.
Further, when the free bandwidth of the electronic device is sufficient to transmit the current audio data to be output, the current audio data to be output is transmitted to the corresponding target sound output device.
Further, when the free bandwidth of the electronic device is not enough to transmit the current audio data to be output, the code rate of the current audio data to be output is reduced. For example, the number of channels of audio data to be output is reduced, and the sampling frequency is lowered. As such, the electronic device may transmit the audio to be output to the plurality of bluetooth devices.
Furthermore, the electronic device can determine whether the idle bandwidth of the electronic device is sufficient to transmit the audio data to be output after the code rate is reduced. When the audio data to be output after the code rate is reduced is enough transmitted, the audio data to be output after the code rate is reduced is transmitted to corresponding target sound output equipment; and when the idle bandwidth is still not enough to transmit the audio data to be output after the code rate is reduced, refusing to transmit the audio data to the target audio output equipment, and displaying prompt information to remind a user that the audio data cannot be transmitted to the target audio output equipment.
It should be noted that, in the audio output method provided in the embodiment of the present application, the execution main body may be an electronic device, or a control module in the electronic device for executing the audio output method. The embodiment of the present application takes an example of an electronic device executing an audio output method, and illustrates the electronic device provided in the embodiment of the present application.
The embodiment of the application provides electronic equipment, wherein the electronic equipment is connected with M sound output devices, and M is an integer larger than 1. As shown in fig. 5, the electronic device 600 includes: an obtaining module 601, a determining module 602, and a control module 603, wherein: the obtaining module 601 is configured to obtain N audio data to be output, where N is a positive integer; the determining module 602 is configured to determine, from the M sound output devices, a target sound output device corresponding to each piece of audio data to be output, which is acquired by the acquiring module 601; the N audio data to be output correspond to at least two different target sound output devices; the control module 603 is configured to output each audio data to be output, which is acquired by the acquisition module 601, through the corresponding target sound output device determined by the determination module 602.
Optionally, in this embodiment of the present application, the obtaining module 601 is specifically configured to obtain N audio track data of a target video when the target video is played; wherein, the N audio data to be output are the N audio track data.
Optionally, in this embodiment of the application, the determining module 602 is specifically configured to, according to an audio category of first audio data to be output, use a first sound output device corresponding to the audio category as a target sound output device of the first audio data to be output; wherein, the first audio data to be output is any one of the N audio data to be output; the first sound output device is one of the M sound output devices.
Optionally, in this embodiment of the application, as shown in fig. 6, the electronic device further includes: a receiving module 604; the receiving module 604 is configured to receive a first input of a user when a playing interface of the second audio data to be output is displayed; the determining module 602 is specifically configured to, in response to the first input received by the receiving module 604, use a second sound output device selected by a user as a target sound output device of the second audio data to be output; wherein the second sound output device is one of the M sound output devices.
Optionally, in this embodiment of the application, as shown in fig. 6, the electronic device further includes: a display module 605; the display module 605 is configured to display M identifiers under a condition that a playing interface of the second audio data to be output is displayed, where one identifier is used to indicate one sound output device of the M sound output devices; wherein the first input comprises: a first input of a target identifier in the M identifiers by a user; the second sound output device is the sound output device indicated by the target identifier.
Optionally, in this embodiment of the present application, the M sound output devices include a first bluetooth device; the N audio data to be output comprise third audio data to be output and fourth audio data to be output; the first bluetooth device is a target sound output device of the fourth audio to be output; the control module 603 is specifically configured to, under the condition that the third to-be-output audio data is output through the first bluetooth device, mix the third to-be-output audio data with the fourth to-be-output audio data, and output the mixed audio data through the first bluetooth device.
In the electronic device provided by the embodiment of the application, when the electronic device is connected with at least two sound output devices, after the electronic device acquires the N audio data to be output, a suitable audio output device can be selected for each audio data to be output from the at least two sound output devices currently connected with the electronic device to output the audio data. Therefore, a plurality of audio data are output through different audio output devices, so that the mutual interference of the plurality of audio data to be output is avoided, the overall playing effect of audio is improved, the audio data to be output in the electronic device can be accurately output according to the user requirement, the audio playing effect is improved, and the personalized audio playing requirement of a user can be met.
It should be noted that, as shown in fig. 6, modules that are necessarily included in the electronic device 600 are indicated by solid line boxes, such as the control module 603; modules that may or may not be included in the electronic device 600 are illustrated with dashed boxes, such as the display module 605.
The electronic device in the embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The electronic device in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The electronic device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 3, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment of the present application, and includes a processor 701, a memory 702, and a program or an instruction stored in the memory 702 and executable on the processor 701, where the program or the instruction is executed by the processor 701 to implement each process of the foregoing audio output method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 100 includes, but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
Those skilled in the art will appreciate that the electronic device 100 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 110 is configured to obtain N audio data to be output, where N is a positive integer; the processor 110 is further configured to determine, from the M sound output devices, a target sound output device corresponding to each audio data to be output; the N audio data to be output correspond to at least two different target sound output devices; the processor 110 is further configured to output each of the audio data to be output through the corresponding target sound output device.
Optionally, in this embodiment of the present application, the processor 110 is specifically configured to, in a case that a target video is played, obtain N audio track data of the target video; wherein, the N audio data to be output are the N audio track data.
Optionally, in this embodiment of the application, the processor 110 is specifically configured to, according to an audio category of first audio data to be output, use a first sound output device corresponding to the audio category as a target sound output device of the first audio data to be output; wherein, the first audio data to be output is any one of the N audio data to be output; the first sound output device is one of the M sound output devices.
Optionally, in this embodiment of the application, the user input unit 107 is configured to receive a first input of a user when a playing interface of the second audio data to be output is displayed; the processor 110 is specifically configured to respond to the first input received by the user input unit 107, and use a second sound output device selected by a user as a target sound output device of the second audio data to be output; wherein the second sound output device is one of the M sound output devices.
Optionally, in this embodiment of the application, the display unit 106 is configured to display M identifiers when a playing interface of the second audio data to be output is displayed, where one identifier is used to indicate one sound output device of the M sound output devices; wherein the first input comprises: a first input of a target identifier in the M identifiers by a user; the second sound output device is the sound output device indicated by the target identifier.
Optionally, in this embodiment of the present application, the M sound output devices include a first bluetooth device; the N audio data to be output comprise third audio data to be output and fourth audio data to be output; the first bluetooth device is a target sound output device of the fourth audio to be output; the processor 110 is specifically configured to, when the third audio data to be output is output through the first bluetooth device, mix the third audio data to be output with the fourth audio data to be output, and output the mixed audio data through the first bluetooth device.
In the electronic device provided by the embodiment of the application, when the electronic device is connected with at least two sound output devices, after the electronic device acquires the N audio data to be output, a suitable audio output device can be selected for each audio data to be output from the at least two sound output devices currently connected with the electronic device to output the audio data. Therefore, a plurality of audio data are output through different audio output devices, so that the mutual interference of the plurality of audio data to be output is avoided, the overall playing effect of audio is improved, the audio data to be output in the electronic device can be accurately output according to the user requirement, the audio playing effect is improved, and the personalized audio playing requirement of a user can be met.
It should be understood that, in the embodiment of the present application, the input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics Processing Unit 1041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071 is also referred to as a touch screen. The touch panel 1071 may include two parts of a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 109 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 110 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The embodiment of the present application further provides a readable storage medium with a readable storage medium removed, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned audio output method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned audio output method embodiment, and can achieve the same technical effect, and is not described here again to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (10)
1. An audio output method is applied to an electronic device, wherein the electronic device is connected with M sound output devices, M is an integer greater than 1, and the method comprises the following steps:
acquiring N audio data to be output, wherein N is a positive integer;
determining a target sound output device corresponding to each audio data to be output from the M sound output devices; the N audio data to be output correspond to at least two different target sound output devices;
and respectively outputting each audio data to be output through the corresponding target sound output equipment.
2. The method according to claim 1, wherein the determining, from the M sound output devices, a target sound output device corresponding to each audio data to be output comprises:
according to the audio category of first audio data to be output, using a first sound output device corresponding to the audio category as a target sound output device of the first audio data to be output;
the first audio data to be output is any one of the N audio data to be output; the first sound output device is one of the M sound output devices.
3. The method according to claim 1, wherein before determining a target sound output device corresponding to each audio data to be output from the M sound output devices, the method further comprises:
receiving a first input of a user under the condition of displaying a playing interface of second audio data to be output;
the determining, from the M sound output devices, a target sound output device corresponding to each audio data to be output includes:
responding to the first input, and using a second sound output device selected by a user as a target sound output device of the second audio data to be output;
wherein the second sound output device is one of the M sound output devices.
4. The method of claim 3, wherein prior to receiving the first input from the user, the method further comprises:
under the condition that a playing interface of second audio data to be output is displayed, M identifiers are displayed, wherein one identifier is used for indicating one sound output device in the M sound output devices;
wherein the first input comprises: a first input of a target identifier from the M identifiers by a user; the second sound output device is the sound output device indicated by the target identifier.
5. The method of claim 1, wherein the M sound output devices comprise a first bluetooth device; the N audio data to be output comprise third audio data to be output and fourth audio data to be output;
the first Bluetooth device is a target sound output device of the fourth audio to be output;
the outputting each audio data to be output through the corresponding target sound output device respectively includes:
and under the condition that the third audio data to be output is output through the first Bluetooth equipment, mixing the third audio data to be output and the fourth audio data to be output, and outputting the mixed audio data through the first Bluetooth equipment.
6. An electronic device, wherein the electronic device is connected to M sound output devices, M being an integer greater than 1, the electronic device comprising: the device comprises an acquisition module, a determination module and a control module, wherein:
the acquisition module is used for acquiring N audio data to be output, wherein N is a positive integer;
the determining module is configured to determine, from the M sound output devices, a target sound output device corresponding to each to-be-output audio data acquired by the acquiring module; the N audio data to be output correspond to at least two different target sound output devices;
and the control module is used for respectively outputting each audio data to be output, which is acquired by the acquisition module, through the corresponding target sound output equipment determined by the determination module.
7. The electronic device of claim 6,
the determining module is specifically configured to, according to an audio category of first to-be-output audio data, use a first sound output device corresponding to the audio category as a target sound output device of the first to-be-output audio data;
the first audio data to be output is any one of the N audio data to be output; the first sound output device is one of the M sound output devices.
8. The electronic device of claim 6, further comprising: a receiving module;
the receiving module is used for receiving a first input of a user under the condition of displaying a playing interface of second audio data to be output;
the determining module is specifically configured to, in response to the first input received by the receiving module, use a second sound output device selected by a user as a target sound output device of the second audio data to be output;
wherein the second sound output device is one of the M sound output devices.
9. The electronic device of claim 8, further comprising: a display module;
the display module is used for displaying M identifiers under the condition of displaying a playing interface of second audio data to be output, wherein one identifier is used for indicating one sound output device in the M sound output devices;
wherein the first input comprises: a first input of a target identifier from the M identifiers by a user; the second sound output device is the sound output device indicated by the target identifier.
10. The electronic device of claim 6, wherein the M sound output devices comprise a first Bluetooth device; the N audio data to be output comprise third audio data to be output and fourth audio data to be output;
the first Bluetooth device is a target sound output device of the fourth audio to be output;
the control module is specifically configured to mix the third to-be-output audio data with the fourth to-be-output audio data under the condition that the third to-be-output audio data is output through the first bluetooth device, and output the mixed audio data through the first bluetooth device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011174161.4A CN112286481A (en) | 2020-10-28 | 2020-10-28 | Audio output method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011174161.4A CN112286481A (en) | 2020-10-28 | 2020-10-28 | Audio output method and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112286481A true CN112286481A (en) | 2021-01-29 |
Family
ID=74373867
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011174161.4A Pending CN112286481A (en) | 2020-10-28 | 2020-10-28 | Audio output method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112286481A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113840032A (en) * | 2021-09-23 | 2021-12-24 | Oppo广东移动通信有限公司 | Audio control method, audio control device and electronic equipment |
CN113992786A (en) * | 2021-10-26 | 2022-01-28 | 维沃移动通信有限公司 | Audio playing method and device |
CN114501401A (en) * | 2021-07-12 | 2022-05-13 | 荣耀终端有限公司 | Audio transmission method and device, electronic equipment and readable storage medium |
CN114650496A (en) * | 2022-03-07 | 2022-06-21 | 维沃移动通信有限公司 | Audio playing method and electronic equipment |
WO2022213851A1 (en) * | 2021-04-07 | 2022-10-13 | 维沃移动通信有限公司 | Audio output control method and apparatus |
CN115412806A (en) * | 2022-08-26 | 2022-11-29 | 上海商米科技集团股份有限公司 | Audio routing method, device and electronic device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105630586A (en) * | 2014-10-30 | 2016-06-01 | 联想(北京)有限公司 | Information processing method and electronic device |
CN106201425A (en) * | 2016-07-12 | 2016-12-07 | 乐视控股(北京)有限公司 | A kind of method and device of intelligent terminal's audio frequency output |
CN106293599A (en) * | 2016-07-29 | 2017-01-04 | 联想(北京)有限公司 | A kind of output control method, electronic equipment and output system |
CN110058836A (en) * | 2019-03-18 | 2019-07-26 | 维沃移动通信有限公司 | A kind of output method and terminal device of audio signal |
CN111124351A (en) * | 2019-12-24 | 2020-05-08 | RealMe重庆移动通信有限公司 | Audio output method, audio output device, electronic equipment and storage medium |
CN111124345A (en) * | 2019-11-27 | 2020-05-08 | 维沃移动通信有限公司 | Audio source processing method and mobile terminal |
-
2020
- 2020-10-28 CN CN202011174161.4A patent/CN112286481A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105630586A (en) * | 2014-10-30 | 2016-06-01 | 联想(北京)有限公司 | Information processing method and electronic device |
CN106201425A (en) * | 2016-07-12 | 2016-12-07 | 乐视控股(北京)有限公司 | A kind of method and device of intelligent terminal's audio frequency output |
CN106293599A (en) * | 2016-07-29 | 2017-01-04 | 联想(北京)有限公司 | A kind of output control method, electronic equipment and output system |
CN110058836A (en) * | 2019-03-18 | 2019-07-26 | 维沃移动通信有限公司 | A kind of output method and terminal device of audio signal |
CN111124345A (en) * | 2019-11-27 | 2020-05-08 | 维沃移动通信有限公司 | Audio source processing method and mobile terminal |
CN111124351A (en) * | 2019-12-24 | 2020-05-08 | RealMe重庆移动通信有限公司 | Audio output method, audio output device, electronic equipment and storage medium |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022213851A1 (en) * | 2021-04-07 | 2022-10-13 | 维沃移动通信有限公司 | Audio output control method and apparatus |
CN114501401A (en) * | 2021-07-12 | 2022-05-13 | 荣耀终端有限公司 | Audio transmission method and device, electronic equipment and readable storage medium |
CN113840032A (en) * | 2021-09-23 | 2021-12-24 | Oppo广东移动通信有限公司 | Audio control method, audio control device and electronic equipment |
CN113992786A (en) * | 2021-10-26 | 2022-01-28 | 维沃移动通信有限公司 | Audio playing method and device |
CN114650496A (en) * | 2022-03-07 | 2022-06-21 | 维沃移动通信有限公司 | Audio playing method and electronic equipment |
CN115412806A (en) * | 2022-08-26 | 2022-11-29 | 上海商米科技集团股份有限公司 | Audio routing method, device and electronic device |
CN115412806B (en) * | 2022-08-26 | 2025-03-21 | 上海商米科技集团股份有限公司 | Audio routing method, device and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112286481A (en) | Audio output method and electronic equipment | |
US11621022B2 (en) | Video file generation method and device, terminal and storage medium | |
CN104284249A (en) | Video playing method and device | |
US11272136B2 (en) | Method and device for processing multimedia information, electronic equipment and computer-readable storage medium | |
AU2022203591B2 (en) | Method and apparatus for switching display interface, and electronic device | |
US9369587B2 (en) | System and method for software turret phone capabilities | |
EP4539473A1 (en) | Voice chat display method and apparatus, electronic device, and computer readable medium | |
WO2017107491A1 (en) | Method and device for playing audio | |
CN117524223A (en) | Voice interaction method, device, equipment and storage medium | |
US20150052211A1 (en) | Message based conversation function execution method and electronic device supporting the same | |
EP3657821B1 (en) | Method and device for playing back audio, and terminal | |
EP4284005A1 (en) | Video dubbing method, related device, and computer readable storage medium | |
CN116962338A (en) | Method and device for interaction between objects, electronic equipment and storage medium | |
CN113423132B (en) | Shutdown early warning method, shutdown early warning device, shutdown early warning medium and shutdown early warning equipment | |
CN113992786A (en) | Audio playing method and device | |
CN111833883B (en) | Voice control method, device, electronic device and storage medium | |
CN113946251A (en) | Media content sending method, device, equipment, readable storage medium and product | |
CN113132794A (en) | Live background sound processing method, device, equipment, medium and program product | |
CN107340990B (en) | Playing method and device | |
CN114416011B (en) | Terminal, audio control method and storage medium | |
US20070067169A1 (en) | Method for arbitrating audio data output apparatuses | |
CN113031903B (en) | Electronic equipment and audio stream synthesis method thereof | |
CN111984221B (en) | Audio output method, device, equipment and computer readable storage medium | |
CN113741855B (en) | Audio playing method and terminal | |
CN118939160A (en) | Multimedia resource display method, device, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210129 |