This project has moved and is read-only. For the latest updates, please go here.

NAudio.MmException: NoDriver calling acmFormatSuggest at NAudio.Wave.Compression.AcmStream.SuggestPcmFormat(WaveFormat compressedFormat)

Jun 18, 2013 at 12:16 PM
Edited Jun 18, 2013 at 12:21 PM
Hi Mark,

I have used NAudio for getting stream from mp3 file.
Stream wavestream = new NAudio.Wave.Mp3FileReader(path);
This is working perfectly on my local machine.But it gives this error in the live server.
NAudio.MmException: NoDriver calling acmFormatSuggest at NAudio.Wave.Compression.AcmStream.SuggestPcmFormat(WaveFormat compressedFormat) at NAudio.Wave.Mp3FileReader.CreateAcmFrameDecompressor(WaveFormat mp3Format) at NAudio.Wave.Mp3FileReader..ctor(Stream inputStream, FrameDecompressorBuilder frameDecompressorBuilder) at NAudio.Wave.Mp3FileReader..ctor(String mp3FileName) at .......
Live server details are :
Windows Web Server 2008 R2
64 bit Operating system

I have installed Lame ACM MP3 Codec in the live server also.

So Why am I getting this error in the live server?

Is there any solution for getting stream from mp3 other than using this function (Mp3FileReader)?

Thank you.
Jun 19, 2013 at 8:49 AM
Mp3FileReader will work best with the Fraunhoffer MP3 codec. Lame is an MP3 encoder - so I'm not even sure it will contain a decoder. Also the expected WAVEFORMAT structure will likely be different between ACM MP3 codecs. If you can install the "Desktop Experience" component of Windows Server that might help.

Also, Mp3FileReader allows pluggable alternative MP3 frame decoders. So you can ask it to use the DmoMp3FrameDecompressor instead, which might be installed.
Jun 19, 2013 at 9:00 AM
Edited Jun 19, 2013 at 9:01 AM
Hi Mark,

Thanks for your reply.

I downloaded latest NAudio code and changed it according the solution you mentioned here.

http://stackoverflow.com/questions/5652388/naudio-error-nodriver-calling-acmformatsuggest

But I got this error after changing code into DmoMp3FrameDecompressor.
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {BBEEA841-0A63-4F52-A7AB-A9B3A84ED38A} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at NAudio.Dmo.WindowsMediaMp3Decoder..ctor() at NAudio.FileFormats.Mp3.DmoMp3FrameDecompressor..ctor(WaveFormat sourceFormat) at NAudio.Wave.Mp3FileReader.CreateAcmFrameDecompressor(WaveFormat mp3Format) at NAudio.Wave.Mp3FileReader..ctor(Stream inputStream, FrameDecompressorBuilder frameDecompressorBuilder) at NAudio.Wave.Mp3FileReader..ctor(Stream inputStream) at NAudio.Wave.Mp3FileReader..ctor(String mp3FileName) at ....................................
Jun 19, 2013 at 9:04 AM
looks like you don't have the DMO MP3 frame decompressor either.

And you don't need to change NAudio code. You can override the MP3 frame decompressor with the constructor that takes two parameters. Pass in (wf => new DmoMp3FrameDecompressor(wf)

I've got a fully managed mp3 frame decompressor over at nlayer.codeplex.com, but it's currently being worked on, so I wouldn't recommend using the latest code.
Jun 19, 2013 at 9:19 AM
Edited Jun 19, 2013 at 9:19 AM
If I install resampledmo.dll, then will it be ok?
Jun 19, 2013 at 9:21 AM
never tried it myself, but worth a go. It's com, so it will need to be registered. Did you try to install Desktop experience?
Jun 19, 2013 at 9:23 AM
I will try that also and come back to you
Jun 19, 2013 at 10:09 AM
Edited Jun 19, 2013 at 10:09 AM
Yes it is working.I installed "Desktop Experience"...Thank you so much for your help... :)