# HG changeset patch # User mf0102 # Date 1178366637 25200 # Node ID d980b7e5bf1d8d4c3df53f4e9f45b4a7c3e27b88 # Parent d338a8beb3d6d5aa2914ce88b58c7f6cd76f7df5 [svn] - Prepared FileWriter for partial compilation diff -r d338a8beb3d6 -r d980b7e5bf1d ChangeLog --- 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 + 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 revision [2160] Return 1 if we encounter an unknown tuple, this seems to happen in files diff -r d338a8beb3d6 -r d980b7e5bf1d src/filewriter/filewriter.c --- 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); diff -r d338a8beb3d6 -r d980b7e5bf1d src/filewriter/plugins.h --- 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