Wednesday, October 28, 2009

How to increase sound level using C#

To increase sound level using C# first of all you should add line:

using System.Runtime.InteropServices;

to allow using COM Interop in your class.

Next we derlare two functions from an unmanaged DLL:

Friday, October 23, 2009

Capture Sound and save into wav or mp3 file .NET C# example

It's surprising that there are no components for sound capturing in .NET Framework 3.5. Even designers of WPF and Silverlight 2.0 were focused on graphics so deeply, that they forgot about applications recording sound from user's microphone. It is said that the next version of Silverlight will provide such functionality.

However, what you often want to achieve is to store the recorded sound in MP3 file (or send it as MP3 stream). That's legally complicated due to MP3 patent constraints. And for the same legal reason, we can assume that we will not see MP3 functionality in Microsoft technologies soon (there is WMA instead).