From: Andre Noll Date: Mon, 2 Jul 2012 06:52:16 +0000 (+0200) Subject: Merge branch 't/alsa_fix' X-Git-Tag: v0.4.11~11 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=128c594f32be41d928df432298a013a168891ab7;hp=454228f5f7b65b398c8cbaef094cf71f5dbac434 Merge branch 't/alsa_fix' 3a56a6 alsa: Do not buffer more than 500ms. Seems to work fine everywhere. --- diff --git a/NEWS b/NEWS index df54a641..23ec23a3 100644 --- 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. ------------------------------------------ diff --git a/alsa_write.c b/alsa_write.c index a4863a59..a211985a 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -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);