alsa-utils/aplay
David Fries 85827fbb64 aplay: fix lurking capture file overwrite bug
If -d was given to arecord while commit
8aa13eec80 (now reverted) was in effect,
the last read would be shorter than the chunk size, but pcm_read would
read and return the chunk size, the samples were discarded, and
capture() continued in a loop because count never reached 0.  arecord
opens a new file each loop iteration, if arecord is dynamically naming
files, --use-strftime option or beyond the wave 2GB limit, this will
generate a series of header only wave files.  If the file is unique
the originally recorded data is lost and it will continue overwriting
the same file with a header only wave file.

While the current pcm_read can't fail (it can exit), it is better to
just fix this lurking bug in case it is "fixed" again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-14 14:35:42 +02:00
..
aplay.1 Several formatting fixes for manpages. 2013-05-16 10:38:13 +02:00
aplay.c aplay: fix lurking capture file overwrite bug 2016-04-14 14:35:42 +02:00
formats.h aplay: Add the support for big-endian WAV format (RIFX) 2012-12-13 10:53:19 +01:00
Makefile.am Makefiles - use AM_CPPFLAGS instead INCLUDES 2014-05-07 10:55:59 +02:00