Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/audio/play Insert an AUDIO_DRAIN at the end of each ...



details:   https://anonhg.NetBSD.org/src/rev/e2d6c4498d42
branches:  trunk
changeset: 467893:e2d6c4498d42
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Mar 30 19:33:31 1999 +0000

description:
Insert an AUDIO_DRAIN at the end of each file.

diffstat:

 usr.bin/audio/play/play.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 98e5fa926de2 -r e2d6c4498d42 usr.bin/audio/play/play.c
--- a/usr.bin/audio/play/play.c Tue Mar 30 19:04:50 1999 +0000
+++ b/usr.bin/audio/play/play.c Tue Mar 30 19:33:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: play.c,v 1.6 1999/03/28 10:35:06 mrg Exp $     */
+/*     $NetBSD: play.c,v 1.7 1999/03/30 19:33:31 augustss Exp $        */
 
 /*
  * Copyright (c) 1999 Matthew R. Green
@@ -219,6 +219,7 @@
                        if (write(audiofd, addr, (size_t)filesize) != (ssize_t)filesize)
                                err(1, "final write failed");
 
+                       ioctl(audiofd, AUDIO_DRAIN);
                        if (munmap(oaddr, (size_t)filesize) < 0)
                                err(1, "munmap failed");
 
@@ -261,6 +262,7 @@
                        if (write(audiofd, buffer, n) != n)
                                err(1, "write failed");
                } while ((n = read(STDIN_FILENO, buffer, bufsize)));
+               ioctl(audiofd, AUDIO_DRAIN);
        }
 
        exit(0);



Home | Main Index | Thread Index | Old Index