From 2ef8f0cac367ab2e4fe64f9323afe7bf948eb6b8 Mon Sep 17 00:00:00 2001 From: augustss Date: Tue, 30 Mar 1999 19:33:31 +0000 Subject: [PATCH] Insert an AUDIO_DRAIN at the end of each file. --- usr.bin/audio/play/play.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/audio/play/play.c b/usr.bin/audio/play/play.c index 21e03277e949..ffa2b798f086 100644 --- a/usr.bin/audio/play/play.c +++ b/usr.bin/audio/play/play.c @@ -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 @@ play_error: 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 @@ play_error: if (write(audiofd, buffer, n) != n) err(1, "write failed"); } while ((n = read(STDIN_FILENO, buffer, bufsize))); + ioctl(audiofd, AUDIO_DRAIN); } exit(0);