changeset 3199:263c7d983100

alsa-ng: 0.1 sec hard minimum buffer size.
author John Lindgren <john.lindgren@tds.net>
date Thu, 23 Jul 2009 14:26:10 -0400
parents 83b1a4e5f453
children 8da9787de69d
files src/alsa-ng/alsa-core.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/alsa-ng/alsa-core.c	Wed Jul 22 16:42:16 2009 -0400
+++ b/src/alsa-ng/alsa-core.c	Thu Jul 23 14:26:10 2009 -0400
@@ -363,7 +363,7 @@
     bitwidth = snd_pcm_format_physical_width(afmt);
     bps = (rate * bitwidth * nch) >> 3;
 
-    buf_size = aud_cfg->output_buffer_size ? aud_cfg->output_buffer_size : 500;
+    buf_size = MAX(aud_cfg->output_buffer_size, 100);
     ringbuf_size = buf_size * bps / 1000;
 
     if (alsaplug_ringbuffer_init(&pcm_ringbuf, ringbuf_size) == -1) {