#include "string.h"
#include "afh.h"
-/* The mp3 audio format handler does not need any libs. */
-void mp3_init(struct audio_format_handler *);
-
-#ifdef HAVE_OGGVORBIS
- void ogg_init(struct audio_format_handler *);
-#endif
-#ifdef HAVE_FAAD
- void aac_afh_init(struct audio_format_handler *);
-#endif
-#ifdef HAVE_SPEEX
- void spx_afh_init(struct audio_format_handler *);
-#endif
-#ifdef HAVE_FLAC
- void flac_afh_init(struct audio_format_handler *);
-#endif
-
-#ifdef HAVE_OPUS
- void opus_afh_init(struct audio_format_handler *);
-#endif
-
-void wma_afh_init(struct audio_format_handler *);
+typedef void afh_init_func(struct audio_format_handler *);
+/* It does not hurt to declare init functions which are not available. */
+extern afh_init_func mp3_init, ogg_init, aac_afh_init, wma_afh_init,
+ spx_afh_init, flac_afh_init, opus_afh_init;
/** The list of all status items */
const char *status_item_list[] = {STATUS_ITEM_ARRAY};
},
{
.name = "ogg",
-#ifdef HAVE_OGGVORBIS
+#if defined(HAVE_OGG) && defined(HAVE_VORBIS)
.init = ogg_init,
#endif
},
},
{
.name = "spx",
-#ifdef HAVE_SPEEX
+#if defined(HAVE_OGG) && defined(HAVE_SPEEX)
.init = spx_afh_init,
#endif
},
{
.name = "flac",
-#ifdef HAVE_FLAC
+#if defined(HAVE_OGG) && defined(HAVE_FLAC)
.init = flac_afh_init,
#endif
},
{
.name = "opus",
-#ifdef HAVE_OPUS
+#if defined(HAVE_OGG) && defined(HAVE_OPUS)
.init = opus_afh_init,
#endif
},