title: Outputting Sound to Multiple Audio Devices Simultaneously
body: <p>OK, the first issue.  I am trying to write a virtual soundboard that will output to multiple devices at once.  I would prefer OpenAL for this, but if I have to switch over to MS libs (I'm writing this initially on Windows 7) I will.</p>
  
  <p>Anyway, the idea is that you have a bunch of sound files loaded up and ready to play.  You're on Skype, and someone fails in a major way, so you hit the play button on the Price is Right fail ditty.  Both you and your friends hear this sound at the same time, and have a good laugh about it.</p>
  
  <p>I've gotten OAL to the point where I can play on the default device, and selecting a device at this point seems rather trivial.  However, from what I understand, each OAL device needs its context to be current in order for the buffer to populate/propagate properly.  Which means, in a standard program, the sound would play on one device, and then the device would be switched and the sound buffered then played on the second device.</p>
  
  <p>Is this possible at all, with any audio library?  Would threads be involved, and would those be safe?</p>
  
  <p>Then, the next problem is, in order for it to integrate seamlessly with end-user setups, it would need to be able to either output to the default recording device, or intercept the recording device, mix it with the sound, and output it as another playback device.  Is either of these possible, and if both are, which is more feasible?  I think it would be preferable to be able to output to the recording device itself, as then the program wouldn't have to be running in order to have the microphone still work for calls.</p>