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

Capture and play in real time

Apr 17, 2011 at 8:56 AM

I am coding on an singing program, NAudio library is really helpful library on this, and just one thing make me puzzled, that I found the delay time a little bit long than I expected when recording, how to adjust delay/buffer time?

my code snipped below

var  waveIn = new WaveIn();
WaveInProvider inProvider = new WaveInProvider(waveIn);
var recordOut = new WaveOut();
recordOut.Init(inProvider);
recordOut.Play();
Coordinator
Apr 18, 2011 at 11:01 AM

You can adjust buffer sizes on both WaveIn and WaveOut using the DesiredLatency setting (in milliseconds). You'll have to experiment, as if you set it too low you will get dropouts.

Apr 21, 2011 at 4:29 AM

Appreciate, it works after I set recordOut.DesiredLatency = 50;