This project has moved. For the latest updates, please go here.

How to increase sound in realtime?

Sep 14, 2011 at 2:54 PM

My code:

var buffer = new short [e.BytesRecorded / 2];
Buffer.BlockCopy (e.Buffer, 0, buffer, 0, e.Buffer.Length);
And:
foreach (var sample in buffer)
{
   double normalized = (double) sample / HalfSampleRate; / / -1 ... +1
   short multiplied =???
   / / I need to increase the volume, that it would remain within the (nonlinear). How to make it correctly?
   / / Other processing
}

Coordinator
Sep 15, 2011 at 1:42 PM

have a look at the WaveChannel32 code to see an example of how to do this