Mercurial > audlegacy-plugins
comparison src/alsa-ng/alsa-core.c @ 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 |
comparison
equal
deleted
inserted
replaced
3198:83b1a4e5f453 | 3199:263c7d983100 |
---|---|
361 } | 361 } |
362 | 362 |
363 bitwidth = snd_pcm_format_physical_width(afmt); | 363 bitwidth = snd_pcm_format_physical_width(afmt); |
364 bps = (rate * bitwidth * nch) >> 3; | 364 bps = (rate * bitwidth * nch) >> 3; |
365 | 365 |
366 buf_size = aud_cfg->output_buffer_size ? aud_cfg->output_buffer_size : 500; | 366 buf_size = MAX(aud_cfg->output_buffer_size, 100); |
367 ringbuf_size = buf_size * bps / 1000; | 367 ringbuf_size = buf_size * bps / 1000; |
368 | 368 |
369 if (alsaplug_ringbuffer_init(&pcm_ringbuf, ringbuf_size) == -1) { | 369 if (alsaplug_ringbuffer_init(&pcm_ringbuf, ringbuf_size) == -1) { |
370 _ERROR("alsaplug_ringbuffer_init failed"); | 370 _ERROR("alsaplug_ringbuffer_init failed"); |
371 return -1; | 371 return -1; |