alsa: Increase timeout on eof to 20ms.
[paraslash.git] / alsa_write.c
index 8e3688faad4719c39b5819fb738cac1578323eee..27a8db3dcdf5daec5c4e4baedaaa7eb3a1833e4f 100644 (file)
@@ -177,8 +177,8 @@ static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
                if (ret == 0)
                        return 1;
                if (ret < 0) {
-                       underrun = 10;
-                       goto timeout;
+                       sched_request_timeout_ms(20, s);
+                       return 42;
                }
        } else {
                if (*wng->loaded - wn->written < pad->bytes_per_frame)
@@ -202,7 +202,6 @@ static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
        if (underrun < 50)
                underrun = 50;
        underrun -= 50;
-timeout:
        ms2tv(underrun, &tv);
        if (tv_diff(&s->timeout, &tv, NULL) > 0)
                s->timeout = tv;