There are a number of Windows programming interfaces that you can use to record sound. (ie waveInOpen, waveInPrepareHeader, waveInAddBuffer, waveInStart ...) They will record audio in the "raw" PCM format, which can then be placed in a WAV file. (A WAV file can basically only be a container of RIFF files that contains the “original PCM sound”).
Here is the link to MSDN: Recording using audio format with format <
source
share