Resample wav files

Feb 9, 2012 at 2:34 PM


Does NAudio support resample  (downsample) of wav files? I mean, for example I have wave file sampled at 32 000 Hz, a I want convert it to 16,8, or 4 kHz. It's not only a simple conversion by picking samples depends from divide factor. I tried that and it gives extra noise in comparison with output from programs like GoldWave.

Maybe u have any idea how to convert properly, minimizing noise (ex. form quantization)?

Feb 9, 2012 at 7:02 PM

Another question that I have:

I found a low pass filter at BiQuadFilter in NAudio.Dsp. How to use that low pass filter to recorded wave file? Any example to filter samples?

Feb 10, 2012 at 12:19 PM

NAudio can resample using ACM, or with the DMOResamplerStream (if the DMO resampler COM object is on your box). I don't think either of them do filtering though so there is possibility of aliasing when downsampling. The BiQuadFilter was a very early addition to NAudio, and probably needs to be made into an IWaveProvider or ISampleProvider to make it more easily usable.