If I play sounds using PlaySound(), is there a way to get a copy of the raw waveform information that's headed to the speakers?
Or maybe a third-party library could do this?
I'd like to write the data to a file in wav format.
Any suggestions on how this might be possible would be gratefully appreciated.
the speakers get a simple electric signal.
you can capture that with the right hardware, possibly even by just using a male to male speaker out punched back into the microphone input slot if you get low level access to the sound hardware.
or you can put various analog to digital cards into your computer and wire the speaker signal to them.
but otherwise there is a driver in the middle that converts the data from what you have to what the speaker needs and jumping into the middle of that is at best difficult.
however it should be possible to take what you have and save it as a wav file.
if you just want the file and don't care how you got it, you can certainly feed the output to the input and fire up a capture program that can record from the input line.