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

Add intential sound delay to sync up with sampling?

May 1, 2013 at 10:12 PM
I looked at the SampleAggregator as an example and did the same thing-

I use a NotifyingSampleProvider's ".sample" property to create FFT data for analysis.

Everything works great, but the analysis finishes a bit behind the actual sound (duh).

Is there a way to allow the sound processing to continue at its normal rate (so NotifyingSampleProvider's samples arrive normally) but to delay the actual sound OUTPUT behind that a bit, so that my analysis syncs up better with the sound?

Sorry if it's a confusing question - please let me know if I need to provide any more information.
May 2, 2013 at 12:46 AM
Nevermind, I was looking for "DesiredLatency".
var inputStream = CreateInputStream(fileName);
                WaveOut useMeInstead = new WaveOut();
                useMeInstead.DesiredLatency = desiredLatency;
                useMeInstead.Init(new SampleToWaveProvider(inputStream));
                playbackDevice = useMeInstead;