Is it possible to play a sound on two or more audio output devices simultaneously, and how to achieve this? If I understood well there are two questions here, mainly. 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.
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 this possible at all, with any audio library? Would threads be involved, and would those be safe? 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. However, from what I understand, each OAL device needs its context to be current in order for the buffer to populate/propagate properly. 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. Both you and your friends hear this sound at the same time, and have a good laugh about it. You're on Skype, and someone fails in a major way, so you hit the play button on the Price is Right fail ditty.
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.Īnyway, the idea is that you have a bunch of sound files loaded up and ready to play. I am trying to write a virtual soundboard that will output to multiple devices at once.