代码不起作用,请检查一下我写错了什么?!请帮忙。
openFileDialog openFileDialog = new openFileDialog();
openFileDialog.Filter = ("Wave Files (*.wav)|*.wav|All Files (*.*)|*.*");
openFileDialog.FilterIndex = 1;
WaveFileReader reader = new NAudio.Wave.WaveFileReader(dpmFileDestPath);
WaveFormat newFormat = new WaveFormat(8000, 16, 1);
WaveFormatConversionStream str = new WaveFormatConversionStream(newFormat, reader);
try
{
WaveFileWriter.CreateWaveFile("C:\\Konvertierten_Dateien.wav", str);
}
catch (Exception ex)
{
MessageBox.Show(String.Format("{0}", ex.Message));
}
finally
{
str.Close();
}
MessageBox.Show("Konvertieren ist Fertig!");
}
这是一个代码,不工作。