X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=alsa_write.c;h=bcabe53cb704f86144fb6ff2bf5da5024b39d02a;hb=0c9c3239eb328c8b802447b4f9d2c922085e74ee;hp=dfa7a2e1a5ba068da9e457068e50eeccdf079ad3;hpb=f3b4f3298d2dffdb84a121b7d4aa561975f79be9;p=paraslash.git diff --git a/alsa_write.c b/alsa_write.c index dfa7a2e1..bcabe53c 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -46,7 +46,6 @@ struct private_alsa_write_data { * of the writer node group. */ unsigned sample_rate; - snd_pcm_format_t sample_format; /** * The number of channels, given by command line option or the @@ -184,8 +183,7 @@ static void alsa_write_pre_select(struct sched *s, struct task *t) underrun = 50; underrun -= 50; ms2tv(underrun, &tv); - if (tv_diff(&s->timeout, &tv, NULL) > 0) - s->timeout = tv; + sched_request_timeout(&tv, s); } static void alsa_close(struct writer_node *wn) @@ -258,6 +256,7 @@ again: if (ret < 0) goto err; wn->min_iqs = pad->bytes_per_frame; + goto again; } frames = bytes / pad->bytes_per_frame; frames = snd_pcm_writei(pad->handle, data, frames);