I have two sound cards on my Win XP SP3 computer, and I've written a C++ app, with which I change the default playback device by editing the following Registry entry:
regKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Multimedia\Sound Mapper", true);
My app changes the "Playback" key value for the purposes of using the first or second sound card as the default playback device.
The problem is when I change the default device, the application still uses the old one (which was set as the default when the program starts). If after change, I launch the application again, everything works fine and I can use the "new" default playback device.
How can I "tell" for my application that I have changed the default device? By what way does the application read and store the variable on starting up which sound device is default in Windows? Is there any solution for my problem?