Hi,
Microsoft does not provide a progmatic method for setting the default audio device. You could probably manipulate the registry directly to change the default audio device. On Windows XP and below the following will work:
Changing your Windows audio device programmatically using VC++[
^]
On Vista and above the registry key is located at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio
There is an undocumented/unsupported COM interface
IPolicyConfig which is demonstrated here:
http://eretik.omegahg.com/download/DefSound.rar[
^]
Best Wishes,
-David Delaune