2

I'm trying to capture Microphone sound using C#, and i have searched Google for this thing and all what i am getting is non .Net Libraries , i only get open source ones Like NAudio and other like DirectX and DirectX.DirectSound which are for managed languages like C# but that is not what I'm looking for. and i have tried them both and i used this open source project as a reference in NAudio
http://voicerecorder.codeplex.com/
and i manged to capture sound and then output it on a speaker or a headphone but i am still having problems when saving the Wav file but i was wondering is there any .Net Built in libraries that can help me with my objective ?
Thanks for your help in advance :)

Yaser Jaradeh
  • 322
  • 1
  • 6
  • 27
  • I've attempted to do something similar in the past and it is pretty difficult. I don't believe that you can do this using built in .Net libraries to accomplish this. You are going to need a lower level library. – tier1 Sep 03 '13 at 21:20
  • @tkcsam thank you but can you point me to some libraries that can preform these tasks in some ease :) – Yaser Jaradeh Sep 03 '13 at 21:22

1 Answers1

5

i was wondering is there any .Net Built in libraries that can help me with my objective ?

Short answer: No, at least not at the present time.

The .NET framework does not provide any direct support for recording audio. This is the reason libraries like nAudio exist. You would neeed to use Com Interop and the Windows API to acheive this, and it would be no small task. Even the Coding4Fun article on recording sounds at Microsoft's Channel 19 website uses NAudio. Your best bet would be to follow their example.

David
  • 72,686
  • 18
  • 132
  • 173