Summary of the invention
The object of the present invention is to provide a kind of terminal audio frequency player method, device and terminal, make user freely can control the output device of audio frequency, achieve a terminal device and export multiple audio-frequency information simultaneously, improve Consumer's Experience.
In order to achieve the above object, the embodiment of the present invention provides a kind of terminal audio frequency player method, is applied to the terminal comprising multiple audio output apparatus, comprises:
When detecting that the audio stream of more than 2 exports, select interface at the display screen display audio frequency apparatus of described terminal;
Obtain and select interface to be the audio output apparatus that described more than 2 audio streams are selected respectively by described audio frequency apparatus, and control the described audio output apparatus that the unlatching of described terminal is respectively described more than 2 audio streams selection, output audio file.
Wherein, described audio output apparatus comprises at least 2 in earphone, loudspeaker, receiver and bluetooth earphone.
Wherein, described acquisition is comprised by the step that described audio frequency apparatus selection interface is the audio output apparatus that described more than 2 audio streams are selected respectively:
Obtaining the MUX by selecting interface to be connected with described audio frequency apparatus, is the audio output apparatus that described more than 2 audio streams are selected respectively; Wherein, the other end of described MUX is connected with described multiple audio output apparatus respectively.
Wherein, described more than 2 audio streams are the audio stream of different audio file.
The embodiment of the present invention also provides a kind of terminal audio frequency playing device, is applied to the terminal comprising multiple audio output apparatus, comprises:
Detection module, during for detecting that the audio stream of more than 2 exports, selects interface at the display screen display audio frequency apparatus of described terminal;
Output module, interface is selected to be the audio output apparatus that described more than 2 audio streams are selected respectively for obtaining by described audio frequency apparatus, and control the described audio output apparatus that the unlatching of described terminal is respectively described more than 2 audio streams selection, output audio file.
Wherein, described audio output apparatus comprises at least 2 in earphone, loudspeaker, receiver and bluetooth earphone.
Wherein, described output module comprises:
Acquiring unit, for obtaining the MUX by selecting interface to be connected with described audio frequency apparatus, is the audio output apparatus that described more than 2 audio streams are selected respectively; Wherein, the other end of described MUX is connected with described multiple audio output apparatus respectively.
Wherein, described more than 2 audio streams are the audio stream of different audio file.
The embodiment of the present invention also provides a kind of terminal, comprises terminal audio frequency playing device as above.
Technique scheme of the present invention at least has following beneficial effect:
In the terminal audio frequency player method of the embodiment of the present invention, interface is selected by providing audio frequency apparatus, make user freely can control the output device of audio file, achieve a terminal device can export multiple audio-frequency information by different audio output apparatus simultaneously, improve Consumer's Experience.
Embodiment
For making the technical problem to be solved in the present invention, technical scheme and advantage clearly, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
The present invention is directed to the program immobilization that prior art sound intermediate frequency plays logic, the problem that user cannot arbitrarily control, a kind of terminal audio frequency player method, device and terminal are provided, interface is selected by providing audio frequency apparatus, make user freely can control the output device of audio file, achieve a terminal device can export multiple audio-frequency information by different audio output apparatus simultaneously, improve Consumer's Experience.
As shown in Figure 1, the embodiment of the present invention provides a kind of terminal audio frequency player method, is applied to the terminal comprising multiple audio output apparatus, comprises:
Step 1, when detecting that the audio stream of more than 2 exports, selects interface at the display screen display audio frequency apparatus of described terminal;
Step 2, obtains and selects interface to be the audio output apparatus that described more than 2 audio streams are selected respectively by described audio frequency apparatus, and controls the described audio output apparatus that the unlatching of described terminal is respectively described more than 2 audio streams selection, output audio file.
In the above embodiment of the present invention, audio frequency apparatus selects selectable audio output apparatus in interface can comprise all audio output apparatus of this terminal, when user selects at the audio output apparatus used, this audio output apparatus of prompting user uses, and can not select; Also can comprise other audio output apparatus except the audio output apparatus used, then this audio frequency apparatus selects all audio output apparatus in interface all can be selected, and normal output audio file.
Wherein, audio frequency apparatus selects the concrete method to set up at interface to be in file browser (audio file), increase the right-click menu item of audio file " from XX device plays ", provides the option selecting output device when playing per song in music player; Also can provide in telephone interface the option controlling call audio output apparatus; Also the output device etc. of certain class audio frequency can be controlled in arranging, in this citing that differs; The all audio file of this equipment all can arrange the option that corresponding output device is selected.
Concrete, such as, a people is when terminal video, the sound of video plays from loudspeaker Speaker, if at this moment another wants to listen song by bluetooth earphone, then opens music player played songs, then at other the audio output apparatus of display screen display of described terminal, user then opens bluetooth earphone and exports song after selecting interface to select bluetooth earphone by audio frequency apparatus, then two people see video and listen song can not interact.
Further, control to be opened its equipment by the interface parameters calling audio output apparatus when described terminal opens the described audio output apparatus being respectively more than 2 audio streams selections, then transmit its audio stream that need play, realize the broadcasting of audio file.Concrete, the Bluetooth transmission as audio stream can be transmitted by pulse code modulation (PCM) pcm interface, also can be transmitted by simulation asynchronous receiving-transmitting transmitter UART.
Needs illustrate, if terminal only exports an audio file, then acquiescence adopts the logic in Audio Policy to select audio output apparatus; The operation steps of user can be reduced like this, more meet the design of hommization.Wherein, Audio Policy Service is two one of services greatly of Android audio system, and another service is Audio Flinger, and this two large service all has Media Sever to load when system starts.The managing audio data process of Audio Flinger primary responsibility and the work relevant with hardware abstraction layer; Audio Policy Service mainly completes following task: JAVA application layer passes through JNI, via Audio Policy Service interface, the setting of the switching volume/audio frequency parameter of the audio frequency strategy (strategy) of the connection status system of the import of services output device that access Audio Policy Service provides.
In the above embodiment of the present invention, described audio output apparatus comprises at least 2 in earphone, loudspeaker, receiver and bluetooth earphone.
In specific embodiments of the invention, earphone, loudspeaker, receiver and bluetooth earphone, only for specifically describing embodiments of the invention, are not used in display protection scope of the present invention.Other the audio output apparatus that may occur in the future as WIFI player, USB sound equipment etc. is all applicable in embodiments of the present invention, and all can arrive the similar beneficial effect of identical Hu.
In the above embodiment of the present invention, step 2 specifically comprises:
Step 21, obtaining the MUX by selecting interface to be connected with described audio frequency apparatus, is the audio output apparatus that described more than 2 audio streams are selected respectively; Wherein, the other end of described MUX is connected with described multiple audio output apparatus respectively.
In the above embodiment of the present invention, concrete, audio frequency apparatus selects interface to be connected with a MUX, then connects multiple audio output apparatus; Gating arbitrary road audio output apparatus is carried out by MUX, but such scheme is only preferred embodiment of the present invention, other can the method for correct gating arbitrary road audio output apparatus all applicable in embodiments of the present invention, such as audio frequency apparatus selects interface by calling a certain interface parameters, the audio output apparatus that this interface parameters of gating is corresponding; Or audio frequency apparatus selects interface by a certain particular code or programming realization gating audio output apparatus etc., does not repeat one by one at this.
In the above embodiment of the present invention, described more than 2 audio streams are the audio stream of different audio file.
In the specific embodiment of the invention, the audio stream of different audio file comprises different songs, different videos, song and video, song and call, video and call etc., such as user can play two songs in terminal simultaneously, and set a head and export from earphone, another head exports from bluetooth earphone, then the broadcasting of two songs is independent of each other; Or user from the process that earphone is listened to the music, has telephone access, then user can receive calls by choice for use bluetooth earphone, then do not affect the broadcasting of music, more meets the design of hommization, improves Consumer's Experience.
In order to better realize above-mentioned purpose, as shown in Figure 2, the embodiment of the present invention also provides a kind of terminal audio frequency playing device, is applied to the terminal comprising multiple audio output apparatus, comprises:
Detection module 10, during for detecting that the audio stream of more than 2 exports, selects interface at the display screen display audio frequency apparatus of described terminal;
Output module 20, interface is selected to be the audio output apparatus that described more than 2 audio streams are selected respectively for obtaining by described audio frequency apparatus, and control the described audio output apparatus that the unlatching of described terminal is respectively described more than 2 audio streams selection, output audio file.
Wherein, in the above embodiment of the present invention, described audio output apparatus comprises at least 2 in earphone, loudspeaker, receiver and bluetooth earphone.
Further, in the embodiment of the present invention, described output module 20 comprises:
Acquiring unit, for obtaining the MUX by selecting interface to be connected with described audio frequency apparatus, is the audio output apparatus that described more than 2 audio streams are selected respectively; Wherein, the other end of described MUX is connected with described multiple audio output apparatus respectively.
Further, in the above embodiment of the present invention, described more than 2 audio streams are the audio stream of different audio file.
In the terminal audio frequency player method of the above embodiment of the present invention, interface is selected by providing audio frequency apparatus, make user freely can control the output device of audio file, achieve a terminal device can export multiple audio-frequency information by different audio output apparatus simultaneously, improve Consumer's Experience.
The terminal plays device needing the embodiment of the present invention illustrated to provide is the device of application the method, then all embodiments of said method are all applicable to this device, and all can arrive same or analogous beneficial effect.
In order to better realize above-mentioned purpose, the embodiment of the present invention also provides a kind of terminal, comprises terminal audio frequency playing device as above.
The terminal that the embodiment of the present invention provides is the terminal comprising said apparatus, then all embodiments of said apparatus and method and beneficial effect thereof are all applicable to this terminal.
Terminal described in the embodiment of the present invention can be mobile terminal, and as mobile phone, panel computer etc., can be also other-end, as desktop computer etc., not repeat one by one at this.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the prerequisite not departing from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.