]> git.alsa-project.org Git - alsa-utils.git/commit
alsaloop: Fix the silence generation in xrun_sync
authorDragos Tarcatu <dragos_tarcatu@mentor.com>
Thu, 24 Sep 2020 06:01:09 +0000 (06:01 +0000)
committerJaroslav Kysela <perex@perex.cz>
Fri, 25 Sep 2020 13:21:15 +0000 (15:21 +0200)
commit8572c0c427dec358e6070659032230966d0dd0ca
tree5bd328577d994553d91341fd8de5042c618c86fc
parent15539cd0e660e90635c90fc7862534c972c4b0c8
alsaloop: Fix the silence generation in xrun_sync

The silence frames generation in xrun_sync() seems to be currently
a bit off as snd_pcm_format_set_silence() uses a wrong buffer address
and size for zero-ing out the data. Consequently instead of clearing
out the last frame(s), snd_pcm_format_set_silence() ends up silencing
samples somewhere else in the buffer. This is partilarly more obvious
for higher frame sizes (e.g. more than 2 channels).

This patch fixes this issue by correcting the parameters passed to
snd_pcm_format_set_silence().

BugLink: https://github.com/alsa-project/alsa-utils/pull/58
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsaloop/pcmjob.c