The Advanced Linux Sound Architecture (ALSA) - library
Find a file
furrywolf e24dc73bd6 pcm: Fix two bugs in snd_pcm_area_silence()
First, after silencing the buffer 64 bits at a time, any remaining samples
need to be silenced by the following width-specific code.  However, instead
of silencing the end of the buffer, the code instead re-silences the start
of the buffer, leaving the end unsilenced.  To fix this, update the pointer
used by the width-specific code to point to the end of the area just
silenced, instead of leaving it pointing to the start of the buffer.

Second, the code for 24 bit samples can only silence a single sample, as
there's no loop for multiple samples as with other formats.  To fix this,
add a loop similar to the ones used for every other width.

The symptoms of these bugs are random data at the end of every supposedly
silenced buffer with certain format/buffer size combinations, resulting in
pops and noise.

Signed-off-by: furrywolf <alsa2@bushytails.net>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-02-05 09:48:01 +01:00
alsalisp Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
aserver Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
doc doxygen: Suppress timestamp 2016-06-23 16:29:07 +02:00
include core: Proper reference of internal snd_dlopen() 2018-01-04 15:29:57 +01:00
m4 Add the attributes.m4 macro file from xine/lscube. 2008-11-21 13:04:19 +01:00
modules configure.ac: build extra mixer modules conditionally 2017-11-27 21:48:20 +01:00
src pcm: Fix two bugs in snd_pcm_area_silence() 2018-02-05 09:48:01 +01:00
test test: correct emulation for channel-map TLV 2017-11-24 13:47:17 +01:00
utils autotools: update style 2014-02-26 08:16:22 +01:00
.gitignore Add pcm-multi-thread to .gitignore 2016-07-07 16:30:54 +02:00
acinclude.m4 fixed for the recent autoconf. 2004-01-26 15:52:17 +00:00
ChangeLog * update to libtool 1.3.3 1999-07-22 12:18:42 +00:00
configure.ac conf/ucm: Add chtrt5645-mono-speaker-analog-mic configuration 2018-01-09 08:56:27 +01:00
COPYING Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
gitcompile configure.ac: do not enable alisp code by default 2017-11-27 21:48:20 +01:00
INSTALL pcm: Add thread-safety to PCM API 2016-07-11 15:25:30 +02:00
Makefile.am autotools: update style 2014-02-26 08:16:22 +01:00
MEMORY-LEAK Initial version 2003-02-04 14:56:07 +00:00
NOTES Change assert condition in error message handler 2007-10-24 12:53:08 +02:00
TODO Added snd_config_load_override(). 2002-01-09 21:28:15 +00:00