From 44c2918ad5e89bec7aa0b206179254d577e3d87d Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 1 Apr 2002 19:29:22 +0000 Subject: [PATCH] Fix for raw data recording by Georgios Papoutsis --- aplay/aplay.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/aplay/aplay.c b/aplay/aplay.c index b31a555..9b01394 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -104,6 +104,7 @@ static void begin_voc(int fd, size_t count); static void end_voc(int fd); static void begin_wave(int fd, size_t count); static void end_wave(int fd); +static void end_raw(int fd); static void begin_au(int fd, size_t count); static void end_au(int fd); @@ -112,7 +113,7 @@ struct fmt_capture { void (*end) (int fd); char *what; } fmt_rec_table[] = { - { NULL, end_wave, "raw data" }, + { NULL, end_raw, "raw data" }, { begin_voc, end_voc, "VOC" }, { begin_wave, end_wave, "WAVE" }, { begin_au, end_au, "Sparc Audio" } @@ -1578,6 +1579,12 @@ static void end_voc(int fd) close(fd); } +static void end_raw(int fd) +{ /* REALLY only close output */ + if (fd != 1) + close(fd); +} + static void end_wave(int fd) { /* only close output */ WaveChunkHeader cd; -- 2.47.1