From 5583b6c5e1c09fdb408ee425f0bf7f030d51452e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 9 Oct 2008 15:18:21 +0200 Subject: shout: removed DISABLED_SHOUT_ENCODER_PLUGIN Having an array with disabled entries sucks. Removed that DISABLED_SHOUT_ENCODER_PLUGIN macro, and fill the plugin list only with plugins which are actually enabled. This should be done for all plugin types. --- src/audioOutputs/audioOutput_shout.c | 4 ++++ src/audioOutputs/audioOutput_shout.h | 3 --- src/audioOutputs/audioOutput_shout_mp3.c | 4 ---- src/audioOutputs/audioOutput_shout_ogg.c | 4 ---- 4 files changed, 4 insertions(+), 11 deletions(-) (limited to 'src/audioOutputs') diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c index 181091d59..b9deef295 100644 --- a/src/audioOutputs/audioOutput_shout.c +++ b/src/audioOutputs/audioOutput_shout.c @@ -30,8 +30,12 @@ static int shout_init_count; static const struct shout_encoder_plugin *const shout_encoder_plugins[] = { +#ifdef HAVE_SHOUT_MP3 &shout_mp3_encoder, +#endif +#ifdef HAVE_SHOUT_OGG &shout_ogg_encoder, +#endif NULL }; diff --git a/src/audioOutputs/audioOutput_shout.h b/src/audioOutputs/audioOutput_shout.h index bd525fd6d..2cfe68f29 100644 --- a/src/audioOutputs/audioOutput_shout.h +++ b/src/audioOutputs/audioOutput_shout.h @@ -28,9 +28,6 @@ #include -#define DISABLED_SHOUT_ENCODER_PLUGIN(plugin) \ - struct shout_encoder_plugin plugin; - struct shout_data; struct shout_encoder_plugin { diff --git a/src/audioOutputs/audioOutput_shout_mp3.c b/src/audioOutputs/audioOutput_shout_mp3.c index d1fe87884..c54632b15 100644 --- a/src/audioOutputs/audioOutput_shout_mp3.c +++ b/src/audioOutputs/audioOutput_shout_mp3.c @@ -186,8 +186,4 @@ const struct shout_encoder_plugin shout_mp3_encoder = { shout_mp3_encoder_send_metadata, }; -#else - -DISABLED_SHOUT_ENCODER_PLUGIN(shout_mp3_encoder); - #endif diff --git a/src/audioOutputs/audioOutput_shout_ogg.c b/src/audioOutputs/audioOutput_shout_ogg.c index d0303b3bb..14747c324 100644 --- a/src/audioOutputs/audioOutput_shout_ogg.c +++ b/src/audioOutputs/audioOutput_shout_ogg.c @@ -303,8 +303,4 @@ const struct shout_encoder_plugin shout_ogg_encoder = { shout_ogg_encoder_send_metadata, }; -#else - -DISABLED_SHOUT_ENCODER_PLUGIN(shout_ogg_encoder); - #endif -- cgit v1.2.3