conf: fix snd_func_imul accumulator initialization
snd_func_iops() initialized result to 0 for both iadd and imul. For imul this made every multiplication step multiply by 0, so snd_func_imul() returned 0 for every input since it was added in aa7a0dd7 (2006-10-11). The doxygen example for imul therefore did not match observed behavior.
Initialize the accumulator to 1 for imul and keep the empty integers list result as 0. Add table-driven config tests covering iadd and imul single, multi, zero, negative, empty, and out-of-order integer lists.
Fixes: https://github.com/alsa-project/alsa-lib/issues/456
Closes: https://github.com/alsa-project/alsa-lib/pull/511 Signed-off-by: Bojan Janjatovic bojan.janjatovic@mamut-studio.com Signed-off-by: Jaroslav Kysela perex@perex.cz
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
alsa-lib
Advanced Linux Sound Architecture (ALSA) project
The alsa-lib is a library to interface with ALSA in the Linux kernel and virtual devices using a plugin system.
The up-to-date reference generated from sources can be accessed here:
http://www.alsa-project.org/alsa-doc/alsa-lib/
You may give a look for more information about the ALSA project to URL http://www.alsa-project.org.
Submitting patches
The preferred way to submit patches is by sending them by email to the alsa-devel mailing list. Sending mail to the list requires subscription, subscribe here: https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Add Takashi Iwai
<tiwai@suse.de>and/or Jaroslav Kysela<perex@perex.cz>to Cc so that your patch won’t be missed.Patches are also accepted as GitHub pull requests.