X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afh_common.c;h=1614c27c6c9dd6d7588399ca164a9fd754087e83;hp=4d8884a6ce8d07e6413d9a3c71630078bdbe853b;hb=408371cd5c6c06cdbd51513ab49ff0bc376cda26;hpb=34be2cc6668b2297566de312250f6c0104796f65 diff --git a/afh_common.c b/afh_common.c index 4d8884a6..1614c27c 100644 --- a/afh_common.c +++ b/afh_common.c @@ -16,8 +16,18 @@ #include "afh.h" 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, + +/* + * Declaration of the audio format handler init functions. + * + * These symbols are referenced in the afl array below. + * + * Most audio format handlers depend on an external library and are not + * compiled in if the library is not installed. Hence it is well possible that + * not all of these functions are defined. It does not hurt to declare them + * anyway, and this avoids another set of ifdefs. + */ +extern afh_init_func mp3_afh_init, ogg_afh_init, aac_afh_init, wma_afh_init, spx_afh_init, flac_afh_init, opus_afh_init; /** The list of all status items */ @@ -38,12 +48,12 @@ const char *status_item_list[] = {STATUS_ITEM_ARRAY}; static struct audio_format_handler afl[] = { { .name = "mp3", - .init = mp3_init, + .init = mp3_afh_init, }, { .name = "ogg", #if defined(HAVE_OGG) && defined(HAVE_VORBIS) - .init = ogg_init, + .init = ogg_afh_init, #endif }, {