Any one help me how to capture pcm data from microphone in windows metro app using C#.
Asked
Active
Viewed 1,225 times
0
-
thanks for reply @RomanR.Actually i goggled lot and dint find any tutorial so i don't have idea about this so can u suggest me how to implement this. – user2239191 May 15 '13 at 08:04
-
What about this one: [How to record audio or video (Windows Store apps using JavaScript and HTML)](http://msdn.microsoft.com/en-us/library/windows/apps/hh452798.aspx), or this one: [Audio capture in metro apps](http://stackoverflow.com/questions/9880569/audio-capture-in-metro-apps) – Roman R. May 15 '13 at 08:05
-
Sorry @RomanR. i will try to do this in C# – user2239191 May 15 '13 at 08:07
-
[`MediaCapture`](http://msdn.microsoft.com/en-us/library/windows/apps/windows.media.capture.mediacapture.aspx) class there is available to both JavaScript and C#. – Roman R. May 15 '13 at 08:08
-
i am used mediaCapture class. but i don't know how to capture pcm data. – user2239191 May 15 '13 at 08:26
1 Answers
0
You need to write a C++ component that uses WASAPI, as far as I'm aware this can't be done in only C#.
There's a great working example here:
http://www.codeproject.com/Articles/525620/Recording-audio-to-WAV-with-WASAPI-in-Windows-Stor
The source code for the article is hard to find so here's a link:
http://www.codeproject.com/KB/audio-video/525620/RecordingWavFilesWithWasapiInWindowsRT.zip
I have previously used this in my C# app to allow people to pause their audio recordings.

Oliver Mahoney
- 706
- 1
- 9
- 17