Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to record wav sound from mic using Windows API?

How to record wav sound from mic using Windows API?

like image 622
Daniel Silveira Avatar asked Oct 22 '25 06:10

Daniel Silveira


1 Answers

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).

Here is the MSDN reference page: Recording with a Waveform-Audio Device

like image 149
Heng-Cheong Leong Avatar answered Oct 23 '25 22:10

Heng-Cheong Leong