Hi all,
In my application i ahve some .wav format audio files,so here i want to change Bit rate, for that i am using below code
int bitrate; using (var reader = new WaveFileReader(textBox1.Text))
{
bitrate = reader.WaveFormat.AverageBytesPerSecond * 8;
reader.Dispose();
}
if (bitrate > 128000)
{
using (var reader = new WaveFileReader(textBox1.Text))
{
var newFormat = new WaveFormat(8000, 16, 1);
using (var conversionStream = new WaveFormatConversionStream(newFormat, reader))
{
WaveFileWriter.CreateWaveFile(@"C:\Docs\Files\", conversionStream);
}
}
}
it is working for some files only, and some files get below error
An unhandled exception of type 'NAudio.MmException' occurred in NAudio.dllAdditional information: AcmNotPossible calling acmStreamOpen
How can i solve the error ?
--Here i am using Naudio Dll
Faris ShahinPosted Nov 10, 2016, 1:38 PM
You can use the LEADTOOLS SDK to know the subtypes of the multimedia files.
The following screenshot shows the subtypes of 2 different sample WAV files as shown by the Media Info demo of LEADTOOLS: