diff --git a/Manifest.txt b/Manifest.txt index 791024e..2bf5c7b 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -21,8 +21,6 @@ ext/icanhasaudio/native.c ext/icanhasaudio/native.h ext/icanhasaudio/rb_wav.c ext/icanhasaudio/rb_wav.h -ext/icanhasaudio/syncword.c -ext/icanhasaudio/syncword.h lib/icanhasaudio.rb lib/icanhasaudio/mpeg.rb lib/icanhasaudio/mpeg/decoder.rb diff --git a/ext/icanhasaudio/native.h b/ext/icanhasaudio/native.h index ab5a0e2..85606d9 100644 --- a/ext/icanhasaudio/native.h +++ b/ext/icanhasaudio/native.h @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/ext/icanhasaudio/syncword.c b/ext/icanhasaudio/syncword.c deleted file mode 100644 index 934a9e5..0000000 --- a/ext/icanhasaudio/syncword.c +++ /dev/null @@ -1,47 +0,0 @@ -#include - -/* - * Taken from lame, get_audio.c - */ - -int is_syncword_mp123(const void *const headerptr) -{ - const unsigned char *const p = headerptr; - static const char abl2[16] = - { 0, 7, 7, 7, 0, 7, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8 }; - - if ((p[0] & 0xFF) != 0xFF) - return 0; /* first 8 bits must be '1' */ - if ((p[1] & 0xE0) != 0xE0) - return 0; /* next 3 bits are also */ - if ((p[1] & 0x18) == 0x08) - return 0; /* no MPEG-1, -2 or -2.5 */ - if ((p[1] & 0x06) == 0x00) - return 0; /* no Layer I, II and III */ -#ifndef USE_LAYER_1 - if ((p[1] & 0x06) == 0x03*2) - return 0; /* layer1 is not supported */ -#endif -#ifndef USE_LAYER_2 - if ((p[1] & 0x06) == 0x02*2) - return 0; /* layer1 is not supported */ -#endif - /* - if (!(((p[1] & 0x06) == 0x03*2 && input_format == sf_mp1) - || ((p[1] & 0x06) == 0x02*2 && input_format == sf_mp2) - || ((p[1] & 0x06) == 0x01*2 && input_format == sf_mp3))) - */ - if(!(p[1] & 0x06) == 0x01*2) - return 0; /* imcompatible layer with input file format */ - if ((p[2] & 0xF0) == 0xF0) - return 0; /* bad bitrate */ - if ((p[2] & 0x0C) == 0x0C) - return 0; /* no sample frequency with (32,44.1,48)/(1,2,4) */ - if ((p[1] & 0x18) == 0x18 && (p[1] & 0x06) == 0x04 - && abl2[p[2] >> 4] & (1 << (p[3] >> 6))) - return 0; - if ((p[3] & 3) == 2) - return 0; /* reserved enphasis mode */ - return 1; -} - diff --git a/ext/icanhasaudio/syncword.h b/ext/icanhasaudio/syncword.h deleted file mode 100644 index 5508f0d..0000000 --- a/ext/icanhasaudio/syncword.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef ICANHASAUDIO_SYNCWORD -#define ICANHASAUDIO_SYNCWORD - -#include - -int is_syncword_mp123(const void *const headerptr); - -#endif