开发者

How to get PCM data from microphone in C++ (os Windows)?

开发者 https://www.devze.com 2022-12-21 17:38 出处:网络
I need to capture PCM data from microphon开发者_如何学JAVAe in C++. I\'m a beginner. How to do it?You can do this with the waveInOpen() and waveInStart() API functions.There\'s a sample project avai

I need to capture PCM data from microphon开发者_如何学JAVAe in C++.

I'm a beginner.

How to do it?


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


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.


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
0

精彩评论

暂无评论...
验证码 换一张
取 消