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 {
// 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;
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) {
}
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;
}