1
0
mirror of https://github.com/ericonr/sndio.git synced 2024-02-18 04:45:21 -06:00

nicer debug traces

This commit is contained in:
Alexandre Ratchov 2014-03-06 16:59:57 +01:00
parent aa1877d6ef
commit e9feeda8a2

View File

@ -96,17 +96,18 @@ sio_aucat_runmsg(struct sio_aucat_hdl *hdl)
hdl->sio.eof = 1; hdl->sio.eof = 1;
return 0; return 0;
} }
DPRINTFN(3, "aucat: data(%d)\n", size);
return 1; return 1;
case AMSG_FLOWCTL: case AMSG_FLOWCTL:
delta = ntohl(hdl->aucat.rmsg.u.ts.delta); delta = ntohl(hdl->aucat.rmsg.u.ts.delta);
hdl->aucat.maxwrite += delta * (int)hdl->wbpf; hdl->aucat.maxwrite += delta * (int)hdl->wbpf;
DPRINTFN(3, "aucat: flowctl = %d, maxwrite = %d\n", DPRINTFN(3, "aucat: flowctl(%d), maxwrite = %d\n",
delta, hdl->aucat.maxwrite); delta, hdl->aucat.maxwrite);
break; break;
case AMSG_MOVE: case AMSG_MOVE:
delta = ntohl(hdl->aucat.rmsg.u.ts.delta); delta = ntohl(hdl->aucat.rmsg.u.ts.delta);
hdl->delta += delta; hdl->delta += delta;
DPRINTFN(3, "aucat: move = %d, delta = %d, maxwrite = %d\n", DPRINTFN(3, "aucat: move(%d), delta = %d, maxwrite = %d\n",
delta, hdl->delta, hdl->aucat.maxwrite); delta, hdl->delta, hdl->aucat.maxwrite);
if (hdl->delta >= 0) { if (hdl->delta >= 0) {
_sio_onmove_cb(&hdl->sio, hdl->delta); _sio_onmove_cb(&hdl->sio, hdl->delta);
@ -116,9 +117,11 @@ sio_aucat_runmsg(struct sio_aucat_hdl *hdl)
case AMSG_SETVOL: case AMSG_SETVOL:
ctl = ntohl(hdl->aucat.rmsg.u.vol.ctl); ctl = ntohl(hdl->aucat.rmsg.u.vol.ctl);
hdl->curvol = hdl->reqvol = ctl; hdl->curvol = hdl->reqvol = ctl;
DPRINTFN(3, "aucat: setvol(%d)\n", ctl);
_sio_onvol_cb(&hdl->sio, ctl); _sio_onvol_cb(&hdl->sio, ctl);
break; break;
case AMSG_STOP: case AMSG_STOP:
DPRINTFN(3, "aucat: stop()\n");
hdl->pstate = PSTATE_INIT; hdl->pstate = PSTATE_INIT;
break; break;
default: default: