From 5e5f74a84cb23f5584e799e09ff76ea50f9a35fe Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 23 Oct 2007 00:22:39 +0200 Subject: [PATCH] vss.c: Isolate afh_init(). As a first step to separate the audio format handlers from the vss. --- vss.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/vss.c b/vss.c index 5d919f73..94134b51 100644 --- a/vss.c +++ b/vss.c @@ -164,6 +164,19 @@ const char *audio_format_name(int i) return i >= 0? afl[i].name : "(none)"; } +static void afh_init(void) +{ + int i; + + PARA_DEBUG_LOG("supported audio formats: %s\n", + SUPPORTED_AUDIO_FORMATS); + FOR_EACH_AUDIO_FORMAT(i) { + PARA_NOTICE_LOG("initializing %s handler\n", + audio_format_name(i)); + afl[i].init(&afl[i]); + } +} + /** * initialize the virtual streaming system * @@ -178,14 +191,7 @@ void vss_init(void) conf.announce_time_arg : 300, autoplay_delay = conf.autoplay_delay_arg > 0? conf.autoplay_delay_arg : 0; - - PARA_DEBUG_LOG("supported audio formats: %s\n", - SUPPORTED_AUDIO_FORMATS); - FOR_EACH_AUDIO_FORMAT(i) { - PARA_NOTICE_LOG("initializing %s handler\n", - audio_format_name(i)); - afl[i].init(&afl[i]); - } + afh_init(); ms2tv(announce_time, &announce_tv); PARA_INFO_LOG("announce timeval: %lums\n", tv2ms(&announce_tv)); for (i = 0; senders[i].name; i++) { -- 2.39.5