AcmNotPossible for silence mp3 file

Jun 20, 2011 at 4:43 PM

Hi everybody,

I get the AcmNotPossible error on NAudio, calling acmStreamConvert in AcmStreamHeader.cs::Convert. This exception raises only for mp3 files with no waveform inside, file that contains only silence.

If you want i can give you two sample mp3, with the same audio format, one full of silence and one with voice.

I'm sorry for the poor information that I can give you.

Bye, D.

Jun 22, 2011 at 8:13 AM

if you make the MP3 file available for me to download somewhere I can run it through my test harness and see what's going wrong

Jun 27, 2011 at 10:50 AM

Here!2600 you can find 2 mp3 files, with speaking name.

The file with no waveform is named 20110620162955 - DoesNotWork.mp3

Thank you for the support.

Bye, D.

Jul 5, 2011 at 10:03 AM

there is a corrupt/wierd frame at the beginning that has a different sample rate to all the others which is tripping NAudio over.

Jul 5, 2011 at 10:18 AM

Thank you for your reply, the file is generated with lame.exe with param -V 2, and the source file is a wav PCM 16bit, 8khz Mono.

Do you think that is a bug in lame mp3 generation?

Bye, D.

Jul 5, 2011 at 10:20 AM

looks like LAME is putting some kind of header on the file that NAudio is interpreting as an MP3 frame. Never seen this before. What version of LAME are  you using?

Jul 5, 2011 at 12:39 PM

version 3.98.4

Jul 5, 2011 at 12:55 PM

probably need to make NAudio more fault tolerant, but this example is a real pain. The sample rate we read from the first frame is the one we use to open the soundcard with. If subsequent ones are from a different sample rate we either need to close and reopen the soundcard or implement on the fly SRC. Neither is a nice solution.

Jul 5, 2011 at 1:01 PM
Edited Jul 5, 2011 at 1:01 PM

I understand it clearly. No problems, this is a strange condition also for us, cause a file with no waveform as the one i posted is not useful. I write here only to improve you project, which is very complete and really appreciated.

Thank you another time for your work. Bye, D.