Does anyone know if it is possible to set the audio playback device programatically on Windows 7? (I've 开发者_运维技巧seen quite a few posts on this but no 'good' answers). I don't really want to change the default playback device. E.g. If I have 2 sound cards and want the default to be sound card 1, I'd like my app to be able to use sound card 2. Thanks in advance
I believe you can do it using IMMDeviceEnumerator Interface.
Check out the Windows SDK core audio (winsapi) samples for code.
精彩评论