]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Fix for raw data recording by Georgios Papoutsis <gepap@gmx.de>
authorJaroslav Kysela <perex@perex.cz>
Mon, 1 Apr 2002 19:29:22 +0000 (19:29 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 1 Apr 2002 19:29:22 +0000 (19:29 +0000)
aplay/aplay.c

index b31a555b49189f9d0da3e6dd01dc02eb861430b0..9b01394f05ef7e7404a7568ae9b36cf1b9f30ef2 100644 (file)
@@ -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;