]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: fix a bug to copy silent samples aligned to 64
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 2 Feb 2018 05:44:35 +0000 (14:44 +0900)
committerJaroslav Kysela <perex@perex.cz>
Mon, 5 Feb 2018 08:58:03 +0000 (09:58 +0100)
commit36decd209f1b8683d4529911205d6f50612df349
tree1f9fe30367ad4c5def2317a401858e9a3ed718ef
parente24dc73bd61008bb31158f7c946b03302255f68a
pcm: fix a bug to copy silent samples aligned to 64

bits for
  24 bit sample cases

A function of 'snd_pcm_area_silence()' has a fast path to copy silent data
efficiently. However, the fast path works well just for a case that target
buffer consists of data samples for which unit of data alignment is
divisors of 64 bits.

At present, the fast path handles sample data aligned to 24 bit. In this
case, the buffer can includes extra 8 bits. This has no issue for 'signed'
case because silent data is zero, however it has an issue for 'unsigned'
case.

This commit fixes the bug by skipping cases of sample data of 24 bit.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm.c