1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-04-12 19:03:32 +02:00

initial import

This commit is contained in:
root
2010-02-09 21:25:29 +01:00
commit b2719dc011
1080 changed files with 41656 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
MD5 9013cd4d924209ce74a682dda771d087 xmms-mad-0.8.tar.gz 315069
RMD160 19fe42c13c24ad6f55af066435c3faee7c2f8ff6 xmms-mad-0.8.tar.gz 315069
SHA256 85774ead2c2d31a3c211ab24fdd03844bc624078abe47bbb92d28844061f3822 xmms-mad-0.8.tar.gz 315069

View File

@@ -0,0 +1,3 @@
MD5 9013cd4d924209ce74a682dda771d087 xmms-mad-0.8.tar.gz 315069
RMD160 19fe42c13c24ad6f55af066435c3faee7c2f8ff6 xmms-mad-0.8.tar.gz 315069
SHA256 85774ead2c2d31a3c211ab24fdd03844bc624078abe47bbb92d28844061f3822 xmms-mad-0.8.tar.gz 315069

View File

@@ -0,0 +1,3 @@
MD5 9013cd4d924209ce74a682dda771d087 xmms-mad-0.8.tar.gz 315069
RMD160 19fe42c13c24ad6f55af066435c3faee7c2f8ff6 xmms-mad-0.8.tar.gz 315069
SHA256 85774ead2c2d31a3c211ab24fdd03844bc624078abe47bbb92d28844061f3822 xmms-mad-0.8.tar.gz 315069

View File

@@ -0,0 +1,11 @@
--- src/xmms-mad.c 2003-12-28 16:18:40.000000000 +0100
+++ src/xmms-mad.c 2004-03-16 13:14:12.000000000 +0100
@@ -95,7 +95,7 @@
if (fin >= 0 && read (fin, check, 4) == 4)
{
/* If first two bytes are a sync header or three bytes are "ID3" */
- if ( (check[0] == 0xff && (check[1] & 0x70) == 0x70)
+ if ( (check[0] == 0xff && (check[1] & 0xE0) == 0xE0)
|| memcmp (check, "ID3", 3) == 0)
{
rtn = 1;

View File

@@ -0,0 +1,47 @@
diff -urp xmms-mad-0.8-org/src/xmms-mad.c xmms-mad-0.8/src/xmms-mad.c
--- xmms-mad-0.8-org/src/xmms-mad.c 2005-12-04 23:18:21.000000000 +0200
+++ xmms-mad-0.8/src/xmms-mad.c 2005-12-04 23:34:53.000000000 +0200
@@ -76,6 +76,31 @@ xmmsmad_set_eq (int on, float preamp, fl
//printf("set_eq\n");
}
+
+/* Following mp3 header check has been copied from XMMS mp3 input plugin. */
+static int mpg123_head_check(unsigned char *buffer)
+{
+ unsigned int head = (buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3];
+ if ((head & 0xffe00000) != 0xffe00000)
+ return FALSE;
+ if (!((head >> 17) & 3))
+ return FALSE;
+ if (((head >> 12) & 0xf) == 0xf)
+ return FALSE;
+ if (!((head >> 12) & 0xf))
+ return FALSE;
+ if (((head >> 10) & 0x3) == 0x3)
+ return FALSE;
+ if (((head >> 19) & 1) == 1 &&
+ ((head >> 17) & 3) == 3 &&
+ ((head >> 16) & 1) == 1)
+ return FALSE;
+ if ((head & 0xffff0000) == 0xfffe0000)
+ return FALSE;
+ return TRUE;
+}
+
+
static int
xmmsmad_is_our_file (char *filename)
{
@@ -96,9 +121,8 @@ xmmsmad_is_our_file (char *filename)
fin = open (filename, O_RDONLY);
if (fin >= 0 && read (fin, check, 4) == 4)
{
- /* If first two bytes are a sync header or three bytes are "ID3" */
- if ( (check[0] == 0xff && (check[1] & 0x70) == 0x70)
- || memcmp (check, "ID3", 3) == 0)
+ /* If first 4 bytes are a sync header or three bytes are "ID3" */
+ if (mpg123_head_check(check) || memcmp (check, "ID3", 3) == 0)
{
rtn = 1;
}

View File

@@ -0,0 +1,12 @@
diff -urN xmms-mad-0.8.orig/src/decoder.c xmms-mad-0.8/src/decoder.c
--- xmms-mad-0.8.orig/src/decoder.c 2006-04-03 22:07:29.000000000 -0400
+++ xmms-mad-0.8/src/decoder.c 2006-04-03 22:33:46.000000000 -0400
@@ -493,7 +493,7 @@
{
mad_plugin.output->buffer_free ();
mad_plugin.output->buffer_free ();
- while (mad_plugin.output->buffer_playing ())
+ while (mad_plugin.output->buffer_playing () && !info->stop)
usleep (10000);
}