You can't really do that easily. You would need driver code to intercept sound card i/o.

You can decode .WAV files and find out what they are generating

Go here:

www.wotsit.org

Lookup up WAV