vss.c: Isolate afh_init().
authorAndre Noll <maan@systemlinux.org>
Mon, 22 Oct 2007 22:22:39 +0000 (00:22 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 22 Oct 2007 22:22:39 +0000 (00:22 +0200)
As a first step to separate the audio format handlers from the vss.

vss.c

diff --git a/vss.c b/vss.c
index 5d919f7..94134b5 100644 (file)
--- 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++) {