changeset 1947:a98c54cb96aa

Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 02 Oct 2007 00:50:07 +0300
parents 7ee1bc4d5f5b (current diff) 05b9abd78a87 (diff)
children 98893c1e9f98
files src/modplug/modplugbmp.cxx
diffstat 37 files changed, 40 insertions(+), 124 deletions(-) [+]
line wrap: on
line diff
--- a/src/aac/libfaad2/common.h	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/aac/libfaad2/common.h	Tue Oct 02 00:50:07 2007 +0300
@@ -40,9 +40,7 @@
 #define __STRICT_ANSI__
 #endif
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #define INLINE __inline
 #if 0 //defined(_WIN32) && !defined(_WIN32_WCE)
--- a/src/aac/mp4ff/mp4ffint.h	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/aac/mp4ff/mp4ffint.h	Tue Oct 02 00:50:07 2007 +0300
@@ -107,9 +107,7 @@
 #define ATOM_SINF 24
 #define ATOM_SCHI 25
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #ifndef _WIN32
 #define stricmp strcasecmp
--- a/src/alsa/audio.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/alsa/audio.c	Tue Oct 02 00:50:07 2007 +0300
@@ -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/arts/convert.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/arts/convert.c	Tue Oct 02 00:50:07 2007 +0300
@@ -16,9 +16,7 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#if defined(HAVE_CONFIG_H)
 #include "config.h"
-#endif
 
 #include "audacious/plugin.h"
 #include <glib.h>
--- a/src/console/Blip_Buffer.h	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/console/Blip_Buffer.h	Tue Oct 02 00:50:07 2007 +0300
@@ -121,9 +121,7 @@
 	friend class Blip_Reader;
 };
 
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#endif
+#include "config.h"
 
 // Number of bits in resample ratio fraction. Higher values give a more accurate ratio
 // but reduce maximum buffer size.
--- a/src/modplug/modplugbmp.cxx	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/modplug/modplugbmp.cxx	Tue Oct 02 00:50:07 2007 +0300
@@ -503,7 +503,7 @@
 {
 	CSoundFile* lSoundFile;
 	Archive* lArchive;
-	const gchar* tmps;
+	std::string tmps;
 	
 	//open and mmap the file
         lArchive = OpenArchive(aFilename);
@@ -542,7 +542,7 @@
 	case MOD_TYPE_PSM:	tmps = "Protracker Studio Module"; break;
 	default:		tmps = "ModPlug unknown"; break;
 	}
-	tuple_associate_string(ti, FIELD_CODEC, NULL, tmps);
+	tuple_associate_string(ti, FIELD_CODEC, NULL, tmps.c_str());
 	tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced");
 	tuple_associate_int(ti, FIELD_LENGTH, NULL, lSoundFile->GetSongTime() * 1000);
 
--- a/src/modplug/sndfile.h	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/modplug/sndfile.h	Tue Oct 02 00:50:07 2007 +0300
@@ -5,9 +5,7 @@
  *          Adam Goode       <adam@evdebs.org> (endian and char fixes for PPC)
 */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #ifndef __SNDFILE_H
 #define __SNDFILE_H
--- a/src/paranormal/actuators.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/actuators.c	Tue Oct 02 00:50:07 2007 +0300
@@ -17,9 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include <glib.h>
 
--- a/src/paranormal/builtins.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/builtins.c	Tue Oct 02 00:50:07 2007 +0300
@@ -17,9 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "actuators.h"
 
--- a/src/paranormal/cmaps.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/cmaps.c	Tue Oct 02 00:50:07 2007 +0300
@@ -17,9 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include <glib.h>
 
--- a/src/paranormal/containers.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/containers.c	Tue Oct 02 00:50:07 2007 +0300
@@ -17,9 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include <stdio.h>
 
--- a/src/paranormal/freq.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/freq.c	Tue Oct 02 00:50:07 2007 +0300
@@ -17,9 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include <stdlib.h>
 #include <stdio.h>
--- a/src/paranormal/general.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/general.c	Tue Oct 02 00:50:07 2007 +0300
@@ -19,9 +19,7 @@
 
 /* FIXME: what to name this file? */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "paranormal.h"
 #include "actuators.h"
--- a/src/paranormal/misc.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/misc.c	Tue Oct 02 00:50:07 2007 +0300
@@ -17,9 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include <stdlib.h>
 #include <stdio.h>
--- a/src/paranormal/presets.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/presets.c	Tue Oct 02 00:50:07 2007 +0300
@@ -20,9 +20,7 @@
 /* FIXME: add documentation support to preset files */
 /* FIXME: add multiple-presets-per-file support (maybe) */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include <stdlib.h>
 #include <ctype.h>
--- a/src/paranormal/wave.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/wave.c	Tue Oct 02 00:50:07 2007 +0300
@@ -17,9 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include <math.h>
 
--- a/src/paranormal/xform.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/paranormal/xform.c	Tue Oct 02 00:50:07 2007 +0300
@@ -22,9 +22,7 @@
    so that only 1 apply_xform needs to be done for as many
    of these as someone wants to use */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include <math.h>
 
--- a/src/projectm/main.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/projectm/main.c	Tue Oct 02 00:50:07 2007 +0300
@@ -50,9 +50,8 @@
 #include "sdltoprojectM.h"
 #include "video_init.h"
 
-#if HAVE_CONFIG_H
 #include <config.h>
-#endif
+
 #define CONFIG_FILE "/config"
 #define PRESETS_DIR "/presets"
 #define FONTS_DIR "/fonts"
--- a/src/scrobbler/configure.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/scrobbler/configure.c	Tue Oct 02 00:50:07 2007 +0300
@@ -1,8 +1,6 @@
 #include "settings.h"
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/util.h"
 #include "audacious/configdb.h"
--- a/src/sid/xs_genui.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/sid/xs_genui.c	Tue Oct 02 00:50:07 2007 +0300
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include <gtk/gtk.h>
 
--- a/src/sid/xs_glade.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/sid/xs_glade.c	Tue Oct 02 00:50:07 2007 +0300
@@ -2,9 +2,7 @@
  * DO NOT EDIT THIS FILE - it is generated by Glade.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
--- a/src/sid/xs_glade.h	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/sid/xs_glade.h	Tue Oct 02 00:50:07 2007 +0300
@@ -2,9 +2,7 @@
  * DO NOT EDIT THIS FILE - it is generated by Glade.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include <gtk/gtk.h>
 
--- a/src/sid/xs_interface.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/sid/xs_interface.c	Tue Oct 02 00:50:07 2007 +0300
@@ -2,9 +2,7 @@
  * DO NOT EDIT THIS FILE - it is generated by Glade.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
--- a/src/sid/xs_support.h	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/sid/xs_support.h	Tue Oct 02 00:50:07 2007 +0300
@@ -5,9 +5,7 @@
 extern "C" {
 #endif
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include <glib.h>
 #include <stdio.h>
--- a/src/stdio/Makefile	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/stdio/Makefile	Tue Oct 02 00:50:07 2007 +0300
@@ -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	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/stdio/stdio.c	Tue Oct 02 00:50:07 2007 +0300
@@ -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)
--- a/src/timidity/libtimidity/common.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/common.c	Tue Oct 02 00:50:07 2007 +0300
@@ -21,9 +21,7 @@
 
    */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/vfs.h"
 #include <stdlib.h>
--- a/src/timidity/libtimidity/instrum.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/instrum.c	Tue Oct 02 00:50:07 2007 +0300
@@ -23,9 +23,7 @@
 
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/vfs.h"
 #include <string.h>
--- a/src/timidity/libtimidity/mix.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/mix.c	Tue Oct 02 00:50:07 2007 +0300
@@ -21,9 +21,7 @@
 
     mix.c */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/vfs.h"
 #include <math.h>
--- a/src/timidity/libtimidity/output.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/output.c	Tue Oct 02 00:50:07 2007 +0300
@@ -22,9 +22,7 @@
     Audio output (to file / device) functions.
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "timidity.h"
 #include "timidity_internal.h"
--- a/src/timidity/libtimidity/playmidi.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/playmidi.c	Tue Oct 02 00:50:07 2007 +0300
@@ -21,9 +21,7 @@
 
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/vfs.h"
 #include <stdlib.h>
--- a/src/timidity/libtimidity/readmidi.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/readmidi.c	Tue Oct 02 00:50:07 2007 +0300
@@ -19,9 +19,7 @@
 
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/vfs.h"
 #include <stdlib.h>
--- a/src/timidity/libtimidity/resample.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/resample.c	Tue Oct 02 00:50:07 2007 +0300
@@ -20,9 +20,7 @@
     resample.c
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/vfs.h"
 #include <math.h>
--- a/src/timidity/libtimidity/stream.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/stream.c	Tue Oct 02 00:50:07 2007 +0300
@@ -1,6 +1,4 @@
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "string.h"
 
--- a/src/timidity/libtimidity/tables.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/tables.c	Tue Oct 02 00:50:07 2007 +0300
@@ -19,9 +19,7 @@
 
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/vfs.h"
 
--- a/src/timidity/libtimidity/timidity.c	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/timidity/libtimidity/timidity.c	Tue Oct 02 00:50:07 2007 +0300
@@ -19,9 +19,7 @@
 
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include "audacious/vfs.h"
 #include <stdlib.h>
--- a/src/wma/libffwma/common.h	Tue Oct 02 00:49:51 2007 +0300
+++ b/src/wma/libffwma/common.h	Tue Oct 02 00:50:07 2007 +0300
@@ -6,9 +6,7 @@
 #ifndef COMMON_H
 #define COMMON_H
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #define TUNECPU generic
 #undef HAVE_MMX