Hi all,
For fun, I was using MAD to 'MP3ize' ScummVM (I will let people unaware of what it is to research it on Google :-) ) to reduce the size used by the sound effect data files.
For that, I am using the code attached to this mail (extracted from the ScummVM code for ease of debug). If you want to test this on a Linux box, just compile it and do NOT forget to redirect STDERR to a file (as it will output the 'raw' samples there).
When playing the MP3 you can find here : http://www.bbrox.org/debug_002.mp3 with MadPlay, it works perfectly. Whereas with my small tool, it almost works but there are a lot of garbade noises added (some sort of clicks, but at a low frequency).
I have already used MAD in my movie player, and (as far as I know), I did exactly the same sort of processing there (and in my movie player it works).
So what did I do wrong :-) ? I need another pair (pairs ?) of eyes because it's now been one day that I look at this and I still cannot find what I did wrong.
Lionel (dreading to find THE obvious bug 2 seconds after pressing the 's'(end) key :-) )
[big snip]
So what did I do wrong :-) ? I need another pair (pairs ?) of eyes because it's now been one day that I look at this and I still cannot find what I did wrong.
Lionel (dreading to find THE obvious bug 2 seconds after pressing the 's'(end) key :-) )
Well, I was so afraid that I even forgot to attach the source :-) Sorry for that.
Lionel
Lionel (dreading to find THE obvious bug 2 seconds after pressing the 's'(end) key :-) )
Thanks all for your patience and no need to investigate, found the problem.
Lionel (with a brown paper bag on his head)