fix & reorganize few traces

This commit is contained in:
Alexandre Ratchov 2013-05-14 11:45:19 +02:00
parent 05834decf0
commit 83cf9a6eb7
1 changed files with 4 additions and 4 deletions

View File

@ -862,10 +862,10 @@ sio_sun_revents(struct sio_hdl *sh, struct pollfd *pfd)
} }
doerr = xrun - hdl->oerr; doerr = xrun - hdl->oerr;
hdl->oerr = xrun; hdl->oerr = xrun;
if (doerr > 0)
DPRINTF("play xrun %d\n", doerr);
if (!(hdl->sio.mode & SIO_REC)) if (!(hdl->sio.mode & SIO_REC))
dierr = doerr; dierr = doerr;
if (doerr > 0)
DPRINTF("play xrun %d\n", doerr);
} }
if (hdl->sio.mode & SIO_REC) { if (hdl->sio.mode & SIO_REC) {
if (ioctl(hdl->fd, AUDIO_RERROR, &xrun) < 0) { if (ioctl(hdl->fd, AUDIO_RERROR, &xrun) < 0) {
@ -874,11 +874,11 @@ sio_sun_revents(struct sio_hdl *sh, struct pollfd *pfd)
return POLLHUP; return POLLHUP;
} }
dierr = xrun - hdl->ierr; dierr = xrun - hdl->ierr;
if (dierr > 0)
DPRINTF("rec xrun %d\n", doerr);
hdl->ierr = xrun; hdl->ierr = xrun;
if (!(hdl->sio.mode & SIO_PLAY)) if (!(hdl->sio.mode & SIO_PLAY))
doerr = dierr; doerr = dierr;
if (dierr > 0)
DPRINTF("rec xrun %d\n", dierr);
} }
offset = doerr - dierr; offset = doerr - dierr;
if (offset > 0) { if (offset > 0) {