diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2022-04-29 08:30:49 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2022-04-29 08:30:49 +0000 |
commit | 7087f712b5254a8e3042132f050d8e0c1fe4977c (patch) | |
tree | 97b016c25ba0ad1b923f39f3a7bf6fc6455179eb /include | |
parent | 6ed8231ad9b7b5ac2bab782d137d6368b65e3715 (diff) |
Add sio_flush(3) function to stop playback immediately
The new sio_flush(3) functions works the same way as sio_stop(3),
except that it doesn't wait for play buffer to be drained. Instead,
it discards its contents and returns immediately.
Diffstat (limited to 'include')
-rw-r--r-- | include/sndio.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sndio.h b/include/sndio.h index 03550a0b23f..04c7336dd03 100644 --- a/include/sndio.h +++ b/include/sndio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sndio.h,v 1.13 2020/06/28 05:21:38 ratchov Exp $ */ +/* $OpenBSD: sndio.h,v 1.14 2022/04/29 08:30:48 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -164,6 +164,7 @@ size_t sio_write(struct sio_hdl *, const void *, size_t); size_t sio_read(struct sio_hdl *, void *, size_t); int sio_start(struct sio_hdl *); int sio_stop(struct sio_hdl *); +int sio_flush(struct sio_hdl *); int sio_nfds(struct sio_hdl *); int sio_pollfd(struct sio_hdl *, struct pollfd *, int); int sio_revents(struct sio_hdl *, struct pollfd *); |