Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#6834 closed defect (fixed)

MP3: ScummVM doesn't skip ID3 tag at beginning of file?

Reported by: eriktorbjorn Owned by: criezy
Priority: normal Component: Audio
Version: Keywords:
Cc: Game:

Description

There has been some discussion on the forum recently [1] about how there's a brief burst of noise at the start when ScummVM plays certain MP3 files. My guess is that our MP3 decoder does not properly skip ID3 tags.

I've never managed to understand how to use libmad, but perhaps SoX's MP3 decoder [2] can give some ideas for how to do it? I wasn't able to get it to work myself when I tried it, but it was rather late at night...

[1] http://forums.scummvm.org/viewtopic.php?p=81394 [2] https://sourceforge.net/p/sox/code/ci/master/tree/src/mp3.c

Ticket imported from: bugs/6834.

Change History (4)

comment:1 by eriktorbjorn, 9 years ago

Component: Engine: ZVision
Game: Zork Grand Inquisitor

comment:2 by criezy, 9 years ago

Owner: set to criezy
Resolution: fixed
Status: newclosed

comment:3 by criezy, 9 years ago

I have just committed a fix to skip the ID3 tag at the start of mp3 files in our decoder (commit 5c7cc82).

As clone2727 noted on IRC, this could have been implemented in a different way by looking for the mp3 sync bytes in the file (I believe they are 12 consecutive bits set to 1, i.e. 0xFFF) but I was not sure how to do that efficiently.

comment:4 by digitall, 5 years ago

Component: Audio
Note: See TracTickets for help on using tickets.