libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

detect_music_type() does not detect valid MPEG Audio files

Fulgen301 opened this issue · comments

#288 reported missing support for an MPEG Audio frame header starting with the first eleven bits. However, an MPEG file could start anywhere (e.g. in the middle of a frame) and audio players should seek to the first occurence of those frame sync bits and check whether the header is valid.

I encountered this issue when I was informed that certain MPEG-1 files weren't loaded by Mix_LoadWAV_RW with Unrecognized audio format. The same audio files are played by mpg123 and vlc without issues, so while the source for this behavior isn't an official document, it seems to be the case that MPEG Audio files are in fact allowed to start anywhere.