Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the simplest way to continuously sample from the line-in using C#

I want to continuously sample from my PC's audio line in using C# (then process that data). What is the best way to do the sampling?

like image 754
Venus Avatar asked Oct 23 '08 05:10

Venus


1 Answers

You can do some (basic) audio capture using the open source NAudio .NET Audio Library. Have a look at the NAudioDemo project to see a simple example of recording to a WAV file using the WaveIn functions. NAudio also now includes the ability to capture audio using WASAPI (Windows Vista and above) and ASIO (if your soundcard has an ASIO driver).

like image 75
Mark Heath Avatar answered Sep 30 '22 18:09

Mark Heath