How to convert from any format to PCM in Windows

时间:2016-04-04 18:27:42

标签: c++ windows audio windows-phone-8.1 wasapi

I am using WASAPI to get audio data in c++ and Yeh!. I learned that conversion of audio data is not support in WASAPI, since it gives to and take from the core audio end points. I am working on a project to find exact audio frequency which needs simple PCM data only. but using WASAPI, I'm getting data with different format depends on audio devices. So, is there any simple API by windows to convert any data to PCM.

Note: I get audio using the method

IAudioCaptureClient::GetBuffer(&data,...);

or is there is any other api, that I can use It get data in PCM format directly for windows desktop and windows phone?

1 个答案:

答案 0 :(得分:0)

  • Audio Resampler DSP - most recent stock conversion API
  • Audio Compression Manager (ACM) - legacy converter offering conversions between PCM formats (also available through DirectShow wrapper over it - most likely you don't want to use it, but let's mention for the answer completeness)
  • Also worth mentioning FFmpeg's libswresample - popular alternative option for the conversion; you can easily find other libraries as well

See also: