Testing for "MP3-ness" of input

Torbjörn Andersson torbjorn.e.andersson at tietoenator.com
Mon Sep 24 12:10:54 EDT 2001


While trying to track down the MP3 decoder bug, I encountered an MP3 
file which didn't pass the current "MP3 magic" test. At first I thought 
it was because the file was apparently created with a beta version an 
MP3 encoder.

After looking at some documents about MPEG, I'm more inclined to believe 
that there is no such thing as an MP3 magic number, and the decoder is 
supposed to just scan for the first thing that looks like a valid frame 
and start playing from there.

Clearly that's not good enough for auto-detecting the type of sound, but 
maybe we should skip the test if the user insists that it is MP3? I've 
included a completely untested patch - I'm still at work and won't be 
able to even compile it until I get back home - to show how I mean. Does 
it seem like a reasonable idea?

Torbjörn Andersson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mp3_magic.patch.gz
Type: application/x-gzip
Size: 1037 bytes
Desc: not available
URL: <http://icculus.org/pipermail/sdlsound/attachments/20010924/2b5fbb9b/attachment.gz>


More information about the sdlsound mailing list