changeset 1939:0c03bba55cbd

branch merge
author William Pitcock <nenolod@atheme.org>
date Mon, 01 Oct 2007 16:07:46 -0500
parents 5008d3aa50d7 (current diff) ac07c60dba5d (diff)
children 4b3d67ce6b3d
files
diffstat 4 files changed, 15 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/src/alsa/audio.c	Mon Oct 01 16:07:05 2007 -0500
+++ b/src/alsa/audio.c	Mon Oct 01 16:07:46 2007 -0500
@@ -158,7 +158,8 @@
 	 */
 	switch (err)
 	{
-	case -ESTRPIPE:   /* "suspend": wait until ALSA is "running" again. */
+	case -ESTRPIPE:
+	case ESTRPIPE:   /* "suspend": wait until ALSA is "running" again. */
 		while ((err2 = snd_pcm_resume(alsa_pcm)) == -EAGAIN)
 			g_usleep(100000);
 
@@ -167,10 +168,15 @@
 
 		break;
 
-	case -EPIPE:      /* under-run and the I/O pipe closed on us */
+	case -EPIPE:
+	case EPIPE:      /* under-run and the I/O pipe closed on us */
 		return snd_pcm_prepare(alsa_pcm);
 		break;
 
+	case EINTR:
+	case -EINTR:
+		break;
+
 	default:
 		g_warning("Unhandled ALSA exception code %d (%s), trying hard restart.", err, snd_strerror(err));
 		return snd_pcm_prepare(alsa_pcm);
@@ -701,7 +707,7 @@
 				alsa_recovery(wr);
 			}
 		}
-		else
+		else	/* XXX: why is this here? --nenolod */
 			g_usleep(10000);
 
 		if (pause_request != paused)
--- a/src/modplug/modplugbmp.cxx	Mon Oct 01 16:07:05 2007 -0500
+++ b/src/modplug/modplugbmp.cxx	Mon Oct 01 16:07:46 2007 -0500
@@ -506,7 +506,7 @@
 {
 	CSoundFile* lSoundFile;
 	Archive* lArchive;
-	gchar* tmps;
+	const gchar* tmps;
 	
 	//open and mmap the file
         lArchive = OpenArchive(aFilename);
@@ -553,9 +553,9 @@
 	 * an arbitrary module file uses .. typically it is some DOS CP-variant,
 	 * except for true Amiga modules.
 	 */
-	tmps = str_to_utf8(lSoundFile->GetTitle());
-	tuple_associate_string(ti, FIELD_TITLE, NULL, lSoundFile->GetTitle());
-	g_free(tmps);
+	gchar *tmps2 = str_to_utf8(lSoundFile->GetTitle());
+	tuple_associate_string(ti, FIELD_TITLE, NULL, tmps2);
+	g_free(tmps2);
 	
 	//unload the file
 	lSoundFile->Destroy();
--- a/src/stdio/Makefile	Mon Oct 01 16:07:05 2007 -0500
+++ b/src/stdio/Makefile	Mon Oct 01 16:07:46 2007 -0500
@@ -8,4 +8,4 @@
 
 CPPFLAGS += ${PLUGIN_CPPFLAGS} ${MOWGLI_CFLAGS} ${DBUS_CFLAGS} ${GTK_CFLAGS} ${GLIB_CFLAGS} ${PANGO_CFLAGS} ${ARCH_DEFINES} ${XML_CPPFLAGS} -I../../intl -I../..
 CFLAGS += ${PLUGIN_CFLAGS}
-LIBS += ${GTK_LIBS} ${GLIB_LIBS} ${PANGO_LIBS} ${XML_LIBS} -lmagic
+LIBS += ${GTK_LIBS} ${GLIB_LIBS} ${PANGO_LIBS} ${XML_LIBS}
--- a/src/stdio/stdio.c	Mon Oct 01 16:07:05 2007 -0500
+++ b/src/stdio/stdio.c	Mon Oct 01 16:07:46 2007 -0500
@@ -27,8 +27,6 @@
 
 #include <string.h>
 
-#include <magic.h>
-
 static gchar *
 vfs_stdio_urldecode_path(const gchar * encoded_path)
 {
@@ -251,28 +249,6 @@
     return s.st_size;
 }
 
-static magic_t mdb_handle = NULL;
-
-gchar *
-stdio_vfs_metadata_impl(VFSFile *file, const gchar *field)
-{
-    if (!g_ascii_strcasecmp(field, "content-type"))
-    {
-        gchar *decpath;
-        const gchar *out;
-
-        if (mdb_handle == NULL)
-            mdb_handle = magic_open(MAGIC_MIME);
-
-        decpath = vfs_stdio_urldecode_path(file->uri);
-        out = magic_file(mdb_handle, decpath);
-
-        return g_strdup(out);
-    }
-
-    return NULL;
-}
-
 VFSConstructor file_const = {
 	"file://",
 	stdio_vfs_fopen_impl,
@@ -286,8 +262,7 @@
 	stdio_vfs_ftell_impl,
 	stdio_vfs_feof_impl,
 	stdio_vfs_truncate_impl,
-	stdio_vfs_fsize_impl,
-	stdio_vfs_metadata_impl
+	stdio_vfs_fsize_impl
 };
 
 static void init(void)