Software: Recorder: A .NET recording component
Posted 751 days ago
As I found out a few months ago when trying to write an application which recorded audio from the sound card, there isn’t an easy way in C#. Your choices are twofold: managed DirectAudio with its lack of documentation or unmanaged Win32 apis.
In an attempt to make things simpler, I created this library, which allows you to read data from any soundcard with only a few lines of code.
Version 0.5 is available here.
In addition, I have created a sample project (pictured above) which demonstrates how to use the library. It can be downloaded from here.
Using the library is as simple as this:
Recorder recorder = new Recorder();
recorder.Start();
recorder.Stop();
recorder.WriteWave("test.wav");
Data is captured in the PCM format, which is the simplest format for digitizing analog waves. PCM works by sampling a wave a different points, then quantizing the amplitude at those points.
Note: Recorder requires VS2005, as well as a relatively recent release of managed DirectX. The former can be downloaded for free as an Express Edition, while the latter can be downloaded from Microsoft here.
Note also that due to problems with managed DirectX, you must disable the loaderlock exception from within your directX project. This can be done by typing ctr-d, then e, then opening the Managed Debugging Assistants list, and unchecking LoaderLock.
Posted by: Micah Wylde | Permalink | Comment [1]
Search:
This site is a collection of musings and articles on varied topics such as web standards/css, programming, digital rights, and, well, accordions.