]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod.c
Fix wng_open error handling.
[paraslash.git] / audiod.c
index 8f6f3560ee37cb6cbb927630bb583937d51693db..68c84fb4df31bf54266643e709b40918bce53fb7 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -105,7 +105,7 @@ static char *af_status, /* the audio format announced in server status */
        *socket_name, *hostname;
 static char *stat_item_values[NUM_STAT_ITEMS];
 static FILE *logfile;
-static const struct timeval restart_delay = {0, 300 * 1000};
+static const struct timeval restart_delay = {0, 200 * 1000};
 static struct audio_format_info afi[NUM_AUDIO_FORMATS];
 static struct timeval *now;
 
@@ -718,7 +718,11 @@ static void open_writers(int slot_num)
                s->wng->writer_nodes[i].writer = a->writers[i];
                sprintf(s->wng->writer_nodes[i].task.status, "writer_node");
        }
-       ret = wng_open(s->wng); /* FIXME */
+       ret = wng_open(s->wng);
+       if (ret < 0) {
+               PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
+               return;
+       }
        s->wstime = *now;
        current_decoder = slot_num;
        activate_inactive_grab_clients(slot_num, s->format, &s->fc->filters);
@@ -816,7 +820,7 @@ static void compute_time_diff(const struct timeval *status_time)
                count > 10? sign : sign * time_smooth, &diff,
                &tmp);
        sa_time_diff = tmp;
-       PARA_INFO_LOG("time diff (cur/avg): %s%lums/%s%lums\n",
+       PARA_DEBUG_LOG("time diff (cur/avg): %s%lums/%s%lums\n",
                sign > 0? "+" : "-",
                tv2ms(&diff),
                sa_time_diff_sign ? "+" : "-",