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
C#
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
Code
An unhandled exception of type 'NAudio.MmException' occurred in NAudio.dll
Additional information: AcmNotPossible calling acmStreamOpenHow can i solve the error ?
--Here i am using Naudio Dll

Faris Shahin47 reputationPosted Nov 10, 2016, 8:38 AM EST
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: