change wav file ( to 16KHz and 8bit ) with using NAudio
问题 I want to change a WAV file to 8KHz and 8bit using NAudio. WaveFormat format1 = new WaveFormat(8000, 8, 1); byte[] waveByte = HelperClass.ReadFully(File.OpenRead(wavFile)); Wave using (WaveFileWriter writer = new WaveFileWriter(outputFile, format1)) { writer.WriteData(waveByte, 0, waveByte.Length); } but when I play the output file, the sound is only sizzle. Is my code is correct or what is wrong? If I set WaveFormat to WaveFormat(44100, 16, 1), it works fine. Thanks. 回答1: A few pointers: You