djcsdy / swfmill

Generate or decompile Adobe Flash SWF files using an XML dialect. Inspect and modify the XML by hand, or by using a built in XSLT processor.
http://www.swfmill.org/
GNU General Public License v2.0
131 stars 28 forks source link

Import MP3s gaplessly #9

Open djcsdy opened 13 years ago

djcsdy commented 13 years ago

When importing MP3s, read encoder delay and padding information from Xing/Info tag (and equivalents for other encoders) in order to embed the MP3 gaplessly. It will also be necessary to discard broken MP3 frames, ID3 tags and other junk data.

Flash uses the Fraunhofer decoder internally, so decoder_delay is 529 samples.

I’ve written some code to do this in the Flex compiler, which can be adapted: https://github.com/djcsdy/flex-extensions/blob/master/src/net/noiseinstitute/flexextensions/compiler/media/mp3/MP3TranscodeJob.java