CN110413252A - A kind of audio-frequency inputting method and its device, terminal - Google Patents

A kind of audio-frequency inputting method and its device, terminal Download PDF

Info

Publication number
CN110413252A
CN110413252A CN201910605369.8A CN201910605369A CN110413252A CN 110413252 A CN110413252 A CN 110413252A CN 201910605369 A CN201910605369 A CN 201910605369A CN 110413252 A CN110413252 A CN 110413252A
Authority
CN
China
Prior art keywords
audio
operating system
output apparatus
data type
status
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
CN201910605369.8A
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.)
Cloudminds Shenzhen Robotics Systems Co Ltd
Cloudminds Inc
Original Assignee
Cloudminds Inc
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 Cloudminds Inc filed Critical Cloudminds Inc
Priority to CN201910605369.8A priority Critical patent/CN110413252A/en
Publication of CN110413252A publication Critical patent/CN110413252A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output

Abstract

The present embodiments relate to virtual machine technique field, a kind of audio-frequency inputting method and its device, terminal are disclosed.Wherein, this method comprises: obtaining the corresponding audio data type of the audio play instruction when detecting the audio play instruction that any operation system issues;Obtain the audio status of current each operating system;According to the corresponding audio data type of the audio play instruction of acquisition, the audio status of current each operating system, and based on the corresponding relationship between audio data type, the audio status and audio output apparatus of each operating system, audio output apparatus is determined.By the above-mentioned means, the embodiment of the present invention, which realizes, rationally determines audio output apparatus.

Description

A kind of audio-frequency inputting method and its device, terminal
Technical field
The present embodiments relate to virtual machine technique fields, and in particular to a kind of audio-frequency inputting method and its device, terminal.
Background technique
Mobile virtual technology allows multiple operating systems or virtual machine to be run simultaneously on mobile terminals, using virtual Monitor (Virtual Machine Monitor, VMM) creates the independent software runtime environment of safety on the underlying hardware.It is logical Mobile virtual technology is crossed, user can access multiple without carrying two or more mobile devices on a mobile terminal Operating system.
Conventional virtual machine all creates respective virtual audio device, and it is hard by virtualization technology to control true audio Part equipment.When exporting audio, traditional technology can not can not rationally determine audio output apparatus.
Summary of the invention
One purpose of the embodiment of the present application is intended to provide a kind of audio-frequency inputting method and its device, terminal, and which solve biographies System technology, which there is technical issues that cannot achieve, rationally to be determined.
According to an aspect of an embodiment of the present invention, a kind of audio-frequency inputting method is provided, which comprises detect When the audio play instruction that any operation system issues, the corresponding audio data type of the audio play instruction is obtained;It obtains The audio status of current each operating system;According to the corresponding audio data type of the audio play instruction of acquisition, current each The audio status of operating system, and based between audio data type, the audio status and audio output apparatus of each operating system Corresponding relationship, determine audio output apparatus.
In a kind of optional mode, the method also includes: establish the sound of the audio data type, each operating system Corresponding relationship between frequency state and audio output apparatus.
In a kind of optional mode, the operating system includes host operating system and guest operating systems.
In a kind of optional mode, the method also includes: audio is played using determining audio output apparatus.
It is described to play audio using determining audio output apparatus in a kind of optional mode, it specifically includes: the master Machine operating system plays audio using the audio output apparatus that the host operating system determines.
In a kind of optional mode, the audio output apparatus includes loudspeaker, speaker and/or earphone.
According to another aspect of an embodiment of the present invention, a kind of audio output device is provided, comprising: type acquisition module, When for detecting the audio play instruction of any operation system sending, the corresponding audio data of the audio play instruction is obtained Type;State acquisition module, for obtaining the audio status of current each operating system;Output equipment determining module is used for basis The audio status of the corresponding audio data type of the audio play instruction, current each operating system that obtain, and it is based on audio Corresponding relationship between data type, the audio status and audio output apparatus of each operating system, determines audio output apparatus.
In a kind of optional mode, described device further include: relationship establishes module, for establishing the audio data class Corresponding relationship between type, the audio status and audio output apparatus of each operating system.
In a kind of optional mode, the operating system includes host operating system and guest operating systems.
In a kind of optional mode, described device further include: playing module, for using determining audio output apparatus Play audio.
In a kind of optional mode, the playing module is specifically used for: the host operating system uses host service function The audio output apparatus that system determines plays audio.
In a kind of optional mode, the audio output apparatus includes loudspeaker, speaker and/or earphone.
According to another aspect of an embodiment of the present invention, a kind of terminal is provided, comprising: processor, memory, communication interface And communication bus, the processor, the memory and the communication interface complete mutual lead to by the communication bus Letter;
For the memory for storing an at least executable instruction, it is above-mentioned that the executable instruction executes the processor The step of audio-frequency inputting method.
Another aspect according to an embodiment of the present invention provides a kind of computer storage medium, deposits in the storage medium Contain an at least executable instruction, the step of executable instruction makes the processor execute above-mentioned audio-frequency inputting method.
The embodiment of the present invention is played by when detecting the audio play instruction that any operation system issues, obtaining audio Corresponding audio data type is instructed, and obtains the audio status of current each operating system, according to the audio play instruction of acquisition The audio status of corresponding audio data type, current each operating system, and the sound based on audio data type, each operating system Corresponding relationship between frequency state and audio output apparatus, determines audio output apparatus, can rationally determine audio output apparatus, So as to rationally export audio.
Above description is only the general introduction of technical solution of the embodiment of the present invention, in order to better understand the embodiment of the present invention Technological means, and can be implemented in accordance with the contents of the specification, and in order to allow above and other mesh of the embodiment of the present invention , feature and advantage can be more clearly understood, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is that the embodiment of the present invention provides a kind of schematic diagram of virtualization model;
Fig. 2 is the host operating system under existing android system and the audio processing process between guest operating systems Schematic diagram;
Fig. 3 shows a kind of flow diagram of audio-frequency inputting method provided in an embodiment of the present invention;
Fig. 4 shows a kind of flow diagram of the application environment of audio-frequency inputting method provided in an embodiment of the present invention;
Fig. 5 show another embodiment of the present invention provides a kind of audio-frequency inputting method application environment process signal Figure;
Fig. 6 shows a kind of structural schematic diagram of audio output device provided in an embodiment of the present invention;
Fig. 7 shows a kind of structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here It is limited.It is to be able to thoroughly understand the present invention on the contrary, providing these embodiments, and can be by the scope of the present invention It is fully disclosed to those skilled in the art.
Audio-frequency inputting method provided by the embodiments of the present application is applied to terminal, can be permitted by mobile virtual technology Many a virtual opetrating systems or virtual machine (Virtual Machine, VM) are run at the terminal simultaneously.Pass through mobile virtual Technology bring isolation can realize the isolation on single terminal end between multiple virtual opetrating systems or virtual machine, avoid each void Process in quasi- operating system or virtual machine has an adverse effect to other virtual opetrating systems or virtual machine.For example, lead to Crossing mobile virtual technology has personal virtual operating system and enterprise virtual operating system in running of mobile terminal, and realizes individual Being isolated between virtual opetrating system and enterprise virtual operating system, can take precautions against process in personal virtual operating system to Enterprise virtual operating system bring potential hazard meets some enterprises with safety requirements to " from carrying device (Bring Your Own Device, BYOD) " demand.
Referring to Fig. 1, Fig. 1 is that the embodiment of the present invention provides a kind of schematic diagram of virtualization model.As shown in Figure 1, the void Quasi-ization model 100 includes hardware system layer 11, monitor of virtual machine 12 (Hypervisor/VMM) and virtual machine layer 13.
Hardware system layer 11 includes processor 111, memory 112 and input-output apparatus 113.Processor 111 passes through bus It is connect respectively with memory 112 and input-output apparatus 113.
Control core of the processor 111 as mobile terminal, can be central processing unit (Central Processing Unit, referred to as " CPU "), it can also be other general processors, digital signal processor (DSP), dedicated Integrated circuit (ASIC), ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor Logical device, discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any routine Processor etc..
Memory 112 can be random storage as the associated control logic instruction of mobile terminal and the memory block of data Device, flash memory, read-only memory, this fields such as programmable read only memory or electrically erasable programmable memory, register at Ripe storage medium.
Input-output apparatus 113 can be any suitable type, provide the outer of one or more kinds of user's interactive modes Peripheral equipment, such as mouse, keyboard or the touch input screen of user action operational order are received, for acquiring the body of image information Feel video camera, the microphone for acquiring acoustic information or to the display screen of user's displaying image information or for exporting sound The loudspeaker of frequency.Input-output apparatus 113 can choose to be set using wired or wireless peripheral equipment and other physical hardwares Standby connection.
Monitor of virtual machine 12 is permitted as a kind of intermediate software layer operated between hardware system layer and operating system Many a operating systems and a set of underlying physical hardware of Application share, therefore monitor of virtual machine 12 can be regarded as virtual environment In " member " operating system, can coordinate access mobile terminal on all physical equipments and virtual machine.Therefore, virtual machine is supervised Control device 12 can manage true physical hardware platform, and provide corresponding virtual hardware platform for each virtual machine.Virtual machine Monitor 12 realizes aforementioned function by host (Host), wherein a host virtual machine (Host VM) is run on host, in the void Operation has host operating system (Host OS) on quasi- machine.
Referring again to Fig. 1, virtual machine layer 13 includes 3 virtual machines, and each virtual machine can all be regarded as one small and complete Computer system, all with oneself " system hardware ", wherein it is somebody's turn to do " system hardware " and is simulated by software, " system hardware " Including processor, memory and input-output equipment.In this computer system, virtual machine runs the guest operating systems of itself (Guest OS).It is understood that the quantity of virtual machine can be selected according to practical situations, the present invention is without limitation.
Host operating system and guest operating systems belong to manage and control each physical hardware in hardware system layer and set The computer program of standby and corresponding software resource is the most basic system software run directly on " bare machine ", any Other software must could all be run under the support of host operating system or guest operating systems.In the embodiment of the present application, Host operating system and guest operating systems may each be Android operation system.
Physical hardware devices in hardware system layer are shared between host operating system and several guest operating systems.In When actual motion, host operating system can be directly using the physical hardware devices in hardware system layer, and guest operating systems Then use the virtual unit by driving the virtual machine of the guest operating systems to provide.One virtual machine is corresponding to drive a passenger plane behaviour Make system, each virtual machine can be used as the operation of one of application program in host operating system.
The present embodiment elaborates the audio frame under android system using virtual machine operation android system as example Frame.Referring to Fig. 2, Fig. 2 is the host operating system under android system and the audio processing process between guest operating systems Schematic diagram.As shown in Fig. 2, the audio frame of host operating system or guest operating systems all includes application layer In (application framework), local ccf layer (native framework), hardware abstraction layer (HAL) and Linux Core (Linux Kernel).
Application layer includes user oriented all kinds of audio applications, such as media play-back application (media Player APP) or media recording application program (media recorder App), wherein media play-back application or media Recording application program includes music player, video player etc..The audio data of media play-back application can be by matchmaker Body play-back application is obtained locally interior, can also obtain online etc..Media recording application program is used for recording audio number According to, wherein the audio data can be collected by microphone, can also be acquired from communication process.
Local ccf layer includes playback interface module (AudioTrack), recording access module (AudioRecord) broadcasting Interface module recording access module and audio service (Audio Policy Service, Audio Flinger Service). Audio service is the maker of audio broadcast strategy and the processor of audio data.
Hardware abstraction layer (HAL) provides the interface for arriving hardware, calls for the local ccf layer of audio.Hardware abstraction layer is appointed Business is veritably to be associated with audio service with hardware device.
Linux inner core includes kernel device drive layer, provides api interface, application program is by calling the api interface It can complete the control to underlying audio hardware.
It is understood that the present embodiment does not make complete Jie to each layer in the audio frame under android system It continues, the content that those skilled in the art instruct and guide according to the present embodiment can all make due detailed description, to realize this implementation The technical solution that example is illustrated.
Referring again to Fig. 2, when host operating system or guest operating systems need to play audio, it is for each operation System, the treatment process of audio stream are all carried out according to the audio frame under android system.As shown in Fig. 2, guest operating systems Audio processing is by monitor of virtual machine to operate true audio frequency apparatus.For host operating system, it is also required to grasp Make true audio frequency apparatus, however, traditional technology can not rationally determine sound when exporting audio in the case where there are multiple systems Frequency output equipment, so that audio can not be exported rationally.
Based on this, the embodiment of the present application provides a kind of terminal, and the hardware environment of the terminal can refer to above-mentioned each implementation Elaboration made by example.In the embodiment of the present application, terminal can run host operating system and several passenger planes behaviour simultaneously Make system, for example, one host operating system of terminal operating and three guest operating systems, as previously mentioned, each operating system All there is corresponding virtual hardware equipment.Generally, the quantity of client operating system can be one herein, can also be two, very The operation quantity of client operating system can be not intended to limit herein to be multiple.
Fig. 3 shows a kind of flow diagram of audio-frequency inputting method provided in an embodiment of the present invention.This method is applied to Above-mentioned terminal, this method comprises:
Step 310, detect any operation system issue audio play instruction when, obtain audio play instruction it is corresponding Audio data type.
Wherein, when the application-specific of host operating system or guest operating systems meets preset audio playing condition When, generate audio play instruction.For example, when reaching the pre-set alarm clock of the alarm clock application program of guest operating systems at time point Between when putting, alarm clock application program just generates audio play instruction, to play ring of alarm clock.For another example the sound of host operating system When happy application program receives the music instruction of user's input, music application just generates audio play instruction, to broadcast It puts the music on.
Wherein, audio play instruction corresponds to the audio data type of the audio data of broadcasting in need, for example, alarm clock application The audio play instruction that program generates, corresponding audio data type are directed toward ring of alarm clock;In another example music application generates Audio play instruction, corresponding audio data type is directed toward music.
Wherein, step 310 can execute in host operating system, can also execute on guest operating systems, when it When executing in host operating system, host operating system can detecte what host operating system or guest operating systems issued Audio play instruction, when it is executed on guest operating systems, guest operating systems can detecte host operating system or The audio play instruction that guest operating systems issue.
It is corresponding with output equipment just like audio data type shown in Fig. 2 to close due in different operating system System, therefore, before step 310, this method further include: host operating system establishes audio number related with guest operating systems According to type, alternatively, guest operating systems establish audio data type related with host operating system.Wherein, foundation and passenger plane The related audio data type of operating system, such as: AUDIO_STREAM_GUEST, AUDIO_STREAM_GUEST_VOICE_ CALL、AUDIO_STREAM_GUEST_SYSTEM、AUDIO_STREAM_GUEST_RING、AUDIO_STREAM_GUEST_ MUSIC etc..
In the present embodiment, step 310 is specifically as follows: establishing audio data type related with guest operating systems Afterwards, when host operating system detects the audio play instruction that guest operating systems issue, it is corresponding to obtain audio play instruction Audio data type.For example, it is assumed that the music application of guest operating systems generates audio play instruction, host operating system After the audio play instruction for detecting guest operating systems, obtaining the corresponding audio data type of the audio play instruction is AUDIO_STREAM_GUEST_MUSIC。
Step 320, the audio status for obtaining current each operating system.
Wherein, due to the exportable audio play instruction of each operating system to control audio output apparatus, when operation is When system output audio play instruction, output equipment is determined in conjunction with the audio status of each operating system.In the present embodiment, step 320 are specifically as follows: host operating system obtains current each operating system (including host operating system and guest operating systems) Audio status.Wherein, audio status includes audio broadcast state and audio frequency apparatus connection status, and audio broadcast state refers specifically to Whether there is audio to play, play by which kind of output equipment, whether audio frequency apparatus connection status refers to has external audio frequency output to set It is standby.For example, host operating system, which gets a current wherein guest operating systems, plays music using loudspeaker, then this is got The audio status of guest operating systems is loudspeaker output;In another example host operating system gets host operating system connection Earphone, then the audio status for getting host operating system is peripheral earphone.
Step 330, the corresponding audio data type of audio play instruction according to acquisition, the audio of current each operating system State, and based on the corresponding relationship between audio data type, the audio status and audio output apparatus of each operating system, it determines Audio output apparatus.
Wherein, audio output apparatus may include loudspeaker, earphone, and/or speaker etc..Work as audio for example, presetting Data type is AUDIO_STREAM_GUEST_MUSIC, and the audio status of host operating system is external bluetooth headset, corresponding Audio output apparatus be loudspeaker;In another example presetting when audio data type is AUDIO_STREAM_GUEST_ RING, the audio status of host operating system are external wired earphone, and corresponding audio output apparatus is earphone.
Wherein, before step 330, this method further include: establish the audio status of audio data type, each operating system Corresponding relationship between audio output apparatus.Wherein, audio data type, the audio status and audio output of each operating system Corresponding relationship between equipment is pre-set audio routing policy, can be arranged or be gone out according to general case by producer User is freely arranged according to their own needs after factory.
In the present embodiment, step 330 is specifically as follows: host operating system is corresponding according to the audio play instruction of acquisition Audio data type, the audio status of host operating system and guest operating systems, and based on audio data type, each operation Corresponding relationship between the audio status and audio output apparatus of system, determines audio output apparatus.
Step 340 plays audio using determining audio output apparatus.
After determining audio output apparatus, host operating system plays audio using identified audio output apparatus.Example Such as, if guest operating systems issue audio play instruction, after determining audio output apparatus, host operating system is used and is determined Audio output apparatus play audio.
Wherein, step 340 further include: when audio play instruction is that guest operating systems issue, guest operating systems will Audio data is sent to host operating system, so that host operating system plays audio using determining audio output apparatus.
Wherein, step 310, step 320 and step 330 are executed by host operating system, then step 340 is specifically as follows: Host operating system plays audio using the audio output apparatus that host operating system determines.
In some other embodiments, before determining audio output apparatus, the operating system of audio play instruction is issued The audio output apparatus for currently having controlled default plays audio, then before step 340, this method further include: judgement issues Whether the currently used audio output apparatus of the operating system of audio play instruction and the audio output apparatus determined are identical;If no Together, then currently used audio output apparatus is stopped using to play audio.For example, guest operating systems it is currently used audio it is defeated Equipment is loudspeaker out, and after issuing audio play instruction, host operating system determines that audio output apparatus is earphone, judges to issue The currently used audio output apparatus of the operating system of audio play instruction and the audio output apparatus determined be not identical, then stops Audio is played using loudspeaker.
In some other embodiments, step 340 can be with are as follows: guest operating systems are determined using host operating system Audio output apparatus plays audio.
In the present embodiment, which passes through in the audio play instruction for detecting that any operation system issues When, the corresponding audio data type of audio play instruction is obtained, and obtain the audio status of current each operating system, according to acquisition The corresponding audio data type of audio play instruction, the audio status of current each operating system, and based on audio data type, Corresponding relationship between the audio status and audio output apparatus of each operating system, determines audio output apparatus, thus existing When exporting audio in the case where multiple systems, audio output apparatus can be reasonably determined, to rationally export audio.
It should be noted that rationally output audio refers to the use that can also reach as single system when there are multiple systems Family experience, and keep the independence of the audio routing policy of each system.For example, when there are multiple systems the case where, it is existing There is the audio-frequency inputting method in technology to be exported only according to the respective audio routing policy of individual system, then it is defeated to have audio Out tactful unreasonable situation (for example, when guest operating systems play quarter-bell, guest operating systems audio Route Selection it is defeated Equipment is loudspeaker and earphone out, and host operating system is just conversed using earphone at this time) so that user experience is not It is good;And audio-frequency inputting method in the present embodiment it is contemplated that each system audio status, to make that there are multiple systems When can also reach the same user experience of single system (for example, when guest operating systems play quarter-bell when, it is contemplated that host service function system System is just conversed using earphone, it is determined that audio output apparatus is earphone), user experience is improved, to rationally export sound Frequently.
Fig. 4 shows a kind of flow diagram of the application environment of audio-frequency inputting method provided in an embodiment of the present invention.It should Method is applied to above-mentioned terminal, and terminal operating has a host operating system and a guest operating systems, host service function system System is connected with bluetooth headset, between preset audio data type, the audio status and audio output apparatus of each operating system Corresponding relationship are as follows: when audio data type is AUDIO_STREAM_GUEST_MUSIC, the audio status of host operating system is External bluetooth headset, corresponding audio output apparatus are loudspeaker.This method comprises:
Step 410, guest operating systems receive user to the broadcasting control instruction of music application, then music application Program generates audio play instruction, and host operating system detects that guest operating systems issue audio play instruction, obtains the sound The corresponding audio data type of frequency play instruction is AUDIO_STREAM_GUEST_MUSIC;
Step 420, host operating system obtain the audio status of current each operating system are as follows: the external indigo plant of host operating system Tooth earphone, without output, guest operating systems are without external equipment and without audio output;
Step 430, host operating system are according to the corresponding audio data type of audio play instruction of acquisition, currently each behaviour Make the audio status of system, and based between audio data type, the audio status and audio output apparatus of each operating system Corresponding relationship determines that audio output apparatus is loudspeaker;
Music data is sent to host operating system by step 440, guest operating systems, and host operating system uses loudspeaking Device plays music.
In the present embodiment, which passes through in the audio play instruction for detecting that any operation system issues When, the corresponding audio data type of audio play instruction is obtained, and obtain the audio status of current each operating system, according to acquisition The corresponding audio data type of audio play instruction, the audio status of current each operating system, and based on audio data type, Corresponding relationship between the audio status and audio output apparatus of each operating system, determines audio output apparatus, thus existing When exporting audio in the case where multiple systems, audio output apparatus can be rationally determined, to rationally export audio.
Fig. 5 show another embodiment of the present invention provides a kind of audio-frequency inputting method application environment process signal Figure.This method is applied to above-mentioned terminal, and terminal operating has a host operating system and a guest operating systems, host behaviour Be connected with wired earphone as system, preset audio data type, the audio status of each operating system and audio output apparatus it Between corresponding relationship are as follows: when audio data type be AUDIO_STREAM_GUEST_RING, the audio status of host operating system For external wired earphone, there is output, corresponding audio output apparatus is earphone.This method comprises:
Step 510, guest operating systems receive user setting to the quarter-bell control instruction of alarm clock application program, then alarm clock Application program generates audio play instruction, and host operating system detects that guest operating systems issue audio play instruction, obtains The corresponding audio data type of the audio play instruction is AUDIO_STREAM_GUEST_RING;
Step 520, host operating system obtain the audio status of current each operating system are as follows: host operating system is circumscribed with Line earphone has output (host operating system is used earphone and converses), the external wired earphone of guest operating systems and nothing Audio output;
Step 530, host operating system are according to the corresponding audio data type of audio play instruction of acquisition, currently each behaviour Make the audio status of system, and based between audio data type, the audio status and audio output apparatus of each operating system Corresponding relationship determines that audio output apparatus is earphone;
Quarter-bell data are sent to host operating system by step 540, guest operating systems, and host operating system uses earphone Play quarter-bell.
In the present embodiment, which passes through in the audio play instruction for detecting that any operation system issues When, the corresponding audio data type of audio play instruction is obtained, and obtain the audio status of current each operating system, according to acquisition The corresponding audio data type of audio play instruction, the audio status of current each operating system, and based on audio data type, Corresponding relationship between the audio status and audio output apparatus of each operating system, determines audio output apparatus, thus existing When exporting audio in the case where multiple systems, audio output apparatus can be rationally determined, to rationally export audio.
Fig. 6 shows a kind of structural schematic diagram of audio output device provided in an embodiment of the present invention.The device is applied to Above-mentioned terminal, the device 600 include: type acquisition module 610, state acquisition module 620, output equipment determining module 630 With playing module 640.
Wherein, when type acquisition module 610 is used to detect the audio play instruction that any operation system issues, sound is obtained The corresponding audio data type of frequency play instruction;State acquisition module 620 is used to obtain the audio status of current each operating system; Output equipment determining module 630 is used for the corresponding audio data type of audio play instruction according to acquisition, current each operation system The audio status of system, and based on the correspondence between audio data type, the audio status and audio output apparatus of each operating system Relationship determines audio output apparatus;Playing module 640 is used to play audio using determining audio output apparatus.
Wherein, operating system includes host operating system and guest operating systems.
Wherein, audio output apparatus may include loudspeaker, earphone, and/or speaker etc..
In some embodiments, device 600 further include: relationship establishes module, for establishing audio data type, each behaviour Make the corresponding relationship between the audio status of system and audio output apparatus.
In some embodiments, playing module 640 is specifically used for: host operating system is determined using host operating system Audio output apparatus plays audio.
In some embodiments, device 600 further include: judgment module and stopping modular.Judgment module 6 is for judging hair Whether the currently used audio output apparatus of the operating system of audio play instruction and the audio output apparatus determined are identical out;Stop Only module is used for if it is different, currently used audio output apparatus is then stopped using to play audio.
It should be noted that audio playing apparatus provided in an embodiment of the present invention is to be able to carry out above-mentioned audio frequency playing method Device, then all embodiments of above-mentioned audio frequency playing method are suitable for the device, and can reach the same or similar and have Beneficial effect.
In the present embodiment, which passes through in the audio play instruction for detecting that any operation system issues When, the corresponding audio data type of audio play instruction is obtained, and obtain the audio status of current each operating system, according to acquisition The corresponding audio data type of audio play instruction, the audio status of current each operating system, and based on audio data type, Corresponding relationship between the audio status and audio output apparatus of each operating system, determines audio output apparatus, thus existing When exporting audio in the case where multiple systems, audio output apparatus can be rationally determined, to rationally export audio.
The embodiment of the invention provides a kind of computer storage medium, it is executable that at least one is stored in the storage medium Instruction, the executable instruction make processor execute the audio-frequency inputting method in above-mentioned any means embodiment.
The present embodiment is by obtaining audio play instruction when detecting the audio play instruction that any operation system issues Corresponding audio data type, and the audio status of current each operating system is obtained, it is corresponding according to the audio play instruction of acquisition Audio data type, the audio status of current each operating system, and the audio shape based on audio data type, each operating system Corresponding relationship between state and audio output apparatus, determines audio output apparatus, thus defeated there are multiple systems Out when audio, audio output apparatus can determine, to rationally export audio.
The embodiment of the invention also provides a kind of computer program product, the computer program product includes being stored in meter Computer program on calculation machine storage medium, the computer program include program instruction, when described program is instructed by computer When execution, the computer is made to execute the audio-frequency inputting method in above-mentioned any means embodiment.
The present embodiment is by obtaining audio play instruction when detecting the audio play instruction that any operation system issues Corresponding audio data type, and the audio status of current each operating system is obtained, it is corresponding according to the audio play instruction of acquisition Audio data type, the audio status of current each operating system, and the audio shape based on audio data type, each operating system Corresponding relationship between state and audio output apparatus, determines audio output apparatus, thus defeated there are multiple systems Out when audio, audio output apparatus can be rationally determined, to rationally export audio.
Fig. 7 shows a kind of structural schematic diagram of terminal provided in an embodiment of the present invention.The specific embodiment of the invention is not The specific implementation of terminal is limited.
As shown in fig. 7, the terminal may include: processor (processor) 702, communication interface (Communications Interface) 704, memory (memory) 706 and communication bus 708.
Wherein: processor 702, communication interface 704 and memory 706 complete mutual lead to by communication bus 708 Letter.Communication interface 704, for being communicated with the network element of other equipment such as client or other servers etc..Processor 702 is used In executing program 710, the above-mentioned audio frequency playing method in any means embodiment can be specifically executed.
Specifically, program 710 may include program code, which includes computer operation instruction.
Processor 702 may be central processor CPU or specific integrated circuit ASIC (Application Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention Road.The one or more processors that terminal includes can be same type of processor, such as one or more CPU;It is also possible to Different types of processor, such as one or more CPU and one or more ASIC.
Memory 706, for storing program 710.Memory 706 may include high speed RAM memory, it is also possible to further include Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 710 specifically can be used for so that processor 702 executes following operation: detect what any operation system issued When audio play instruction, the corresponding audio data type of audio play instruction is obtained;Obtain the audio shape of current each operating system State;According to the corresponding audio data type of the audio play instruction of acquisition, the audio status of current each operating system, and it is based on sound Corresponding relationship between frequency data type, the audio status and audio output apparatus of each operating system, determines audio output apparatus; The operating system for issuing audio play instruction plays audio using determining audio output apparatus.
Wherein, operating system includes host operating system and guest operating systems.
Wherein, audio output apparatus may include loudspeaker, earphone, and/or speaker etc..
In a kind of optional mode, program 710 makes processor 702 execute following operation: establishing audio data type, each Corresponding relationship between the audio status and audio output apparatus of operating system.
In a kind of optional mode, program 710 makes processor 702 execute following operation: issuing audio play instruction Operating system plays audio using the audio output apparatus that host operating system determines.
In a kind of optional mode, program 710 makes processor 702 execute following operation: judgement issues audio broadcasting and refers to Whether the currently used audio output apparatus of the operating system of order is identical as the audio output apparatus of the determination;If it is different, then Currently used audio output apparatus is stopped using to play audio.
The present embodiment is by obtaining audio play instruction when detecting the audio play instruction that any operation system issues Corresponding audio data type, and the audio status of current each operating system is obtained, it is corresponding according to the audio play instruction of acquisition Audio data type, the audio status of current each operating system, and the audio shape based on audio data type, each operating system Corresponding relationship between state and audio output apparatus, determines audio output apparatus, thus defeated there are multiple systems Out when audio, audio output apparatus can be rationally determined, to rationally export audio.
Algorithm or display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the embodiment of the present invention is also not for any particular programming language.It should be understood that can benefit Summary of the invention described herein is realized with various programming languages, and the description done above to language-specific is to drape over one's shoulders Reveal preferred forms of the invention.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the present invention and help to understand one or more of the various inventive aspects, In Above in the description of exemplary embodiment of the present invention, each feature of the embodiment of the present invention is grouped together into individually sometimes In embodiment, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: being wanted Ask protection the present invention claims features more more than feature expressly recited in each claim.More precisely, such as As following claims reflect, inventive aspect is all features less than single embodiment disclosed above. Therefore, it then follows thus claims of specific embodiment are expressly incorporated in the specific embodiment, wherein each right is wanted Ask itself all as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments in this include institute in other embodiments Including certain features rather than other feature, but the combination of the feature of different embodiment means in the scope of the present invention Within and form different embodiments.For example, in the following claims, embodiment claimed it is any it One can in any combination mode come using.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.Step in above-described embodiment should not be construed as the restriction to execution sequence in addition to having specified otherwise.

Claims (10)

1. a kind of audio-frequency inputting method characterized by comprising
When detecting the audio play instruction that any operation system issues, the corresponding audio data of the audio play instruction is obtained Type;
Obtain the audio status of current each operating system;
According to the corresponding audio data type of the audio play instruction of acquisition, the audio status of current each operating system, and Based on the corresponding relationship between audio data type, the audio status and audio output apparatus of each operating system, determine that audio is defeated Equipment out.
2. the method according to claim 1, wherein the method also includes:
Establish the corresponding relationship between the audio data type, the audio status and audio output apparatus of each operating system.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Audio is played using determining audio output apparatus.
4. according to the method described in claim 3, it is characterized in that, the operating system includes host operating system and passenger plane behaviour Make system.
5. according to the method described in claim 4, it is characterized in that, described play audio using determining audio output apparatus, It specifically includes:
The host operating system plays audio using the audio output apparatus that the host operating system determines.
6. a kind of audio output device characterized by comprising
Type acquisition module when for detecting the audio play instruction of any operation system sending, obtaining the audio and playing Instruct corresponding audio data type;
State acquisition module, for obtaining the audio status of current each operating system;
Output equipment determining module, for according to the corresponding audio data type of the audio play instruction of acquisition, current each The audio status of operating system, and based between audio data type, the audio status and audio output apparatus of each operating system Corresponding relationship, determine audio output apparatus.
7. device according to claim 6, which is characterized in that described device further include:
Relationship establishes module, for establishing the audio status and audio output apparatus of the audio data type, each operating system Between corresponding relationship.
8. device according to claim 6, which is characterized in that described device further include:
Playing module, for using determining audio output apparatus to play audio.
9. a kind of terminal characterized by comprising
Processor, memory, communication interface and communication bus, the processor, the memory and the communication interface pass through The communication bus completes mutual communication;
The memory executes the processor according to right for storing an at least executable instruction, the executable instruction It is required that the step of 1 to 5 described in any item audio-frequency inputting methods.
10. a kind of computer storage medium, an at least executable instruction, the executable instruction are stored in the storage medium The step of making processor execute audio-frequency inputting method according to any one of claims 1 to 5.
CN201910605369.8A 2019-07-05 2019-07-05 A kind of audio-frequency inputting method and its device, terminal Pending CN110413252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910605369.8A CN110413252A (en) 2019-07-05 2019-07-05 A kind of audio-frequency inputting method and its device, terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910605369.8A CN110413252A (en) 2019-07-05 2019-07-05 A kind of audio-frequency inputting method and its device, terminal

Publications (1)

Publication Number Publication Date
CN110413252A true CN110413252A (en) 2019-11-05

Family

ID=68360514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910605369.8A Pending CN110413252A (en) 2019-07-05 2019-07-05 A kind of audio-frequency inputting method and its device, terminal

Country Status (1)

Country Link
CN (1) CN110413252A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113286280A (en) * 2021-04-12 2021-08-20 沈阳中科创达软件有限公司 Audio data processing method and device, electronic equipment and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140115479A1 (en) * 2012-10-18 2014-04-24 Huawei Devices Co., Ltd. Audio Management Method and Apparatus
CN105630586A (en) * 2014-10-30 2016-06-01 联想(北京)有限公司 Information processing method and electronic device
CN106155625A (en) * 2016-07-06 2016-11-23 北京元心科技有限公司 A kind of audio frequency adaptation method and system
CN106293599A (en) * 2016-07-29 2017-01-04 联想(北京)有限公司 A kind of output control method, electronic equipment and output system
CN108541370A (en) * 2016-08-26 2018-09-14 华为技术有限公司 Export method, electronic equipment and the storage medium of audio
CN108781236A (en) * 2017-06-16 2018-11-09 华为技术有限公司 Audio frequency playing method and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140115479A1 (en) * 2012-10-18 2014-04-24 Huawei Devices Co., Ltd. Audio Management Method and Apparatus
CN105630586A (en) * 2014-10-30 2016-06-01 联想(北京)有限公司 Information processing method and electronic device
CN106155625A (en) * 2016-07-06 2016-11-23 北京元心科技有限公司 A kind of audio frequency adaptation method and system
CN106293599A (en) * 2016-07-29 2017-01-04 联想(北京)有限公司 A kind of output control method, electronic equipment and output system
CN108541370A (en) * 2016-08-26 2018-09-14 华为技术有限公司 Export method, electronic equipment and the storage medium of audio
CN108781236A (en) * 2017-06-16 2018-11-09 华为技术有限公司 Audio frequency playing method and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113286280A (en) * 2021-04-12 2021-08-20 沈阳中科创达软件有限公司 Audio data processing method and device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
CN109313566A (en) A kind of audio frequency playing method and its device, mobile terminal of virtual machine
CN104246659B (en) The gesture object that can be instantiated
CN104040529B (en) Device and method for configuration management in cloud migration
CN105453097B (en) Constrained driver platform runs driver in sandbox in the user mode
US11238386B2 (en) Task derivation for workflows
US20140351811A1 (en) Datacenter application packages with hardware accelerators
CN109313575A (en) Service in cloud computing system provides
US11562258B2 (en) Multi-dimensional cognition for unified cognition in cognitive assistance
CN108369504A (en) It is distributed to the update by model-driven of variation topology
CN110225246B (en) Event script generation method and device, electronic equipment and computer readable storage medium
CN106575243A (en) Hypervisor-hosted virtual machine forensics
US20190258941A1 (en) Unified cognition for a virtual personal cognitive assistant of an entity when consuming multiple, distinct domains at different points in time
CN103927091B (en) The method, apparatus and system of a kind of human-computer interaction
CN108124475A (en) Virtual system Bluetooth communication method and device, virtual system, storage medium and electronic equipment
CN106774891A (en) The audio effect generating method of virtual reality scenario, equipment and virtual reality device
CN107391219B (en) Function Compilation Method and device
CN106293659A (en) A kind of audio frequency real-time processing method, device and intelligent terminal
CN105915993B (en) The video play mode setting method and device realized using parasitic kit
US20100285880A1 (en) System and method for interaction in a virtual environment
KR20150140772A (en) Multiple displays for displaying workspaces
CN109800135A (en) A kind of information processing method and terminal
CN105518634B (en) The method, apparatus and recording medium interacted with exterior terminal
US20180330110A1 (en) Systems and Methods to Control Access to Components of Virtual Objects
CN108269222A (en) A kind of window rendering intent and terminal
CN108235756A (en) A kind of audio competition playing device and its method, mobile terminal

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

Application publication date: 20191105