changeset 1000:d980b7e5bf1d trunk

[svn] - Prepared FileWriter for partial compilation
author mf0102
date Sat, 05 May 2007 05:03:57 -0700
parents d338a8beb3d6
children 8825a00d57d7
files ChangeLog src/filewriter/filewriter.c src/filewriter/plugins.h
diffstat 3 files changed, 61 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat May 05 04:20:17 2007 -0700
+++ b/ChangeLog	Sat May 05 05:03:57 2007 -0700
@@ -1,3 +1,12 @@
+2007-05-05 11:20:17 +0000  Ralf Ertzinger <ralf@skytale.net>
+  revision [2162]
+  
+  - We do not need the internal libflac anymore
+  
+  trunk/src/flacng/Makefile |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2007-05-04 17:59:01 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [2160]
   Return 1 if we encounter an unknown tuple, this seems to happen in files 
--- a/src/filewriter/filewriter.c	Sat May 05 04:20:17 2007 -0700
+++ b/src/filewriter/filewriter.c	Sat May 05 05:03:57 2007 -0700
@@ -28,9 +28,37 @@
 static GtkWidget *configure_bbox, *configure_ok, *configure_cancel;
 
 static GtkWidget *fileext_hbox, *fileext_label, *fileext_combo, *plugin_button;
-enum fileext_t { WAV = 0, MP3, VORBIS, FLAC, FILEEXT_MAX } ;
+
+enum fileext_t
+{
+	WAV = 0,
+#ifdef FILEWRITER_MP3
+	MP3,
+#endif
+#ifdef FILEWRITER_VORBIS
+	VORBIS,
+#endif
+#ifdef FILEWRITER_FLAC
+	FLAC,
+#endif
+	FILEEXT_MAX
+};
+
 static gint fileext = WAV;
-static gchar *fileext_str[] = { "wav", "mp3", "ogg", "flac" } ;
+static gchar *fileext_str[] =
+{
+	"wav",
+#ifdef FILEWRITER_MP3
+	"mp3",
+#endif
+#ifdef FILEWRITER_VORBIS
+	"ogg",
+#endif
+#ifdef FILEWRITER_FLAC
+	"flac"
+#endif
+};
+
 static FileWriter plugin;
 
 static GtkWidget *saveplace_hbox, *saveplace;
@@ -100,12 +128,18 @@
 
     if (fileext == WAV)
         plugin = wav_plugin;
+#ifdef FILEWRITER_MP3
     if (fileext == MP3)
         plugin = mp3_plugin;
+#endif
+#ifdef FILEWRITER_VORBIS
     if (fileext == VORBIS)
         plugin = vorbis_plugin;
+#endif
+#ifdef FILEWRITER_FLAC
     if (fileext == FLAC)
         plugin = flac_plugin;
+#endif
 }
 
 static void file_init(void)
@@ -494,9 +528,15 @@
 
         fileext_combo = gtk_combo_box_new_text();
         gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "WAV");
+#ifdef FILEWRITER_MP3
         gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "MP3");
+#endif
+#ifdef FILEWRITER_VORBIS
         gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "Vorbis");
+#endif
+#ifdef FILEWRITER_FLAC
         gtk_combo_box_append_text(GTK_COMBO_BOX(fileext_combo), "FLAC");
+#endif
         gtk_box_pack_start(GTK_BOX(fileext_hbox), fileext_combo, FALSE, FALSE, 0);
         gtk_combo_box_set_active(GTK_COMBO_BOX(fileext_combo), fileext);
         g_signal_connect(G_OBJECT(fileext_combo), "changed", G_CALLBACK(fileext_cb), NULL);
--- a/src/filewriter/plugins.h	Sat May 05 04:20:17 2007 -0700
+++ b/src/filewriter/plugins.h	Sat May 05 05:03:57 2007 -0700
@@ -25,6 +25,15 @@
 
 #include "filewriter.h"
 
-extern FileWriter wav_plugin, mp3_plugin, vorbis_plugin, flac_plugin;
+extern FileWriter wav_plugin;
+#ifdef FILEWRITER_MP3
+extern FileWriter mp3_plugin;
+#endif
+#ifdef FILEWRITER_VORBIS
+extern FileWriter vorbis_plugin;
+#endif
+#ifdef FILEWRITER_FLAC
+extern FileWriter flac_plugin;
+#endif
 
 #endif