Search code examples
windowsaudiowavewaveout

Windows Core Audio API + WaveOutXxx API


I wave written a code to play back WAV files. I'm using the WavOutxxx APIs to accomplish this. It is well documented that WavOutXxx APIs open their streams to the default session. Now for certain reasons I'm trying to control the session opened by the WaveOutXxx APIs using IAudioSessionControl API (Windows Core Audio Interfaces).

Can you tell me if this is actually possible? My code does not involve an inter-process communication for this, since everything is handled in the same code. MSDN says this is possible(http://msdn.microsoft.com/en-us/library/dd371428(v=vs.85).aspx) but I don't see how to do this or any examples. It would be very kind if someone can point me to something relevant.

Thanks.


Solution

  • Yes, it is possible. Look at this example.