arecord leaves doubled audio at end after a SIGTERM

GitHub issues - edited github at alsa-project.org
Wed Nov 30 04:07:43 CET 2022


alsa-project/alsa-utils issue #179 was edited from chconnor:

Hello: I issue a command like this:

`arecord -t wav -c 1 -f S16_LE -r44100 -D hw:2,0 test.wav
`

It works fine, but then I hit ctrl-C to terminate. This works, but the file has "junk" at the end that repeats the last fraction of a second. E.g. in this demo file I ctrl-C when I say the word "one", and the recording is like "three, two, on-on":

https://caseyconnor.org/pub/audio/arecord_bug.wav

It's as if it is mistakenly writing a buffer an extra time?

(In my total ignorance and total lack of qualifications, I traced the code to [here](https://github.com/alsa-project/alsa-lib/blob/d28e8cb29485cc93f741b01dc65893c798359963/src/pcm/pcm.c#L7544), but I get lost and can't see if anything is awry...)

Issue URL     : https://github.com/alsa-project/alsa-utils/issues/179
Repository URL: https://github.com/alsa-project/alsa-utils


More information about the Alsa-devel mailing list