summaryrefslogtreecommitdiff
path: root/lib/libsndio
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-12-02 08:19:12 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-12-02 08:19:12 +0000
commitc354d4fbb738c6758b385c3ad2412be2917dcbe5 (patch)
treee01d36214565f61094a0718253363fd76d9c2aeb /lib/libsndio
parent015d78c4b9b569635273b544a05053f5670dad26 (diff)
we don't expose overruns/underruns as negative positions anymore,
don't call the sio_onmove() call-back with negative argument.
Diffstat (limited to 'lib/libsndio')
-rw-r--r--lib/libsndio/sun.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libsndio/sun.c b/lib/libsndio/sun.c
index ccb26c49a92..55e745d1440 100644
--- a/lib/libsndio/sun.c
+++ b/lib/libsndio/sun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sun.c,v 1.25 2009/11/03 06:41:19 ratchov Exp $ */
+/* $OpenBSD: sun.c,v 1.26 2009/12/02 08:19:11 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -885,7 +885,7 @@ sun_revents(struct sio_hdl *sh, struct pollfd *pfd)
}
hdl->odelta += (ao.samples - hdl->obytes) / hdl->obpf;
hdl->obytes = ao.samples;
- if (hdl->odelta != 0) {
+ if (hdl->odelta > 0) {
sio_onmove_cb(&hdl->sio, hdl->odelta);
hdl->odelta = 0;
}
@@ -898,7 +898,7 @@ sun_revents(struct sio_hdl *sh, struct pollfd *pfd)
}
hdl->idelta += (ao.samples - hdl->ibytes) / hdl->ibpf;
hdl->ibytes = ao.samples;
- if (hdl->idelta != 0) {
+ if (hdl->idelta > 0) {
sio_onmove_cb(&hdl->sio, hdl->idelta);
hdl->idelta = 0;
}