X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=common%2Fmp3.c;fp=common%2Fmp3.c;h=0000000000000000000000000000000000000000;hb=f506842df2b0e251b56ffe0a828bb2029d423eec;hp=b00a5fb2c6e0ff2eff104eeba063c41460d1ace1;hpb=ca69c3e5a0ecf407c02dc85c6f3282ebb1efc5a2;p=libpicofe.git diff --git a/common/mp3.c b/common/mp3.c deleted file mode 100644 index b00a5fb..0000000 --- a/common/mp3.c +++ /dev/null @@ -1,29 +0,0 @@ -#include "mp3.h" - -int mp3_find_sync_word(const unsigned char *buf, int size) -{ - const unsigned char *p, *pe; - - /* find byte-aligned syncword - need 12 (MPEG 1,2) or 11 (MPEG 2.5) matching bits */ - for (p = buf, pe = buf + size - 3; p <= pe; p++) - { - int pn; - if (p[0] != 0xff) - continue; - pn = p[1]; - if ((pn & 0xf8) != 0xf8 || // currently must be MPEG1 - (pn & 6) == 0) { // invalid layer - p++; continue; - } - pn = p[2]; - if ((pn & 0xf0) < 0x20 || (pn & 0xf0) == 0xf0 || // bitrates - (pn & 0x0c) != 0) { // not 44kHz - continue; - } - - return p - buf; - } - - return -1; -} -