ncmixer

ncurses audio mixer for DJ'ing
git clone git://git.2f30.org/ncmixer
Log | Files | Refs | README | LICENSE

commit 829c2451724361aea5aee16eea6c4dade71b0c08
parent 4b624ce575e6bdff2ee6fadb2e41dabb3b0d4596
Author: sin <sin@2f30.org>
Date:   Fri,  3 Jun 2016 14:45:12 +0100

Prepend audio device name in warnings

Diffstat:
Mncmixer.c | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/ncmixer.c b/ncmixer.c @@ -72,14 +72,14 @@ struct output { }; struct sio_hdl * -audio_open(char *dev) +audio_open(char *devname) { struct sio_hdl *sio_hdl; struct sio_par par; - sio_hdl = sio_open(dev, SIO_PLAY, 0); + sio_hdl = sio_open(devname, SIO_PLAY, 0); if (sio_hdl == NULL) { - warnx("failed to open audio device"); + warnx("%s: failed to open audio device", devname); return NULL; } @@ -91,35 +91,35 @@ audio_open(char *dev) par.le = SIO_LE_NATIVE; if (sio_setpar(sio_hdl, &par) == 0) { - warnx("failed to set params"); + warnx("%s: failed to set params", devname); goto err0; } if (sio_getpar(sio_hdl, &par) == 0) { - warnx("failed to get params"); + warnx("%s: failed to get params", devname); goto err0; } if (par.pchan != CHANS) { - warnx("failed to set number of channels"); + warnx("%s: failed to set number of channels", devname); goto err0; } if (par.sig != 1 || par.bits != BITS || par.le != SIO_LE_NATIVE) { - warnx("failed to set format"); + warnx("%s: failed to set format", devname); goto err0; } if (par.rate < RATE * 995 / 1000 || par.rate > RATE * 1005 / 1000) { - warnx("failed to set rate"); + warnx("%s: failed to set rate", devname); goto err0; } if (sio_start(sio_hdl) == 0) { - warnx("failed to start audio device"); + warnx("%s: failed to start audio device", devname); goto err0; }