tags:

views:

215

answers:

3

I need to capture PCM data from microphone in C++.

I'm a beginner.

How to do it?

+3  A: 

You can do this with the waveInOpen() and waveInStart() API functions. There's a sample project available here.

Hans Passant
+1  A: 

Check out The Synthesis Toolkit. They have a class called RtAudio that works on multiple platforms including Windows, OS X, and Linux. Beyond just giving you the PCM data, there are options for generating your own data, processing the data, and saving it to a standard file format.

just_wes
+1  A: 

It depends what you want to do with your data. If you just want to do capturing without any special processing then you would need some basic and easy to use libraries such as:

  • Media Control Interface
  • Waveform Audio

If your intention is to do some audio processing then you should probably take a look at:

  • DirectSound
  • OpenAL
  • DirectShow
  • Windows Core Audio
  • XAudio2
Adi