use DirectX 9, instead of calling a method like Play(*mysoundbuffer)
that will write the sound to a "soundcard buffer" ... you will call a
method Write(*mysoundbuffer, filename) that will take the same sound and
write it to a file .... this is essentially "capturing" the sound out.
see code examples from the DirectX 9 SDK.