views:

806

answers:

2

How to record wav sound from mic using Windows API?

+3  A: 

There are a series of waveInXXX Windows APIs that you can use to record audio. (i.e. waveInOpen, waveInPrepareHeader, waveInAddBuffer, waveInStart...) These will record audio in 'raw' PCM format, which you can then put into a WAV file. (A WAV file can basically be just a RIFF file container that 'contains' the raw PCM audio. See, for example, http://ccrma.stanford.edu/courses/422/projects/WaveFormat/)

Heng-Cheong Leong
A: 

See all the MSDN samples (WSDK) doing exactly that, always the only reliable samples, of course