diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/aucat/aucat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index 50d2143b0c4..c2bf3f44101 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.23 2008/06/02 17:08:11 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.24 2008/06/02 17:08:51 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -664,16 +664,17 @@ main(int argc, char **argv) if (play != NULL) { if (!quiet_flag) fprintf(stderr, "filling buffers...\n"); + buf = LIST_FIRST(&play->ibuflist); while (!quit_flag) { /* no more devices to poll */ if (!file_poll()) break; - /* device is blocked */ - if (dev->events & POLLOUT) - break; /* eof */ if (dev->state & FILE_EOF) break; + /* device is blocked and play buffer is full */ + if ((dev->events & POLLOUT) && !ABUF_WOK(buf)) + break; } } if (!quiet_flag) |