Help - Search - Members - Calendar
Full Version: Decoding with Fraunhofer ACM
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
spambouncer
Hello everyone!

I'm having trouble decoding MP3s with the Fraunhofer ACM. Every time I call acmStreamConvert() in the conversion loop, the output starts with a period of complete silence (~600 samples) followed by a fade-in to full volume (~400 samples). However, the waveform is not shifted in time, it's just a fade-in.

I've been debugging this for days now and can't figure out what I'm doing wrong. There's not much one could do wrong in the first place. No info on the web either, seems I'm the only one having that little problem. According to tests on this site, the FhG ACM is even one of the best decoders around.

I followed the Fraunhofer sample code. I permutated through all possible combinations of the ACM_STREAMCONVERTF_START/END/BLOCKALIGN flags. I reinstalled the ACM. All to no avail.

Is there another MP3 decoding ACM out there (for testing if it's my code or the ACM)? I feebly tried compiling the LAME ACM with decoding enabled, but having to meddle with all those settings in all those configurations freaks me out...

I got the feeling this is something really stupid on my side. Please be kind. Any help is greatly appreciated.

Thanks,
Andreas
benski
Skip the first 529 samples to compensate for delay in the decoder. Encoders add their own delay as well, typically 576 samples but it varies per encoder. Some encoders also write a silent first frame (Xing or VBRI frame) and store data in the ancillary portion such as a seek table. LAME is also nice enough to write its encoder delay in this first frame.
spambouncer
QUOTE(benski @ Apr 23 2008, 14:18) *

... Encoders add their own delay as well ...


I know, I know. My problem was that there was silence at the start of _every_ chunk of data coming out of the decoder, not just the first.

But never mind, now that I cried for help, I was finally able to figure it out myself. There was nothing wrong with the codec or the code calling it, the culprit was the legacy audio buffer monster class hierarchy I'm forced to use here. Bypassing it solved the problem. Took me almost a week... headbang.gif

Thanks for caring,
Andreas
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.