]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aplay: interrupt streaming via signal in voc_pcm_write
authorSrikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
Mon, 19 Dec 2016 08:34:39 +0000 (14:04 +0530)
committerTakashi Iwai <tiwai@suse.de>
Mon, 10 Jul 2017 13:27:22 +0000 (15:27 +0200)
aplay/arecord (alsa-utils v1.1.2) cannot interrupt streaming
via CTRL-C. Fixed the issue by properly handling 'in_aborting'
flag in appropriate functions.

Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c

index 00af66246cad33fbd257f0d978524e8397028734..89baa9ad620832eafb5ab2bfc7a0baf6aefc5d9a 100644 (file)
@@ -2187,7 +2187,7 @@ static ssize_t voc_pcm_write(u_char *data, size_t count)
        ssize_t result = count, r;
        size_t size;
 
-       while (count > 0) {
+       while (count > 0 && !in_aborting) {
                size = count;
                if (size > chunk_bytes - buffer_pos)
                        size = chunk_bytes - buffer_pos;