]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 't/alsa_fix'
authorAndre Noll <maan@systemlinux.org>
Mon, 2 Jul 2012 06:52:16 +0000 (08:52 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 2 Jul 2012 06:55:02 +0000 (08:55 +0200)
3a56a6 alsa: Do not buffer more than 500ms.

Seems to work fine everywhere.

NEWS
alsa_write.c

diff --git a/NEWS b/NEWS
index df54a6412db9ef55d4b580cbf7328b72f4a6e07f..23ec23a3840dc17b511da7b9bd904bc62ca7f68a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
        - The --no_default_filters option of para_filter has been
          removed.
        - Several fixes and latency improvements to various decoders.
+       - The alsa writer now limits the prebuffer time to 500ms.
        - Documentation improvements.
 
 ------------------------------------------
index a4863a59a5bc3a426a08e6a69d333bded736d780..a211985ab94bb71406d7729793387bbabc5fc452 100644 (file)
@@ -113,6 +113,8 @@ static int alsa_init(struct private_alsa_write_data *pad,
                NULL);
        if (ret < 0 || buffer_time == 0)
                goto fail;
+       /* buffer at most 500 milliseconds */
+       buffer_time = PARA_MIN(buffer_time, 500U * 1000U);
        msg = "could not set buffer time";
        ret = snd_pcm_hw_params_set_buffer_time_near(pad->handle, hwparams,
                &buffer_time, NULL);