From: Andre Noll Date: Mon, 22 Oct 2007 22:22:39 +0000 (+0200) Subject: vss.c: Isolate afh_init(). X-Git-Tag: v0.3.0~265 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=5e5f74a84cb23f5584e799e09ff76ea50f9a35fe;p=paraslash.git vss.c: Isolate afh_init(). As a first step to separate the audio format handlers from the vss. --- 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++) {