public void RecodeFileToMonoWave(string source, string destination, int sampleRate) { using (var stream = factory.GetStream(source)) { using (var resampler = factory.GetResampler(stream, sampleRate, Mono)) { factory.CreateWaveFile(destination, resampler); } } }
public void RecodeFileToMonoWave(string pathToFile, string pathToRecodedFile, int sampleRate) { using (var stream = naudioFactory.GetStream(pathToFile)) { using (var resampler = naudioFactory.GetResampler(stream, sampleRate, Mono)) { naudioFactory.CreateWaveFile(pathToRecodedFile, resampler); } } }