]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - vss.c
vss.c: Use audio_format_name() where possible.
[paraslash.git] / vss.c
diff --git a/vss.c b/vss.c
index 70b54f64b574c0724feed478a567459aecd1ee70..5d919f73b5b47b0cce1db5948c1f4ae6ef6b7a32 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -183,7 +183,7 @@ void vss_init(void)
                SUPPORTED_AUDIO_FORMATS);
        FOR_EACH_AUDIO_FORMAT(i) {
                PARA_NOTICE_LOG("initializing %s handler\n",
-                       afl[i].name);
+                       audio_format_name(i));
                afl[i].init(&afl[i]);
        }
        ms2tv(announce_time, &announce_tv);
@@ -322,7 +322,7 @@ static struct timeval *vss_compute_timeout(void)
        if (mmd->audio_format < 0 || !vss_playing() || !map)
                return NULL;
        vss_next_chunk_time(&next_chunk);
-       if (chk_barrier(afl[mmd->audio_format].name, &now, &next_chunk,
+       if (chk_barrier(audio_format_name(mmd->audio_format), &now, &next_chunk,
                        &the_timeout, 0) < 0)
                return &the_timeout;
        /* chunk is due or bof */
@@ -624,14 +624,12 @@ int vss_get_chunk(long unsigned chunk_num, char **buf, size_t *len)
 void vss_send_chunk(void)
 {
        int i;
-       struct audio_format_handler *af;
        struct timeval now, due;
        char *buf;
        size_t len;
 
        if (mmd->audio_format < 0 || !map || !vss_playing())
                return;
-       af = &afl[mmd->audio_format];
        gettimeofday(&now, NULL);
        vss_next_chunk_time(&due);
        if (tv_diff(&due, &now, NULL) > 0)