Binding applications to multiple sound devices?
-
Tuesday, August 28, 2007 6:35 AMHello,
I wish to control which application uses which sound device. In example, I want Counter-Strike to use my onboard (AC97) Headphone output, while I want Media Center to use only my Audigy SPDIF output. What options do I have to bind specific sound devices to certain programs?
Regards,
Aydn
All Replies
-
Thursday, August 30, 2007 9:23 PMi am having the exactly same problem at the moment and cant sort it out figure it out at all... did u get a answer m8 or not?
if ne1 could help would b great?
thanks mc5ive- Proposed As Answer by DRkDraGoNarChER Tuesday, September 11, 2012 5:11 AM
- Unproposed As Answer by DRkDraGoNarChER Tuesday, September 11, 2012 5:11 AM
-
Sunday, September 02, 2007 4:40 PMHey,
I havn't been able to find anything built into Vista. Im geussing we are going to need a third party application to force the selected applications to only recognize one sound adapter.
Anyone? Any daring devs out there? This can be worth your time seeing as this is a universal problem all Vista users face. -
Tuesday, October 09, 2007 1:54 AMANYONE???
Please! Are there any solutions? -
Wednesday, October 10, 2007 8:54 PMModeratorFor Vista you can have only one "default" output and one "default" endpoint. Applications can play to any output (and record from any input) but by default they will only use the "default" input and output.
This is the problem that "device roles" were intended to solve (see link) but unfortunately it wasn't ready for Vista.
http://msdn2.microsoft.com/en-us/library/ms678712.aspx -
Friday, March 07, 2008 11:40 PMI have a somewhat unusual system in that I have two pro sound cards.
I have a Creative X-Fi Platinum, mainly for the Crystalizer function, but I also need multiple sound inputs for my music authoring. I have several MIDI devices, and want to run the output of each back into the system, then record them all through one device.
My second card is an E-MU 0404, which has multiple input devices.
My X-Fi optical digital output is wired back into the E-MU digital input. So I can mix all the inputs from the X-Fi I/O drive with the inputs to the E-MU and then send to my amp.
Works well, except the X-Fi doesn't send the Crystalizer effect to the digital output! Doh!
So I have to switch my amp between the two outputs, and mess about with the mixer settings in Vista,
Microsoft, Why O Why didn't you allow multiple input and output device to be 'mixed' together.
Why only one 'default' playback device - I want to send playback to my analog output and my digital output, and googling, it looks like lots of people do too.
Otherwise, (being a user since Windows 3.11) Vista x64 is great, so why have you limited us to one output/input and why go backwards compared to XP. Maybe I have to dual boot and use XP for my general music work, and only Vista for games...
When will you fix and allow more than one 'default' device - by its very name 'default' implies first, not only. I work for IBM, and one thing we do try and do is listen to customers... how long has this thread been open without a single MS response?!... -
Saturday, March 08, 2008 6:14 AMModeratorI work on the Windows Sound Test team.
Applications are free to play to any device in the system, but most will play to the "default device".
As a Vista user, I've noticed that I can make different "default only" apps play to different devices by playing games. For example, I can:
change the default device to my USB Audio gumstick device
start WinAmp and begin a playlist
change the default device back to my speakers
WinAmp continues playing over the USB Audio gumstick device; other apps play over the speakers.
Aydn, I'm not expressly familiar with Counter-Strike or Media Center, but I suspect that Media Center allows you to specify somewhere that you want to play over the Audigy SPDIF output. If so, you can tell Media Center to play over the SPDIF output, and set your AC97 headphone output to the default device in the Sound control panel; Counter-Strike will then likely pick up the default. -
Saturday, March 08, 2008 6:21 AMModerator> Media Center allows you to specify somewhere that you want to play over the Audigy SPDIF output.
Hmmm... perhaps not. That complicates things. -
Monday, May 12, 2008 3:33 AMI use windows media center for a local 5.1 and 7.1 environment and also send the audio to a whole house audio. XP allowed this to be SPDIF local and analog for the whole house system. Now with vista there seems to be no way to do this. Its not a matter of telling one application to send audio to here and another to there its having MCE send audio to both at the same time. Ive spent hours on the phone with microsoft support on this and I get the empression that Im speaking to monkey looking at a slide rule. I understand why the developers redesigned it for greater performance and stability, but with microsoft trying to everyone to use media center, this is an issue that needs to be resolved. I cant believe that with all the brilliant engineers at MS that there is no way to edit the registry for a monitor out function. Please assist if you can.
-
Wednesday, January 21, 2009 10:17 PMGee the device roles issue wasn't "Vista" ready in October of 2007, and the problem still hasn't been resolved or even addressed as of January 2009!
Nor has it been corrected in FIXTA (Windows 7).
Considering Vista was supposed to be the ultimate media center pc, it seems to me that the brilliant (ha-ha) engineers at Microsoft must have been picking their noses when they got around to developing, or let me rephrase that and say downgrading the sound system and Windows Media Player.
With the reduced functionality in Windows Media Player 11, I've already abandoned Media Player for listening to music, in favor of WinAmp, which gives me back the functionality that Microsoft removed from Media Player 11. Now with Vista and & not being able to output to more than one audio device, I think it just might be time to bail on Micrtosoft altogether and upgrade to Linux!
To add insult, the sound issue with multiple audio output still exists in Windows 7and Windows Media Player is even more sorry.
Get youy act together Microsoft and fix your operating system! You're not the king of the hill anymore and we do have very viable choices! -
Wednesday, January 21, 2009 11:04 PMModeratorIn Windows 7, you can configure Windows Media Player to play to a specific audio device. Tools | Options | Devices | Speakers | Properties | pick the audio device you want to play to.
Matthew van Eerde -
Wednesday, March 25, 2009 12:44 PMI'm on the 7057 build of Windows 7. Am I able to bind system sounds to a device other than the default? I'd like system sounds to play on the analog device hooked to my computer monitor while the default output remains my digital output hooked to my theatre speakers.
-
Wednesday, March 25, 2009 1:34 PMModerator"Am I able to bind system sounds to a device other than the default"
Short answer - no. System sounds always play to the default device.
Longer answer - You may, however, be able to configure your media player to play to a non-default device. What media player are you using? Alternatively you can disable system sounds altogether by choosing the "No Sounds" sound scheme in the Sounds tab of the Sound control panel, and unchecking the "play startup sound" checkbox.
Matthew van Eerde -
Tuesday, April 14, 2009 10:25 PMSince vista and windows 7 have program specific volume control why can't a little addition be made there to tell it which sound device to output to on the system side instead of the program side. Multiple outputs would be really nice, and I don't see it being to hard to do. I do like some of the stuff they are doing with audio, specially the ability for the end user to opt-out of things like the muting you music when a communication program reports that it is on a call. The ability to switch between sound devices without having to stop and restart you music is really great, but it didn't go far enough. 1-multiple is needed. Because most programmers are not going to add multiple sound device options in their programs it would be best if the OS was able to handle this NEEDED function.
-
Sunday, May 02, 2010 8:35 PM
This is a feature that should be trivial to implement. And for those of us with multiple audio devices using applications that don't support streaming to a specific card, it would be a godsend.
I use Virtual Audio Cable(a third party tool) which gives some additional flexibility, but when running two applications simultaneously that only support the default devices you are still hosed.
-
Thursday, May 06, 2010 6:20 PMModerator
I think one of the reasons that application vendors are loath to allow selecting multiple audio devices is clock drift. Streaming to multiple audio devices is fairly simple and straightforward if they're both driven by the same hardware clock, but if they're driven by different clocks they will slowly drift out of synchronization and now you have to compensate for that somehow (without glitching!)
Matthew van Eerde -
Tuesday, June 29, 2010 10:22 PM
On several occasions i have ran into this dilemma. From a design standpoint; it would seem a Virtual Sound Device could be set as the default sound device. This would simplest way to capture the sound from sources that solely send to the default system sound device. Designing the Virtual Sound Device to stream this audio to (Sound Controller Software) with the built-in functionality of sending this audio output to single/multiple system sound device simultaneously. Using a Virtual Sound Device should preserving the digital stream until it is handed off to a sound device.
-
Wednesday, June 30, 2010 3:23 PMModerator
There are third-party solutions available that do just as you suggest. See, for example, Virtual Audio Cable:
http://en.wikipedia.org/wiki/Virtual_Audio_Cable
Those who are interested in developing their own virtual audio driver can use the MSVad sample in the Windows Driver Kit as a starting point.
Note that if you are implementing a solution that takes a stream and tees it to multiple audio devices, you need some way to handle the situation where the two devices you're feeding aren't consuming the data at precisely the same rate.
Matthew van Eerde -
Wednesday, July 21, 2010 6:36 PMThree years later I've ran into this problem again and I found my own thread haha. I tried the digital audio cable and I am not able to output the same application to two audio playback devices.. Any ideas? I am on Windows 7 now.
-
Sunday, September 26, 2010 1:06 AMHaving the power to specify which application outputs to which audio device at the OS level would be wonderful. I want to output one application to my headphones and my music to my speakers, I can't since the application doesn't let me choose which device it goes to. Let's go Microsoft, get a move-on.
-
Monday, September 27, 2010 3:24 PMModerator
> I want to output one application to my headphones and my music to my speakers
What is the "one application" in question, and what application do you use to play music?
In the Sound control panel, do you see separate devices for your speakers and your headphones?
If the application you use to play music is Windows Media Player, and you're running Windows 7 or later, then you can do this:
1) In the Sound control panel, right-click the headphones and choose "Set as Default Device"; the "one application" will now play to your headphones.
2) In Windows Media Player | Tools | Options | Devices | Speakers | Properties | Sound playback | Select the audio device:, choose your speakers. Your music will now play out of your speakers.
Matthew van Eerde -
Monday, October 25, 2010 2:31 AM
I have been stumbling around and this thread seems to be the closest to my issue at hand. As like others I am trying to redirect audio to certain outputs. I have Windows 7 at the moment and I am trying to play a movie to my TV (whether it be streaming through IE or through VLC) using an HDMI cable. I want to specify the audio from the movie (IE or VLC) to come out of my TV speakers and have all my other computer applications come out of my computer speakers.
I am not sure why, but I feel that this is VERY possible and I cant figure it out. I have been able to do this before on my laptop where certain sounds would come out from my headphones and other sounds come out from laptop speakers. This however, could've been a fluke for some reason as I didn't set anything up or don't recall.
Is this possible?
-
Thursday, November 04, 2010 11:25 PM
Hnery, it is up to the applications decide which device to use. Please see comments on 03/03/2008:
Applications are free to play to any device in the system, but most will play to the "default device".
AFAIK IE uses the default audio device, but windows media player can use a non-default device (Tools | Options | Devices | Speakers | Properties | pick the audio device you want to play to). So, if you use windows media player playing a movie, your plan is feasible but if you want IE playing to one audio device and all other sounds go to another one, it is not feasible on Win7.
-
Thursday, January 06, 2011 12:00 PM
@EricYun above, this used to be possible in WinVista, but is no longer possible in Win7.
As a poster above notes, in Vista you can set the default audio device, run an application (which then continues to use that audio device); change the default audio device, run another application (which uses this new device). Using this method it's possible to set individual applications to use different (default) audio devices.
With Win7, as soon as you change the default audio device, all applications that are using the default device are re-routed to use the new default. This is very annoying! I assume that what's happening behind the scenes is that the default audio device is actual a virtual device and is simply re-routing audio to whatever device is currently selected - this appears to be a change in functionality from Vista.
The solution with Vista was awkward but at least it worked - with Win7, there is seemingly no way around the issue.
The only thing I can think is that you be allowed to override the default device on a per-application basis (e.g. if ApplicationX asks for "default audio device", then you send it to device1; if ApplicationY asks for "default audio device" it can be sent to device2), but that sounds a long way off :(
-
Saturday, February 12, 2011 7:13 AM
There is a program called IndieVolume that worked in Windows XP but I have not been successful in keeping it from crashing on my system - Windows 7 Pro. When it does it just stops working and tells you about it so no harm done. You can direct any application to any device and control which controls besides volume (base, tremble, balance, etc) you want for each one. I'm not sure what version is available now but I tried 3.4.91.162. When it worked it worked great. I had my Media Center TV window up using the Bose USB speakers, system sounds going to my monitor speakers and itunes going out my SP/DIF port.
-
Saturday, May 14, 2011 2:05 PM@DinoDinelli You are so right. after spending days looking in google, I wasn't able to solve this problem. I REALLY need an software/tool that force audio from App1 to Device1 and App2 to Device2, since many games/programs lack the option to select your output device. Has anyone found a solution for this? I don't care if its freeware or payware, I just need a solution for Win7 64bit. I tried VAC(Virtual Audio Cable) but that doesn't do the trick. I read somewhere that PulseAudio does that, but unfortunately its only available for Linux and WinXP. Please help
-
Sunday, June 12, 2011 9:54 PM
I have this same issue. I don't use Media Player. I don't like Media Player. I'm running a game which I want to hear on my headphones, I listen to music streamed through firefox which I like to hear on my speakers, chat programs through my headphones, and everything else through my speakers.
Not trying to be a jerk, but why do you keep assuming that everyone listens to music through media player. It is one of the crappiest apps out there.
And yes we can all go out and buy third party software to do this, but Windows should have the option. Not just have the option to do it for "Microsoft" applications, but for all of them.
-
Monday, June 13, 2011 3:59 PMModerator
Firefox doesn't appear to offer any option to play to a non-default device (at least, I couldn't find one.)
What chat program are you using? Most of the ones I've tried have an "audio wizard" that you can use to choose a non-default device. You could choose "headphones" in your chat programs, and leave your default device as the speakers.
Matthew van Eerde -
Monday, June 13, 2011 9:40 PMModerator
To respond to the "why do you assume everyone uses Media Player" comment:
I try not to make that assumption. I use Media Player as an example because I know everyone reading the thread will have it installed.
Many media apps allow the user to pick an audio device; the UI varies from app to app. For example:
WinAmp's selection UI is under Options | Preferences | Plugins | Output | Nullsoft DirectSound Output | Configure | Device.
Office Communicator's selection UI is under Tools | Set Up Audio and Video | Custom
Not all apps allow the user to pick an audio device. There is, alas, no Windows feature that will allow you to make two such apps play to different audio devices. I'm not aware of any third-party software that can do this (I don't think Virtual Audio Cable helps here, for example.)
Matthew van Eerde -
Tuesday, June 14, 2011 10:54 AMIndievolume seems to do the trick, I've been searching solution for this very same question for months now (have two sound cards, integrated and sound blaster x-fi) and I've been trying to route my movies, music etc through other sound card and games etc. through other.
-
Thursday, June 23, 2011 9:33 PMVista Audio Changer will allow you to set up hot-keys to make the transition faster. For example, I have a wireless headset that I use to listen to music privately while I have students in my computer lab. I also have speakers on my computer. When my lab is vacant I use the speakers. When a student walks in I click "Ctrl-Alt-F9"(whatever you choose for the hot-key) which immediately changes my audio to my wireless headset.
-
Friday, August 05, 2011 3:04 AM
Ive just upgraded to Win7-64 from XP-32 and I have to say that this change is *maddening*. All I want to do to have a specific application (Itunes) play to one audio device (on board audio) and everything else to play through my headphones (USB Logitech G35). This was easy to do in XP as the OS "remembered" which device was set for playback when an application was opened.
Now the OS immediately switches everything to the new device. Are there plans to fix this or not? I just dont understand the logic that went into this change from previous OS versions. I've also spent the last 3 hours looking for a 3rd party fix. I tried IndieAUdio but it doesnt seem to work with Win7-64.
-
Friday, August 05, 2011 11:45 PMModeratorWindows Media Player allows you to pick an application other than the default. I don't know whether iTunes does but a casual web search suggests not.
Matthew van Eerde -
Saturday, August 06, 2011 4:11 PM
Matt,
Thanks for responding and you are correct, iTunes does not contain functionality that will allow the output device to be set by thge application.
However, what I really would like to know is if there is a plan to fix this issue from the Windows team? From my perspective, after upgrading from XP, this is a loss of functionality and I am quite frankly amazed that this has happened and apparently persisted for a couple of years now from the information I have gathered. The things I have read do not reassure me that this issue will ever be addressed for correction.
To take it a step farther; is this a bug in the way Win7 handles sound devices or is this intentional? The real issue seems to be this instantaneous "switching" that occurs when an output device is set as default.
All I can do is reiterate how frustrating it is to move to the "new & improved" OS from something 2 generations old and find this kind of basic functionality eliminated. This is not the software developer's fault, this is a Windows issue. I also have no recourse; I cant go back to XP because of hardware dependencies, so I am just plain old screwed now. This is a quality of life issue, and a big one, for me and plenty of other people as I read around the net on this subject.
-
Sunday, August 07, 2011 2:07 PM
To my understanding, this change was done by design to prevent 're-broadcasting' .. copyright BS... here we go again...
I also dislike this change, and am still looking for a solution. There is an app called 'Virtual Audio Cable' that allows you to create a repeater that will replay the 'source' to multiple devices.
In my testing, the repeater application would hang after some time, or delay the signal with increasing delay. (I have an i7 / 12GB RAM, so CPU/overhead is not the issue)
-
Sunday, August 07, 2011 10:07 PMModerator
WinAmp also has a setting that allows you to play to a non-default audio device, though it's a little buried. It's a pity that iTunes doesn't.
In the "old" days (Windows 3.1 with Multimedia Extensions through Windows XP), stream routing was typically left to the audio drivers. These would typically expose a single audio device, regardless of how many jacks there were on the system. Whatever you played to the driver would be broadcast simultaneously to the speakers and S/PDIF (if you had one); there would be a hardware switch between the headphone jack and the internal speakers.
One of the problems we encountered in Windows XP was that if you didn't have the exact audio driver for your system, you wouldn't get any sound. This was especially a problem if your computer manufacturer was no longer in business - clean install the OS and you can't play audio anymore until you reinstall the third-party driver (if you can find it.) Another problem we kept running into was that all the digital signal processing was in kernel mode, so if anything went wrong, your computer would bluescreen.
In Windows Vista a number of things changed. We moved the audio signal processing out of kernel mode into user mode; that way, if something went wrong, you would just lose audio rather than bluescreening. We also came up with a thing called the "Universal Audio Architecture" - onboard audio needed to work, not only with the third-party audio driver provided with the system, but also with a Microsoft "class driver" that comes with Windows.
As part of this redesign we moved the focus away from audio drivers to audio devices. Instead of a single "Sigmatel Audio Device" (say), you would have "Speakers" + "Headphones" + "Digital Out / SPDIF".
This redesign solved a lot of problems, but created some new ones. For example, a common complaint in Windows Vista was that if you unplugged your headphones while listening to a song, Windows Media Player would stop with an alert. (Windows XP wouldn't even have noticed; it would have just kept sending audio to the driver.) The root cause was that Windows Vista didn't handle default device changes. (Some people took advantage of this by opening app A, starting audio, then changing the default device.)
In Windows 7 we solved the "unplugging your headphones" problem by having Windows move over active streams when the default device changed. As a side effect this broke the workaround some people had identified.
I believe Virtual Audio Cable works by installing itself as a driver.
Another potential workaround to achieve broadcast mode might be to use WASAPI software loopback on the default audio device and replay it to all (or just some) of the non-default audio devices.
Matthew van Eerde -
Friday, September 16, 2011 7:25 PM
Matt,
Thanks for the insight,and the historical changes. If it matters, I also cast my vote for multi-output functionality. The advertising that surrounded the Win 7 release was themed such that the household TV would join with a PC and become part of our lifestyle. Yet Windows Media Center is a half-baked, low functioning, third-party band-aided pile of software. The player needs codecs just to process Dolby Digital or even more recently any HD audio content. It has been suggested here and other places to have audio devices assigned(binded) to a program. I have assigned my Spdif out to WMP, but when I use Win7 Ultimate 64 WMC, the player does not use the newly assigned output, but stays on the default HDMI. What player does WMC use if not WMP? How do I assigned an audio output to Windows Media Center? I installed Shark 007 codecs in order to play Dolby content within WMC, but in order to do that I also have to shut down Windows Audio Codecs, thus killing LiveTV feed(another shortcoming of Win7 MC). I know a PC is not a A/V receiver, but it can't even do what my 8 year old cable box can do.
-
Friday, September 16, 2011 10:31 PMModeratorWindows Media Center has UI to change what audio device you want to play to, but this actually changes the system default audio device (it doesn't use Windows Media Player's setting.)
Matthew van Eerde -
Tuesday, September 20, 2011 9:15 PM
I agree, and was hoping there was a way to "bind" an audio device to the Media Center Movie player and retain my default settings. ex. watch movies in DD but live TV through the TV speakers. Any ideas?? There is yet another third party app that can quickly change audio devices within WMC, but also messes with the registry, so I am apprehensive about that one, but will probably use due to lack of options. Could you answer three questions please?
1. Is Microsoft currently working on a "fix" for multiple audio out?
2. Is there a codec/install that can enable Dolby Digital or DTS functionality in Windows Media Center 7?
3. Is Microsoft working on the integration of DD or DTS in their WMC or in WMP ?
-
Wednesday, September 21, 2011 2:36 PMModerator
For 1) I can't comment on possible inclusion of features in future Windows releases. Note that apps can implement this today in released versions of Windows.
I'm a little confused by questions 2) and 3). Windows Media Center and Windows Media Player can play Dolby Digital content in Windows Vista and Windows 7.
Vista Home Basic doesn't include Dolby Digital, but you can purchase a plug-in that enables it - some are listed here http://windows.microsoft.com/en-US/windows/downloads/windows-media-player/plug-ins
Matthew van Eerde -
Wednesday, September 21, 2011 2:59 PM
Apps can implement this, except Windows Media Center 7. It uses/changes the default device. This behaviour is unique for an app. That is one major problem. The third party WMC app/band-aid I refer to above does do this though. I am using a ATI 5670 GPU which has the capacity for 7.1 surround, but WMC only decodes DD into 2 channel audio no matter what speaker setting I use in the set-up(2,5.1, or 7.1). Thus the need for codecs(FFdshow, Shark007,K-Lite,etc) to supplement WMC. The solution, as many do is to use a different player(XBMC,TMT3,VLC,etc). Most are free and are more feature rich than WMC. I have PDVD(surround works), but it is format limited. You may be asking yourself "Then why not use those?". My answer is that I truly want a Media Center. One that can get metadata for the movies, and then play them and LiveTV in DD. WMC7 is so close to being a complete package, but like I said before, it's half-baked. If WMC does decode and provide DD 5.1 or 7.1, what settings should I use? I would be happy to try anything. Thanks again
- Edited by danibeez Wednesday, September 21, 2011 3:06 PM
-
Wednesday, September 21, 2011 3:08 PMModerator
Let me make sure I understand the problem...
You have an HDMI output which can do 7.1 surround PCM. Other players than Windows Media Center can decode Dolby Digital content to multichannel PCM and play that over the HDMI output. Windows Media Center insists on decoding the Dolby Digital content to stereo.
Can you go into the Sound control panel, open the S/PDIF and HDMI endpoints in turn, switch to the Supported Formats tabs, and send me screenshots? mateer at microsoft dot com
Matthew van Eerde -
Wednesday, October 26, 2011 7:50 AMIm not interested in binding app 1 to sound device 1 and then app 2 to sound device 2. i ran into this default device issue after purchasing a set of wireless headphones for my htpc/gaming rig. i want ALL sound created by ANY app, game, etc on my pc to be output to ALL of my output devices. currently, i'm only using the optical output to my reciever and then my headphones are showing up as their own sound device. i have to switch back and forth between either my home theater speaker setup or my wireless headphones as the default device. this is ridiculous. i should be able to be in the middle of a game/movie/song with sound coming from my theater setup and then turn on my headphones, mute/lower the volume of my reciever and continue on my merry way enjoying my media. instead i have to stop/exit whatever i'm doing and change the default sound device. very aggrivating and a poor execution of something that should be painfully simple.
-
Wednesday, October 26, 2011 3:49 PMModerator
@Phaytal
I see, you want any sound that's played to go to all outputs on your system simultaneously... a kind of "broadcast mode."
There are a couple of approaches that would allow this.
One would be to write an app that used WASAPI loopback capture:
- app would listen in on everything that was playing on the default device
- app would play this audio to all the non-default devices
- app would listen for "default device has changed" notifications and switch accordingly
A different approach would be to use Virtual Audio Cable:
- Create a virtual audio output, set it as the default device
- Create virtual cables from this virtual audio output to all the real audio outputs
In the old days of Windows this wasn't necessary because audio drivers would expose only a single output (which would cover internal speakers, headphone jacks, S/PDIF etc.) and then do all the stream routing themselves. In Vista we made the decision to expose individual audio devices as distinct outputs; one side effect of this is that we lost the "automatic" broadcast mode.
Even in the old days, it wasn't perfect. If you had multiple audio drivers, broadcast mode wouldn't work between drivers. For example, USB speakers wouldn't broadcast with your onboard AC97 audio (or nowadays, with your Bluetooth headset.)
Matthew van Eerde -
Monday, November 14, 2011 9:30 PMMatthew, is it possible to stream audio from Windows Media Center to specific output (e.g. video card's HDMI), and ALL other audio output to default playback device (e.g. X-Fi's output)?
-
Tuesday, November 15, 2011 1:12 AMModeratorNo, that's not possible. Windows Media Center plays to the default device. (Even though it looks like there's a way to choose the device, what's actually happening is Media Center is changing the default device for the whole system.)
Matthew van Eerde -
Tuesday, November 15, 2011 5:59 PMWhy MS just didn't make the same simple option as the one in Media Player... Just select the device to use. I do not trust in Microsoft anymore :). Okay, if I will not play games and have my kids watch cartoons through Media Center simultaneously... If I just switch default audio device when I start Media Center? Is there any solution to automatically switch default audio device when I start specific application (and switch back when I close it)? Or at least any possibility to switch default audio device with MCE Remote button?
- Edited by Vladimir Krilov Tuesday, November 15, 2011 6:01 PM
-
Thursday, January 19, 2012 11:21 PM
I have been researching this problem like crazy. First some background.
I do all my development in vb6 and have been programming my entire life (I am quite old). The application/code is for my own Home theater. The PC has "three audio devices" according to control panel: HDMI output, Toslink output, and speakers. The audio is all on the mobo (It is an Asrock HD Vision machine using a realtek audio system on the mobo). I have HDMI set as the default output so that when I play a movie on the PC, actually an AVI trailer, the audio output goes out the HDMI port of the PC along with the video. The OS is Win 7.
When the PC starts I want it to play a wave file, but not out the HDMI port but rather the speaker jacks. This allows some background music while the system components (Projector, A/V Processor, Audio amp, etc.) power up. Since the external Audio components are not fully powered up, there is no way to have any audio playing over that path. If I make the speakers the default output device that works fine if the external audio components are ready. I am doing the audio (playing the wav file) using sndPlaySound from the winmm.dll library.
Now my question is how do I either switch the default audio device to speakers and then back again based upon where I want the audio to go, or how do I issue audio (play a wav file) to a specific audio output device that is not the default? I have no issue playing in the registry programmatically and have done so many times in the past. I just need to know what needs to be changed.
I have full programming flexibility, at least as much as VB6 provides, I just can not find any refrences to how to do this using the windows api's, i.e. play a WAV file to a specific output device that is not the default device.
Any help/advice/assistance will be greatly appreciated!
-
Friday, January 20, 2012 1:06 AMModerator
There's no way to programmatically change the default audio device.
I'm trying to think of an API that can be wrapped in VB6 and allows playing to a non-default device.
PlaySound, Beep, MFPlay, and MCI don't allow playing to a non-default device as far as I can see.
waveOut, DirectSound, DirectShow, and WASAPI all allow playing to a non-default device but require writing a render loop which is a pain in VB6.
Media Foundation might be worth a look or perhaps there is something already written you can leverage. For example I have a play-exclusive.exe here:
Run play-exclusive.exe --list-devices to see the names for all of your devices.
Run play-exclusive.exe --device "Device long name" --file "WAV file name" to play a .wav file (in exclusive mode, which isn't really what you want, but should suffice to wake up the device) to a specific device.
Matthew van Eerde- Proposed As Answer by Stamatis Pap Wednesday, November 21, 2012 2:33 PM
- Unproposed As Answer by Stamatis Pap Wednesday, November 21, 2012 2:33 PM
-
Friday, January 20, 2012 1:13 AMModerator
I poked around on the web and found a VB wrapper of DirectSound here: might be worth a look.
http://directx4vb.vbgamer.com/DirectX4VB/Tutorials/DirectX7/DS_StreamFromFile.asp
I haven't actually tried it though.
Matthew van Eerde -
Friday, January 20, 2012 4:51 AMThanks Mathew. I just pulled the VB wrapper code you discovered. I will play with it and let you know how I make out.
Barry V Gordon -
Thursday, February 16, 2012 10:37 AM
It's hilarious that this has been open for five years and not one widely applicable solution has been presented. It's so painfully hilarious that I was compelled to register and remark on it.
-
Thursday, February 16, 2012 2:25 PMModerator
The asked-for feature (allow the user to play individual applications to individual sound devices) was delegated to applications, and only some applications (Windows Media Player, WinAmp, ...) provide this. Others (Windows Media Center, ...) do not.
So there is no widely applicable solution with Windows as it stands today.
Matthew van Eerde
-
Friday, March 16, 2012 8:07 PM
IndieVolume allows one to bind a specific app to a specific output device, dealing with the problem of separating game sounds from, say, movie sound if the applications used don't allow for manual device selection.
It can also "broadcast" audio by including your existing output devices under a virtual output device, making it possible to have one output source playing on multiple output devices.
It really is the program I think we - or at least myself - have been looking for... HOWEVER, the latest version is quite old (2010) and doesn't seem to work properly, at least on win7 x64.
Feel free to put some pressure on the developer to get things running smoothly :)
-
Friday, March 16, 2012 11:01 PMModeratorInteresting. How does it work?
Matthew van Eerde
-
Tuesday, March 27, 2012 4:55 AMConsidering this has still been open all this time, can it please, for the love of God, be escalated to someone that can actually provide a useful change? Not just explain why it doesn't work, not to point out workarounds, but to actually fix this blatant flaw that it seems could be very easily fixed. I think I speak for a lot of people when I say that I don't want to hear why it doesn't work, I just want it fixed so that it does work.
-
Tuesday, March 27, 2012 6:15 PMModerator
I want to thank everybody that has taken time to post feedback on the forum. I try to make sure that it all goes to the people who make the decisions; we consider user feedback carefully as part of Windows feature planning.
Be aware though that not every feature is as simple as it first appears.
Matthew van Eerde
-
Monday, July 30, 2012 3:18 PM
Maurits, thanks for your attention and support.
Let's summarize our desires, to make it easy for the Windows design team to understand what we want:
We want to control what audio device is used per application.
Does that pretty much sum it up?
In my case, same as Dedoar, I want to listen to streaming audio on my speakers, but have all other apps default to USB Headset. Since many apps do not have this ability (Though, to be fair any app that uses sound should be able to have its audio properties adjusted, even web browsers), it seems like it should be a basic feature of the OS.
-
Tuesday, October 09, 2012 4:40 PM
I completely agree with the above post form schmeckendeugler
and also bump
- Edited by SpetaPeta Tuesday, October 09, 2012 9:28 PM
-
Wednesday, October 10, 2012 8:13 PMModeratorThis feature currently does not exist in any version of Windows, but please continue to give feedback.
Matthew van Eerde
-
Wednesday, October 10, 2012 9:13 PM
Hello
I think i have exactly the same (old) problem ..
I never try to modify "Windows" so i don't know how they made programs (probably C , C++ or C#) and i would love to know if there is a way to get the sndvol code source to be able to see if there is a way to modify it to realloc a program to another output..
I would love to make something like that : a click on the icon of the application will open the list of avaible output and then a click on the output in the list will realloc the program to the clicked input. I really think that can be not so hard to do and be a great first job ( even if that will not be a solution for some who want to have the program on many outputs).
(I'm sorry if my english is bad somewhere ... ask if it s not understable ^^ )
- Edited by M a t h i e u Wednesday, October 10, 2012 9:30 PM
-
Wednesday, October 10, 2012 10:54 PMModeratorUnfortunately the UI is only a piece of the larger puzzle. The hardest part of implementing a feature is deciding which of the 1000 good ideas to do, given that you will only have time to do maybe 3 of them.
Matthew van Eerde
-
Tuesday, October 16, 2012 1:40 PM
Hello,
Me too I have been trying to find a suitable solution to this problem.
I have been trying to understand how the problem could be handled and maybe we could use WASAPI to get to the desired result.As far as I understand it we would need to create an app that would:
Enumerate all audio sessions (ID, Name, preferably icon) (IAudioSessionEnumerator)
Enumerate all endpoint devices (IMMDeviceEnumerator)
Have a small UI (basically like the windows 7 mixer) where we see the streams name and icon and under it a little drop down menu where one can see the active endpoint for the audiosession.
Now to the tricky part: as far as I understood the different documents I read here, there is the possibility to route streams:
To do so:
- we need know on which device the stream was playing
- save where the current point of the stream
- position mapping calculation?
- Get Id of new device endpoint (IMMDevice::GetId)
- reroute the stream to new device (MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID)
So summing it up:
App starts: enumerates all audio sessions (displays name and icons)
Under each audio session we have a dropdown menu listing all possible device endpoints
The user can then change the audio device and click on a button which:
- will check which device the session is currently playing on
- save the current point of the stream
- do some position mapping calculations?
- Get the ID of the device endpoint that the user changed to
- Stops the output of the session to the old device
- reroutes the stream to the new device.
I hope I got all the points correct for it to function in theory. Now the "only"thing left would be to program this. ;)
-
Tuesday, October 16, 2012 3:38 PM
I have given up any hope of Microsoft resolving this issue at any time. I consider this thread useless with regard to Microsoft's resolving the issue. It has been useful to me however in that it pointed me to the indieVolume application with which I was able to solve my problem after a little work. My situation:
I use a PC (win 7 64 bit) to control my Home theater. It runs an application I developed which gets its direction from a Pronto PRO or iPad over TCP/IP. Within this application there is a slide show system and a component to play movie trailers. When the app is full operational all audio goes to the theater audio system (anthem AVP 50v) over HDMI. When the app is idle it is sleeping in state s3. When it wakes up because the Pronto told it I want to watch a movie or TV, it starts the theater by turning on the components which takes a while for the audio system and projector to become fully operational. Under Win XP I could play some music over the PC speakers during the warmup period using a small audio system connected directly to the PC's speaker outputs as the Audio system was not yet operational.
Under Win 7 this is not possible. I now fork off a seperate app that plays the music I want as long as a specific file exists. I use indieVolume to assign that app to use the speakers and my main app to used HDMI. When the main app sees that the theater is fully operational it kills the control file and the small music playing app fades out the music and exits.
Works for me.
Barry V Gordon
-
Tuesday, October 23, 2012 11:44 AM
Does someone actually have any idea as to how to make this work because the way i'd like it is as follows:
1 audio program like vlc media player or a browser window sending the audio to my speakers aka the back audio ouput on my pc
and the rest sending it to my headphones aka the front audio ouput on my pc
-
Tuesday, October 23, 2012 4:58 PMModerator
In VLC Media Player you can change the output device to a specific device as follows:
Tools | Preferences | Audio | Output | Output module | DirectX audio output | Device
Change from "Primary Sound Driver" to the output you want VLC Media Player to play to.
Matthew van Eerde
-
Tuesday, October 30, 2012 10:56 PM
I was just using vlc as an example but lets say we want to have a browser window sending the audio to 1 audio output and a game to another
is there a way to make this happen using windows 7?
-
Wednesday, October 31, 2012 12:03 AMModerator
Depends on the browser and the game. If either the browser or the game allows you to play audio to a non-default audio device, then yes; if both the browser and the game will play only to the default audio device, then no.
Matthew van Eerde
-
Wednesday, October 31, 2012 4:41 PM
but why is this not a feature of the OS.
Also if you need ideas to make this work I can list a few right now
1: make it so that if you play audio it will go to the device that is selected as default at that time and if you change the default audio device then the audio does not transport to the new default audio device.
2: make it so that if we were to click on an app in the mixer, we get a list of available audio devices to choose where the audio of the app goes.
that was all I could think of right now but if I think of more I'll post here.
-
Wednesday, October 31, 2012 5:31 PMModerator
> why is this not a feature of the OS
Basically because, by default, things are not features; somebody has to implement them. (Actually, before that, somebody has to decide which features are on the list to implement for the release being worked on.)
Interestingly, Windows Vista behaves exactly as you describe in 1). So if you install Vista, set the default device to device A, start up your browser, and start playing audio, it will go out over device A.
If you then change the default device to device B, and start up your game, it will play audio to device B.
We fixed this in Windows 7. Now when you change the default device to device B, the browser will immediately switch to the new default, instead of continuing to play over device A.
Matthew van Eerde
-
Sunday, November 18, 2012 9:39 PM
We (I think I can speak for everyone in this topic) think that you have broken it instead of make it better.
but OT do you know or anyone in this topic know of a way to get his to work in the way described in my previous message?
-
Monday, November 19, 2012 9:00 AMModerator
OK, we "fixed" this in Windows 7. :-)
Matthew van Eerde
-
Tuesday, November 20, 2012 5:56 AMWhat about windows 8? Is it possible to manage which output is used for which application separately with this OS or is it more like win7 on that matter?
-
Tuesday, November 20, 2012 5:20 PMModeratorWindows 8 is the same as Windows 7 in this respect.
Matthew van Eerde
-
Wednesday, November 21, 2012 7:35 PM
"There's no way to programmatically change the default audio device."
You have no right. There is a way to programmatically change the default audio device... Where is my previous reply? Censorship?
Stamatis
Application Developer
-
Wednesday, November 21, 2012 7:46 PMModeratorI deleted it.
Matthew van Eerde
-
Wednesday, November 21, 2012 7:52 PMA reason?
-
Wednesday, November 21, 2012 7:56 PMModerator
I don't believe it's appropriate to discuss reverse-engineered Windows interfaces on a public developer forum targeted at developers who will be writing consumer-facing apps.
Also, the interface in question does not enable the scenario in this thread: "I have two apps which will only play to the default (console) device, and I want app A1 to play to device D1 and app A2 to play to device D2, at the same time."
Even with the reverse-engineered interface, there's no way to do this on Windows 7 or Windows 8.
Matthew van Eerde
-
Wednesday, November 21, 2012 10:00 PM
I understand what you mean but that reverse engineering came from this thread “Programmatically setting the default playback device (and recording device)”
at http://social.msdn.microsoft.com
That thread solves me a lot of problems.
One more...
I run 9 instances of speaker dot exe (TTS voice application homeseer technologies), each one with different name, ex:
Speaker.exe Hall
Speaker.exe LivingRoom
....
and binding each speaker dot exe to different USB sound card. The sound cards use generic audio driver in windows 7. Each Soundcard has names like Hall, LivingRoom ,… (Instead of the name “Speaker” of win7)
After launching 9 Instances of Speaker dot exe and binding them correct to each soundcard, I set programmatically Default Audio Device the internal Speaker Digital Audio (S/PDIF) (not the USB soundcards)
The 9 Instances of Speaker dot exe work with no problem, ex:
TTS command Speak to Hall instance use Hall Soundcard
TTS command Speak to LivingRoom instance use LivingRoom Soundcard, …
The problem…
If I change windows 7 default audio device (manual or programmatically), then the binding of speaker dot exe's to the sound cards shift, ex:
TTS command Speak to Hall instance use LivingRoom Soundcard
TTS command Speak to LivingRoom instance use Kitchen Soundcard, …
Then if I go to the options menu of each instance of speaker dot exe and I click OK to the Audio Output (the names of the sound cards not change), then all are normal again, ex:
TTS command Speak to Hall instance use Hall Soundcard
TTS command Speak to LivingRoom instance use LivingRoom Soundcard, …
If I change windows 7 default audio device (manual or programmatically) again to another device, then the binding of speaker dot exe's to the sound cards shift again ...
It’s a mess..
Any suggestions?
- Edited by Stamatis Pap Wednesday, November 21, 2012 10:15 PM
-
Wednesday, November 21, 2012 10:09 PMModerator
What API are you using for audio output, and how are you binding your instances of your .exe to the various output devices? For example, are you using the Microsoft ISpVoice text-to-speech engine, and ISpVoice::SetOutput?
Apps can implement IMMNotificationClient::OnDefaultDeviceChanged and register themselves with IMMDeviceEnumerator::RegisterEndpointNotificationCallback to be notified when the default device changes.
Matthew van Eerde
-
Wednesday, November 21, 2012 10:28 PM
in this forum microsoft said "body text cannot contain images or links until we are able to verify your account"
How can i send an image?
-
Thursday, November 22, 2012 12:14 AMModerator
I poked around in Speech API a little and all of the "audio out" object tokens have a "DeviceId" string attribute which is the WASAPI endpoint ID.
So although the enumeration order might change, you can rely on the WASAPI endpoint ID to stay the same.
-- SPCAT_AUDIOOUT --
#1: [[Speakers] ([High Definition Audio Device])]
Attributes
Vendor = Microsoft
Technology = MMSys
(default) = [[Speakers] ([High Definition Audio Device])]
CLSID = {A8C680EB-3D32-11D2-9EE7-00C04F797396}
DeviceName = [[Speakers] ([High Definition Audio Device])]
DeviceId = {0.0.0.00000000}.{c2cbdacb-a70d-4629-8368-542a00f5a4b0}This obviates any need to know or care about what the default device is.
I'll post the code I used to spelunk the speech properties shortly.
Matthew van Eerde
-
Thursday, November 22, 2012 12:40 AMModerator
Here's the code I used to dump Speech API object properties. Note the WASAPI endpoint ID appears on audio outputs as a "DeviceId" string value.
Matthew van Eerde
-
Thursday, November 22, 2012 8:09 AM
Thank you for your help.
Speaker dot exe its a part of a commercial application (homeseer tech) and i don't know what API they use. Can't that be fix outside the application?
the results , I will post to homeseer forum, to the development team.
-
Thursday, November 22, 2012 3:50 PMModerator
Wow... lots of interesting audio-related posts in those Homeseer forums.
Matthew van Eerde
-
Thursday, November 22, 2012 10:11 PM3 major problems exists: 1. Shifting USB sound cards when default Sound device change -- from vista to win 7 or 8 2. Shifting USB sound cards when PC is rebooting -- from xp to win7 or 8 3. How to rename USB sound cards that use generic audio windows drivers -- from xp to win7 or 8


