From c354d4fbb738c6758b385c3ad2412be2917dcbe5 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Wed, 2 Dec 2009 08:19:12 +0000 Subject: we don't expose overruns/underruns as negative positions anymore, don't call the sio_onmove() call-back with negative argument. --- lib/libsndio/sun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libsndio/sun.c') 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 * @@ -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; } -- cgit v1.2.3