mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:25:42 +01:00
alsaloop: fix the avail_min setup
The previous code does not work as expected for some period_size configurations. We do not rely on the period size value, so do not correlate the avail_min parameter with this value. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
6bbeb78dba
commit
b72e221aab
1 changed files with 0 additions and 4 deletions
|
@ -246,15 +246,11 @@ static int setparams_set(struct loopback_handle *lhandle,
|
|||
} else {
|
||||
if (lhandle == lhandle->loopback->play) {
|
||||
val = bufsize + bufsize / 2;
|
||||
if (val < (period_size * 3) / 4)
|
||||
val = (period_size * 3) / 4;
|
||||
if (val > (buffer_size * 3) / 4)
|
||||
val = (buffer_size * 3) / 4;
|
||||
val = buffer_size - val;
|
||||
} else {
|
||||
val = bufsize / 2;
|
||||
if (val < period_size / 2)
|
||||
val = period_size / 2;
|
||||
if (val > buffer_size / 4)
|
||||
val = buffer_size / 4;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue