Method to change default audio device programmatically
-
Hi All, currently i am developing an application for audio playback, including local and online resources. I planned to use WMP SDK to help, however, one of my function needs me to be able to select/change the default audio device, however, it is not support by the SDK. I would like to know is there any other method to do so? thanks a lot
-
Hi All, currently i am developing an application for audio playback, including local and online resources. I planned to use WMP SDK to help, however, one of my function needs me to be able to select/change the default audio device, however, it is not support by the SDK. I would like to know is there any other method to do so? thanks a lot
-
StarMeteor, Change the registry settings in: HKCU\Software\Microsoft\Multimedia\Sound Mapper To the other device by "Name" in the keys - Playback and Record. hope that helps.. progload
Thanks for you reply :) however, I found a problem ... I use regedit to look into registy but fail to locate the key you mention.... any suggestion? Thanks
-
Thanks for you reply :) however, I found a problem ... I use regedit to look into registy but fail to locate the key you mention.... any suggestion? Thanks
StarMeteor, Yes, my mistake, apparently that only works with a soundblaster or compatable card installed. Sorry, I'm no expert with the MP9 sdk and I don't have two audio devices installed so I've got no way to test this but in the IWMEncDeviceControl.GetInput and IWMEncDeviceControl.SetInput functions it looks like this is where microsoft is doing that (IWMEncDeviceControl Object). Sorry I can't help you more, Take a look and see if this is what your looking for. (Notice the audio devices.. not the video devices) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmencode/htm/iwmencdevicecontrolobject.asp?frame=true[^] progload
-
StarMeteor, Yes, my mistake, apparently that only works with a soundblaster or compatable card installed. Sorry, I'm no expert with the MP9 sdk and I don't have two audio devices installed so I've got no way to test this but in the IWMEncDeviceControl.GetInput and IWMEncDeviceControl.SetInput functions it looks like this is where microsoft is doing that (IWMEncDeviceControl Object). Sorry I can't help you more, Take a look and see if this is what your looking for. (Notice the audio devices.. not the video devices) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmencode/htm/iwmencdevicecontrolobject.asp?frame=true[^] progload
Really thanks for your help ^^