title: How can I notify my application that the default sound playback device has changed?
body: <p>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:</p>
  
  <pre><code>regKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Multimedia\Sound Mapper", true);
  </code></pre>
  
  <p>My app changes the "Playback" key value for the purposes of using the first or second sound card as the default playback device.</p>
  
  <p>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.</p>
  
  <p>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?</p>