3

How can I change the default playback device in windows 7, .net 4/4.5. I change the default device frequently and I want to make a little C# application to switch faster.

Is it even possible? Please help me.

Sp3ct3R
  • 715
  • 1
  • 12
  • 24
  • 3
    possible duplicate of [C# How to programatically change the playback device](http://stackoverflow.com/questions/1555156/c-how-to-programatically-change-the-playback-device) – Marc B Sep 26 '11 at 16:49

2 Answers2

1

Yes it is. However microsoft somehow did not want us to tamper with this. You can follow this project : http://www.codeproject.com/Articles/31836/Changing-your-Windows-audio-device-programmaticall

and adapt it to use with C#.

I have done something similar so it's not so hard to do!

Dan Stevens
  • 6,392
  • 10
  • 49
  • 68
FailedDev
  • 26,680
  • 9
  • 53
  • 73
  • That code project does not seem valid. It opens the Sound panel which does not have a drop down box for audio. Is this for an older version of windows that no longer uses that dialog? – JeremyK Jun 12 '13 at 22:04
  • @JeremyK Yes it seems so. There is just no official API to temper with this. You can however use the same technique by just adjusting your code for the new version. I am not sure what happens with windows 8.. – FailedDev Jun 17 '13 at 08:15
  • I was using Windows 7 when trying to use it. I know it can be altered, just thought id mention it. There is another solution that actually uses Windows calls to make this happen. http://www.daveamenta.com/2011-05/programmatically-or-command-line-change-the-default-sound-playback-device-in-windows-7/ – JeremyK Jun 17 '13 at 10:51
0

I think you'll be able to do this by editing the registry. You get many programs to take snapshots of your registry. In doing this you'll be able to see where the changes are being made. It will take some time but is worth it. Also note that if this is Windows 7 you'll have to jump through hoops to be able to make some changes.

Good luck!