gui: fix default stat command
[paraslash.git] / alsa_writer.c
index da02ac28a5f7e2e84b94d29900b793c611963b5c..7d7d36bfbdab04bf91ab0bc932b69c9b129d2a28 100644 (file)
@@ -155,7 +155,7 @@ static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
 
        if (*wng->loaded < pad->bytes_per_frame)
                return 1;
-       if (tv_diff(&s->now, &pad->next_chunk, &diff) < 0) {
+       if (tv_diff(now, &pad->next_chunk, &diff) < 0) {
                if (tv_diff(&s->timeout, &diff, NULL) > 0)
                        s->timeout = diff;
        } else {
@@ -166,7 +166,8 @@ static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
 //     PARA_INFO_LOG("timeout: %lu\n", tv2ms(&s->timeout));
 }
 
-static int alsa_write_post_select(struct sched *s, struct writer_node *wn)
+static int alsa_write_post_select(__a_unused struct sched *s,
+               struct writer_node *wn)
 {
        struct private_alsa_data *pad = wn->private_data;
        struct writer_node_group *wng = wn->wng;
@@ -181,7 +182,7 @@ static int alsa_write_post_select(struct sched *s, struct writer_node *wn)
                        wn->written = *wng->loaded;
                return 1;
        }
-       if (tv_diff(&s->now, &pad->next_chunk, NULL) < 0)
+       if (tv_diff(now, &pad->next_chunk, NULL) < 0)
                return 1;
        ret = snd_pcm_writei(pad->handle, data, frames);
        if (ret == -EPIPE) {
@@ -195,7 +196,7 @@ static int alsa_write_post_select(struct sched *s, struct writer_node *wn)
        }
        ms2tv(pad->buffer_time / 4000, &tv);
 //     ms2tv(1, &tv);
-       tv_add(&s->now, &tv, &pad->next_chunk);
+       tv_add(now, &tv, &pad->next_chunk);
        wn->written += ret * pad->bytes_per_frame;
        return 1;
 }