alsa-utils icon indicating copy to clipboard operation
alsa-utils copied to clipboard

arecord leaves doubled audio at end after a SIGTERM

Open chconnor opened this issue 2 years ago • 0 comments

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, but I get lost and can't see if anything is awry...)

(Edit: version 1.2.6 on Lubuntu 22.04 with a Shure X2U interface)

chconnor avatar Nov 30 '22 03:11 chconnor