1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-04-08 07:43: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 @@
MD5 223a8c8fc7f073c7a7bd4fe6736ed0ee speex-xmms-0.9.1.tar.gz 34010

View File

@@ -0,0 +1,34 @@
--- Makefile.orig 2005-11-12 19:03:18.713964552 +0000
+++ Makefile 2005-11-12 19:11:19.461879760 +0000
@@ -3,8 +3,8 @@
PACKAGE=\"libspeex\"
INCDIRS=`xmms-config --cflags`
-CFLAGS = -Wall
-OBJS = http.o config.o fileinfo.o speexutil.o # utf8.o
+CFLAGS = -Wall -fPIC
+OBJS = http.o config.o fileinfo.o speexutil.o utf8.o
GUIOBJS = gui/interface.o gui/support.o gui/callbacks.o
GUISRCS = gui/interface.c gui/interface.h gui/support.c gui/support.h gui/callbacks.c gui/callbacks.h
@@ -16,8 +16,8 @@
libspeex.so: libspeex.c libspeex.h $(OBJS) $(GUIOBJS)
$(CC) -shared -logg -lspeex -lgtk -lpthread -lxmms $(INCDIRS) $(CFLAGS) -DVERSION=$(VERSION) -DPACKAGE=\"libspeex\" -o libspeex.so libspeex.c $(OBJS) $(GUIOBJS)
-#utf8.o: utf8.c utf8.h
-# $(CC) -c $(INCDIRS) $(CFLAGS) -DHAVE_ICONV -DICONV_CONST= -o utf8.o utf8.c
+utf8.o: utf8.c utf8.h
+ $(CC) -c $(INCDIRS) $(CFLAGS) -DHAVE_ICONV -DICONV_CONST= -o utf8.o utf8.c
http.o: http.c http.h
$(CC) -c $(INCDIRS) $(CFLAGS) -DVERSION=$(VERSION) -DPACKAGE=$(PACKAGE) -o http.o http.c
@@ -33,7 +33,8 @@
install: libspeex.so
install libspeex.so `xmms-config --input-plugin-dir`
-
+ install -d $(DESTDIR)`xmms-config --input-plugin-dir`
+ install libspeex.so $(DESTDIR)`xmms-config --input-plugin-dir`
clean:
$(MAKE) -C gui/ clean
rm -f *.so *.o

View File

@@ -0,0 +1,11 @@
--- gui/Makefile.orig 2005-11-12 19:06:51.404630656 +0000
+++ gui/Makefile 2005-11-12 19:07:01.230136952 +0000
@@ -3,7 +3,7 @@
PACKAGE=\"libspeex\"
INCDIRS=`xmms-config --cflags`
-CFLAGS = -Wall
+CFLAGS = -Wall -fPIC
all: interface.o support.o callbacks.o

View File

@@ -0,0 +1,143 @@
--- libspeex.c.old 2004-10-11 00:57:18.000000000 +0800
+++ libspeex.c 2004-10-12 05:11:33.000000000 +0800
@@ -190,7 +190,7 @@
static void play (char *filename) {
- speex_comment_t comments;
+ speex_comment_t comments = {0};
if (speex_fs == NULL)
speex_fs = malloc(sizeof(Speex_File_State));
@@ -215,9 +215,12 @@
}
else
{
- speex_file_info(filename, NULL, &comments, &speex_fs->length);
- speex_fs->length *= 1000;
- speex_fs->title = generate_title(filename, &comments);
+ if (!speex_file_info(filename, NULL, &comments, &speex_fs->length))
+ {
+ speex_fs->length *= 1000;
+ speex_fs->title = generate_title(filename, &comments);
+ }
+ speex_comment_free(&comments);
}
@@ -235,6 +238,7 @@
fprintf(stderr, PACKAGE ": error opening file\n");
#endif
+ speex_fs->playing = FALSE;
return;
}
}
@@ -265,7 +269,7 @@
SpeexBits sbits;
SpeexStereoState stereo = SPEEX_STEREO_STATE_INIT;
- speex_comment_t comments;
+ speex_comment_t comments = {0};
int valid_comment;
#ifdef DEBUG
@@ -404,8 +408,8 @@
if (valid_comment)
{
speex_fs->title = generate_title(NULL, &comments);
- speex_comment_free(&comments);
}
+ speex_comment_free(&comments);
}
}
@@ -672,11 +676,13 @@
}
static void stop (void) {
- speex_fs->playing = FALSE;
+ if (speex_fs->playing == TRUE)
+ {
+ speex_fs->playing = FALSE;
- // Wait for the thread to close
- pthread_join(spx_decode_thread, NULL);
-
+ // Wait for the thread to close
+ pthread_join(spx_decode_thread, NULL);
+ }
#ifdef DEBUG
fprintf(stderr, PACKAGE ": stop\n");
#endif
@@ -707,7 +713,7 @@
static void get_song_info (char *filename, char **title, int *length) {
- speex_comment_t comments;
+ speex_comment_t comments = {0};
#ifdef DEBUG
fprintf(stderr, "get_song_info\n");
@@ -720,10 +726,11 @@
}
else
{
- speex_file_info(filename, NULL, &comments, length);
- *length *= 1000;
- (*title) = g_strdup(generate_title(filename, &comments));
-
+ if(!speex_file_info(filename, NULL, &comments, length))
+ {
+ *length *= 1000;
+ (*title) = generate_title(filename, &comments);
+ }
speex_comment_free(&comments);
}
--- speexutil.c.old 2004-10-11 00:33:43.000000000 +0800
+++ speexutil.c 2004-10-11 01:20:55.000000000 +0800
@@ -161,15 +161,13 @@
}
else if (op.packetno == 1)
{
- if (comment != NULL)
+ if (comment != NULL && comment->vendor == NULL)
{
if (!speex_comment_init(op.packet, op.bytes, comment))
{
#ifdef DEBUG
fprintf(stderr,"Warning: invalid comment struct\n");
#endif
-
- memset(comment, 0, sizeof(speex_comment_t));
}
}
@@ -310,17 +308,18 @@
int i;
// Free vendor-string
- free(comment->vendor);
+ if(comment->vendor != NULL) free(comment->vendor);
- // Free comments
- for(i=0; i < comment->comment_num; i++)
+ if(comment->comments != NULL)
{
- free( *(comment->comments+i));
+ // Free comments
+ for(i=0; i < comment->comment_num; i++)
+ {
+ free( *(comment->comments+i));
+ }
+ // Free comment index
+ free(comment->comments);
}
-
- // Free comment index
- free(comment->comments);
-
return;
}