This invention relates to field of wireless communication technology, and more particularly, to method, device, system, computer system and storage media for inputting and/or outputting audio data stream.
The advent of wireless technologies (such as Bluetooth, Wi-Fi, and UWB) helps users to listen music and make calls wirelessly. In the implementation, both audio transmitting devices (such as computers, PDA, and mobiles) and audio receiving devices (such as headsets, sound boxes, and cordless phones) have a wireless transceiver, respectively. Audio data streams of audio transmitting devices are passed wirelessly to audio receiving devices of user terminal.
Taken Bluetooth technology as an example, in Bluetooth audio application, Bluetooth provides SCO/eSCO link to transmit real-time voice signals of low sampling frequency, so that users can conveniently receive or dial phones by handsets (Headset, Hands Free, Cordless Telephone Profile); at the same time, it transmits audio encoding data (MP3, SBC and other audio encoding format) with high quality through ACL link of Bluetooth audio application with high quality (A2DP Profile), so users can listen to the music conveniently.
Usually, in an operating system of Bluetooth device, Bluetooth virtual sound card (meaning software module to realize audio data stream acquisition and output) should be incorporated into the operating system (such as Windows or Linux system) in order to implement the support to Bluetooth audio application. Audio application module (Media player, RealPlayer, Skype, etc) will output audio data stream to Bluetooth virtual sound card via operating system, and Bluetooth virtual sound card will pass audio data stream to Bluetooth communication module, and then send to remote Bluetooth audio device via Bluetooth audio communication channel. Following the reverse direction, Bluetooth communication module will receive audio data stream from remote Bluetooth audio device via Bluetooth audio communication channel, and virtual sound card will pass the said audio data stream to audio application module.
Corresponding to Bluetooth audio application, Bluetooth devices also contain local physical sound card (not limited to the common concept of sound card, some of which are called as audio device or others) by hardware to acquire and output data stream. Audio data stream played by audio application module in operating system can be transmitted to wired audio device via local physical sound card (such as PDA speaker, headsets or sound boxes connecting computer interfaces by wire). Following the reverse direction, audio data stream can be transmitted to local physical sound card via microphone of computer and PDA interfaces with wired connection, and then the said data stream is sent to audio application module.
At present, users can listen music and make Skype and MSN calls with wired audio devices, and then change to use Bluetooth audio device (Bluetooth headset) if they want. At this moment, when Bluetooth audio connection is established, default input sound card and default output sound card to input/output audio data stream in operating system can automatically be switched from local physical sound card to Bluetooth virtual sound card. Because several audio application modules(such as Skype) provide interfaces,
Bluetooth application module can send related commands to inform audio application module that default sound card has been set as Bluetooth virtual sound card, and thus audio application module can recognize the said sound card and input/output audio data stream from/to Bluetooth virtual sound card. However, if the current audio application module intends to finish switching, audio application module must turn off the open local physical sound card, interrupt the current audio application, and turn on default sound card of the system (that is, Bluetooth virtual sound card) again, and even restart audio application module. The sudden interruption of audio application makes users feel not well. Or, when users listen to music or make calls via Bluetooth audio devices at the beginning, if Bluetooth audio communication channel is disconnected or Bluetooth audio devices are discharged, users will hope to receive and/or record audio data stream via wired audio devices. At the time, although Bluetooth application module can automatically switch input/output audio data stream by default input sound card and default output sound card in operating system from Bluetooth virtual sound card to local physical sound card, the audio application module must turn off the open Bluetooth virtual sound card, interrupt the current audio application, and turn on default sound card of the system (that is, local physical sound card) again, and even restart audio application module, if the current audio application module intends to finish switching. The audio application is also interrupted.
This shows that audio data stream input/output by audio application module cannot realize to switch seamlessly inputting/outputting between Bluetooth audio communication channel and local physical sound card, which brings inconvenience to users. For those situations with high requirements for audio data stream input/output real-time, including making Skype calls, seeing the movies online, playing games, the previous situation cannot be followed if audio application module is restarted, which makes users fell bad. The similar problems also exist for other wireless audio applications, such as Wi-Fi and UWB.
In view of defects of current technologies, it is necessary to find a software method to switch input/output audio data stream of audio application module seamlessly, digital device, system, computer program, and storage media containing above computer program, so that users can seamlessly switch between wired audio input/output devices and wireless audio input/output devices while they need not restart audio application module or interrupt current audio application.
This invention can solve the above problems through method for inputting/outputting audio data stream, digital device, system, computer program, and storage media containing above computer program, wherein the said digital device comprises:
When short-range wireless communication module establishes the connection of a wireless audio communication channel, audio switch management module will automatically switch audio data stream output by audio application module to the said wireless audio communication channel, and then to wireless audio device, and stop passing the said audio data stream form local physical sound card to wired audio device. At the same time, the said audio switch management module can get audio data stream from wireless audio device to audio application module via the said wireless audio communication channel, and stop passing audio data stream from wired audio device to local physical sound card. When the said short-range wireless communication module disconnects with wireless audio communication channel, audio switch management module will automatically switch audio data stream from audio application module to local physical sound card, and stop passing the said audio data stream to the said short-range wireless communication module. At the same time, the said audio switch management module can get audio data stream from wired audio device to audio application module via local physical sound card, and stop passing audio data stream from wireless audio device to the said wireless audio communication channel. When the said short-range wireless communication module connects or disconnects with wireless audio communication channel, audio data stream input/output by audio application module will be switched between local physical sound card and wireless audio communication channel of short-range wireless communication module. During the process of the above switch, it is not necessary for audio application module to stop passing audio data stream or re-designate audio data stream input/output device in operating system.
According to present invention, in order to, switch seamlessly audio data stream input/output in operating system by software method, audio switch management module should get output audio data stream of audio application module, and input data streams from wireless audio device to wireless audio communication channel, and input data streams from wired audio device to local physical sound card.
One way of implementation is to add at least one virtual sound card in audio switch management module, which is used to realize module of audio data stream acquisition and output. The said virtual sound card has nothing to do with types of short-range wireless communication module and wireless audio communication channel. In operating system, either local physical sound card or virtual sound card is chosen as default input sound card of input audio data stream, either local physical sound card or virtual sound card is chosen as default output sound card of output audio data stream. Default input sound card and default output sound card can be the same card, or the two different cards. When audio application module sets input sound card and output sound card by default, the said module will get input audio data stream via the said default input sound card and output audio data stream via the said default output sound card. Users can designate some sound card as input sound card of audio application module, and some sound card as output sound card of audio application module. The designated input sound card and output sound card can be the same one, or the two different sound cards. The said audio application module can receive input audio data stream from the said input sound card, and pass output audio data stream from the said output sound card. Preferably, when audio switch management module is activated, virtual sound card will be automatically set as default input sound card and default output sound card of audio data stream in operating system. At this time, it is virtual sound card, not local physical sound card, that gets input/output audio data stream of audio application module. When audio switch management module stops working, and local physical sound card is set as default input and output sound card of audio data stream in operating system, local physical sound card will receive directly input/output audio data stream from audio application module.
Another way of implementation is to add a filter driver in audio switch management module. Different from virtual sound card, the said filter driver is located between audio application module and local physical sound card. For users, filter driver and local physical sound card are shown as a sound card (local physical sound card). The said filter driver can intercept audio data stream from audio application module to local physical sound card, and then send the said stream to wireless audio device via wireless audio communication channel of short-range wireless communication module, or to wired audio device via local physical sound card. In the same way, the said filter driver can receive audio data stream from wireless audio device to wireless audio communication channel, or receive audio data stream from wired audio device to local physical sound card, and then send to audio application module.
In the present invention, according to the connection state of wireless audio communication channel of wireless communication module, audio switch management module can control to choose inputting/outputting audio data stream of audio application module, obtained by virtual sound card or filter driver, through local physical sound card or wireless audio communication channel of short-range wireless communication module. Therefore, the sign of connection state in wireless audio communication channel is set in short-range wireless communication module to identify whether the said channel is connected or disconnected. The said short-range wireless communication module gives a real-time test to the state of the said wireless audio communication channel. Once the state of channel is changed, the module will update the sign of connection state and inform audio switch management module. When the sign shows that wireless audio communication channel of the said short-range is connected, audio switch management module will send audio data stream, which virtual sound card or filter driver obtains from audio application module to operating system, from the said wireless audio communication channel to wireless audio device, and stop passing the stream from local physical sound card to wired audio device. At the same time, the module also will control virtual sound card or filter driver to obtain audio data stream of wireless audio device from the said wireless audio communication channel, and send to audio application module, and let local physical sound card stop obtaining audio data stream from wired audio device. When the sign shows that wireless audio communication channel of the said short-range is disconnected, audio switch management module will send audio data stream, which virtual sound card or filter driver obtains from audio application module to operating system, from local physical sound card to wired audio device, and stop passing the said stream from the said wireless audio communication channel to wireless audio device. At the same time, the module also will control virtual sound card or filter driver to obtain audio data stream from wired audio device through local physical sound card, and send to audio application module, and let wireless audio communication channel stop obtaining audio data stream from wireless audio device.
If only one virtual sound card is added to audio switch management module, whereas there are more than two similar or different wireless audio communication channel of multiple short-range wireless communication modules (such as Bluetooth audio communication, Wi-Fi audio communication channel, and UWB channel audio communication channel), the said virtual sound card will send audio data stream, which is obtained from audio application module to operating system, to the said multiple wireless audio communication channel or local physical sound card, and at the same time, the said virtual sound card will get the above data stream from multiple audio communication channel or local physical sound card, and then send to audio application module after audio mixing. For example, the music played through RealPlayer can be sent form two Bluetooth application ACL communication channels to two Bluetooth headsets, or from one Bluetooth application ACL communication channels to one Bluetooth headset, or from five Wi-Fi audio communication channels to Wi-Fi speaker with five audio channels. When all the wireless audio communication channels of multiple short-range wireless communication module are disconnected, audio switch management module will switch audio data stream, which virtual sound card obtains from audio application module, to local physical sound card, and stop passing the said audio data stream to the said multiple wireless audio devices; at the same time, the module also will control virtual sound card to obtain audio data stream from the wired audio communication channel, and send to audio application module, and let multiple wireless audio communication channels stop obtaining audio data stream from wireless audio device. When at least one wireless audio communication channel of multiple short-range wireless communication modules is connected, audio switch management module will send audio data stream, which virtual sound card obtains from audio application module, to at least one wireless audio communication channel, and let local physical sound card stop passing the said audio data stream to wireless audio device. At the same time, the module also will control virtual sound card to obtain audio data stream, input by wireless audio device, through at least one connecting wireless communication, and then send to audio application module, and let local physical sound card stop obtaining audio data stream from wired audio device.
In an operating system, two or more than two audio application modules are used. For example, one is listening to RealPlayer music, and another is making Skype call with wireless headset. In such a case, if only one virtual sound card is added to audio switch management module, the said virtual sound card will obtain audio mixing data stream which multiple audio application modules are sending together to operating system by default, because the said virtual sound card is set as default input/output sound card of audio data stream in operating system. Thus, users are bothered to listen well. To solve this problem, an optimized plan, but not limited to, is to add two or more than two virtual sound card in audio switch management module, which are used as input/output sound cards of audio data stream from/to multiple audio application module, that is to say, one audio application module corresponds to one virtual sound card, in order to realize audio data stream input/output in operating system, and intercross with wireless audio device through corresponding wireless audio communication channel.
According to an optimized embodiment of this invention, audio switch management module has two virtual sound cards, that is, the first virtual sound card and the second virtual sound card. The first one is designated as the input and output sound card of the first audio application module and the second one is designated as the input and output sound card of the second audio application module. When the first wireless audio communication channel is connected, the said audio switch management module will switch audio data stream, which the first virtual sound card obtains from the first audio application module, to the first wireless audio communication channel, and let local physical sound card stop passing the said audio data stream to wired audio device. At the same time, the module also will control the first virtual sound card to obtain audio data stream from wireless audio device to the first wireless audio communication channel, and send to the first audio application module, and let local physical sound card stop obtaining audio data stream from wired audio device. When the first wireless audio communication channel is disconnected, the said audio switch management module will switch audio data stream, which the first virtual sound card obtains from the first audio application module, to local physical sound card, and stop passing the said audio data stream to the first wireless audio communication channel. At the same time, the module also will control the first virtual sound card to obtain audio data stream from wired audio device to local physical sound card, and send to the first audio application module, and let the first audio communication channel stop obtaining audio data stream from the wireless audio device. When the second wireless audio communication channel is connected, the said audio switch management module will switch audio data stream, which the second virtual sound card obtains from the second audio application module, to the second wireless audio communication channel, and let local physical sound card stop passing the said audio data stream to wired audio device. At the same time, the module also will control the second virtual sound card to obtain audio data stream from wireless audio device to the first wireless audio communication channel, and send to the second audio application module, and let local physical sound card stop obtaining audio data stream from wired audio device. When the first wireless audio communication channel is disconnected, the said audio switch management module will switch audio data stream, which the second virtual sound card obtains from the second audio application module, to local physical sound card, and stop passing the said audio data stream to the second wireless audio communication channel. At the same time, the module will control the second virtual sound card to obtain audio data stream from wired audio device to local physical sound card, and send to the second audio application module, and let the second audio communication channel stop obtaining audio data stream from wireless audio device.
In addition, in the above application scene of multiple audio application modules, if two or more than two wireless audio communication channels, corresponding to input/output audio data stream of audio application modules, are disconnected together, it is necessary for the audio switch management module to receive/send audio data stream from/to multiple audio application module to/from local physical sound card. In order to avoid sound mixing and resource conflict, the audio switch management module, in accordance with optimized strategy, can choose automatically one of audio application modules to receive/send audio data stream from/to local physical sound card. For example, when both Bluetooth SCO/eSCO communication channel and ACL communication channel are disconnected together, Skype audio data stream will prefer to switch from/to Bluetooth SCO/eSCO communication channel to/from local physical sound card, while RealPlayer audio data stream, output through Bluetooth ACL communication channel, will not switch to local physical sound card. Certainly, users can first choose to switch from local physical sound card to audio application module through UI prompt.
In the present invention, it does not need to make any change to interface or application of present audio application module. The solution is compatible and easy to use. In the process to switch automatically and seamlessly the audio data stream of audio application module between wireless audio communication channel and local physical sound card, audio application module does not need to stop passing audio data stream or re-designate default sound card of audio data stream between audio application module and operating system, thereby solving the complex operation of existing technology.
It'll be helpful for those skilled in the art to understand the objects and advantages of present invention by the following detailed description of embodiment with reference to the drawings, wherein:
Preferably, audio application module 100 is realized as audio player in operating system, such as RealPlayer and Media Player, which belongs to operating system application level 101. Local physical sound card 103 belongs to operating system core level 102. The related interface between application level 101 and core level 102 of operating system is used to coordinate audio data stream transmission between audio application module 100 and local physical sound card 103.
For audio application module 100 used to make calls, including Instant Messenger, such as Skype and MSN, and VoIP network telephone system, if the input sound card is local physical sound card 103, it is necessary to pass audio data stream from local audio device 104(such as wired speaker) to local physical sound card 103, and then to audio application module 100 through the interface between operating system core level 101 and operating system core level 102.
Shown as in
If the input sound card of audio application module 200 (such as RealPlayer and Media Player) is virtual sound card 203, audio application module 200 will pass audio data stream to virtual sound card 203, and then to wireless audio device 205 of hardware device level 206 via wireless audio communication channel of short-range wireless communication module 204.
For audio application module 200 used to make calls, including Instant Messenger, such as Skype and MSN, and VoIP network telephone system, if the input sound card is virtual sound card 203, it is necessary for wireless audio device 205 to pass audio data stream from the above wireless audio device 204 to virtual sound card 203, and then to audio application module 200.
Wherein, short-range wireless communication module 204 can be, but not limited to, Bluetooth module, Wi-Fi module and UWB module. Correspondingly, wireless audio device 205 can be Bluetooth audio device, Wi-Fi audio device and UWB audio device.
The Bluetooth communication channel is established between Bluetooth module and Bluetooth audio device in order to pass audio data stream. Similarly, The Wi-Fi audio communication channel is established between Wi-Fi module and Wi-Fi audio device in order to pass audio data stream, and UWB audio communication channel is established between UWB module and UWB audio device in order to pass audio data stream
Shown as in
Virtual sound card 304 and local physical sound card 307 can be presented by the way of sound card (or audio device and others) to users in operating system. It is users or audio switch management module 303 that choose virtual 304 or local physical sound card 307 to be set as default input sound card or default output sound card, which is used as input/output audio data stream of default input/output audio application module 300. The related interface between operating system application level 301 and operating system core level 302 is used to coordinate audio data stream transmission between audio application module 300 and virtual sound card 304 and local physical sound card 307.
An optimized plan is, but not limited to, that the initial states of virtual sound card 304 and audio data stream power switch 309 of audio switch management module 303 are disabled. When users can only pass input/output audio data stream from wired audio device 308 to audio application module 300 via local physical sound card 307, local physical sound card 307 will be default input/output sound card in operating system and virtual sound card 304 and audio data stream power switch 309 of audio switch management module 303 do not work, so as to avoid the unnecessary system consumption because of the working state. At this time, audio data stream input/output in operating system is shown as in
After virtual sound card 304 receives audio data stream from audio application module 300, audio data stream switch 309, according to the sign of connection state of wireless audio communication channel, will control virtual sound card 304 to output audio data stream switching seamlessly by software method between local physical sound card 307 and wireless audio communication channel of short-range wireless communication module 305.
When the sign of connection state jus that wireless audio communication channel of short-range wireless communication module 305 is connected, audio data stream will be sent from wireless audio device 306, which audio data stream switch 309 controls virtual sound card 304 to receive through wireless audio communication channel of short-range wireless communication module 305. The said audio data stream will stop passing from wired audio device 308 to local physical sound card 307. When the sign of connection state judges that wireless audio communication channel of short-range wireless communication module 305 is disconnected, audio data stream will be sent from wireless audio device 306, which audio data stream switch 309 controls virtual sound card 304 to receive through local physical sound card 307. The said audio data stream will stop passing from wireless audio device 306 to wireless audio communication channel of short-range wireless communication module 305.
In the audio data stream input direction of audio application module 300, audio data stream switch 309, according to sign of connection state of wireless audio communication channel of short-range wireless communication module 305, controls virtual sound card 304 to receive audio data stream switching seamlessly by software method between local physical sound card 307 and wireless audio communication channel of short-range wireless communication module 305.
When the sign of connection sign judges that wireless audio communication channel of short-range wireless communication module 305 is connected, audio data stream switch 309 controls virtual sound card 304 to receive audio data stream, which is input from wireless audio device 306, through wireless audio communication channel of short-range wireless communication module 305, and then sends to audio application module 300. At the same time, virtual sound card 304 stops passing audio data stream from wired audio device 308 to local physical sound card 307. When the sign of connection state judges that wireless audio communication channel of short-range wireless communication module 305 is disconnected, audio data stream switch 309 will control virtual sound card 304 to receive audio data stream, which is input from wired audio device 308, through local physical sound card 307, then send to audio application module 300. At the same time, virtual sound card 304 will stop passing audio data stream from wireless audio device 306 to and wireless audio communication channel of short-range wireless communication module 305.
It is to be noted that modules and devices in
After filter driver 406 of audio switch management module 401 intercepts audio data stream from audio application module 400 to local physical sound card 404, audio data stream switch 407 of audio switch management module 401, according to the sign of connection state from short-range wireless communication module 402, will control audio data stream switching seamlessly by software method, which is intercepted by filter driver 406 from audio application module 400, between local physical sound card 404 and wireless audio communication channel of short-range wireless communication module 402. When the sign of connection state judges that wireless audio communication channel of short-range wireless communication module 402 is connected, audio data stream switch 407 will control to send audio data stream, which is intercepted by filter driver 406 from audio application module 400, to wireless audio device 403, through wireless audio communication channel of short-range wireless communication module 402, and, at the same time, stop passing audio data stream, which is intercepted by filter driver 406 from audio application module 400, from wired audio device 405 to local physical sound card 404. When the sign of connection state judges that wireless audio communication channel of short-range wireless communication module 402 is disconnected, audio data stream switch 407 will control filter driver 406 to intercept audio data stream, which is input by audio application module 400, to wired audio device 405, through local physical sound card 404, and, at the same time, stops passing audio data stream, which is intercepted by filter driver 406 from audio application module 400, from wireless audio communication channel of short-range wireless communication module 402 to wireless audio device 403.
In the input direction of audio data stream of audio application module 400, audio data stream switch 407, according to sign of connection state of wireless audio communication channel of short-range wireless communication module 402, will control audio data stream switching seamlessly by software method, which is intercepted by filter driver 406, between local physical sound card 404 and wireless audio communication channel of short-range wireless communication module 402. When the sign of connection state judges that wireless audio communication channel of short-range wireless communication module 402 is connected, audio data stream switch 407 will control filter driver 406 to receive audio data stream, which wireless audio device 403 inputs, through wireless audio communication channel of short-range wireless communication module 402, and send to audio application module 400. At the same time, filter driver 406 will stop passing audio data stream from wired audio device 405 to local physical sound card 404. When the sign of connection state judges that wireless audio communication channel of short-range wireless communication module 402 is disconnected, audio data stream switch 407 will control filter driver 406 to receive audio data stream, which wired audio device 405 inputs, through local physical sound card 404, and at the same time, will stop passing audio data stream from wireless audio device 403 to wireless audio communication channel of short-range wireless communication module 402.
Shown as in
Shown as in
When only Bluetooth ACL audio communication channel is disconnected, audio data stream switch 702 will control virtual sound card A705 to switch audio data stream, which is output from RealPlayer 700, to local physical sound card 707, and then to send to wired headset 711, and stop passing audio data stream from RealPlayer 700 to Bluetooth ACK communication channel of Bluetooth module 708. When only Bluetooth SCO audio communication channel is disconnected, audio data stream switch 702 will control virtual sound card B706 to switch input/output audio data stream to/from Skype 701 to wired headset 711 through local physical sound card 707. When both Bluetooth ACL and SCO audio communication channels are disconnected due to inoperative station of Bluetooth module 708 or other reasons, audio data stream switch 702, in accordance with the optimized strategy set apart, will control one of virtual sound card A705 and virtual sound card B706 to switch input/output audio data stream to/from audio application module to local physical sound card 707, and control another virtual sound card not to switch audio data stream obtained to local physical sound card 707, so as to avoid sound mixing. For example, if virtual sound card B706 is set as preferred to virtual sound card A705, audio data stream switch 702, will control virtual sound card B706 to switch Skype 701 input/output audio data stream to wired headset 711 through local physical sound card 707, in order to assure the incessant working of Skype 701 calls.
While embodiments of this invention have been shown and described herein for purposes of illustration, within the true spirit and scope of this invention and the appended claims, many modifications and changes will become apparent to those skilled in the art. Therefore, this invention is not limited to those optimized embodiments, but covered with this change. This invention exists in each and any new characteristics, and each and any combination of characteristics.
It is obvious for those skilled in the art, that “module” is used to cover any hardware (such as separate or integrated circuit or electronic unit) or software (such as program or subprogram). This invention can be realized through hardware with different units and through computer with programming. “Software” should be understood as any software product saved on computer readable media (such as floppy disk), downloaded from network (such as Internet) or sold by other ways.
Number | Date | Country | Kind |
---|---|---|---|
CN200710063852.5 | Feb 2007 | CN | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN08/00337 | 2/13/2008 | WO | 00 | 10/23/2009 |