fit code in 80 columns, remove traing spaces

This commit is contained in:
Alexandre Ratchov 2016-01-08 21:51:12 +01:00
parent 105db99d30
commit 99cfc04004
7 changed files with 27 additions and 24 deletions

View File

@ -19,7 +19,7 @@
#include <stdint.h>
/*
/*
* unix-domain socket name is:
*
* DIR [ '-' UID ] '/' FILE UNIT

View File

@ -35,7 +35,7 @@
#ifdef DEBUG
static snd_output_t *output = NULL;
#define DALSA(str, err) fprintf(stderr, "%s: %s\n", str, snd_strerror(err))
#define DALSA(str, err) fprintf(stderr, "%s: %s\n", str, snd_strerror(err))
#else
#define DALSA(str, err) do {} while (0)
#endif

View File

@ -75,7 +75,8 @@ mio_aucat_runmsg(struct mio_aucat_hdl *hdl)
delta, hdl->aucat.maxwrite);
break;
default:
DPRINTF("mio_aucat_runmsg: unhandled message %u\n", hdl->aucat.rmsg.cmd);
DPRINTF("mio_aucat_runmsg: unhandled message %u\n",
hdl->aucat.rmsg.cmd);
hdl->mio.eof = 1;
return 0;
}

View File

@ -165,7 +165,7 @@ sio_setpar(struct sio_hdl *hdl, struct sio_par *par)
return 0;
}
if (par->__magic != SIO_PAR_MAGIC) {
DPRINTF("sio_setpar: use of uninitialized sio_par structure\n");
DPRINTF("sio_setpar: uninitialized sio_par structure\n");
hdl->eof = 1;
return 0;
}
@ -448,7 +448,7 @@ sio_onmove(struct sio_hdl *hdl, void (*cb)(void *, int), void *addr)
#ifdef DEBUG
void
_sio_printpos(struct sio_hdl *hdl)
{
{
struct timespec ts;
long long rpos, rdiff;
long long cpos, cdiff;
@ -461,7 +461,7 @@ _sio_printpos(struct sio_hdl *hdl)
rround = hdl->par.round * rbpf;
wround = hdl->par.round * wbpf;
rpos = (hdl->mode & SIO_REC) ?
rpos = (hdl->mode & SIO_REC) ?
hdl->cpos * rbpf - hdl->rused : 0;
wpos = (hdl->mode & SIO_PLAY) ?
hdl->cpos * wbpf + hdl->wused : 0;

View File

@ -39,7 +39,7 @@
#ifdef DEBUG
static snd_output_t *output = NULL;
#define DALSA(str, err) fprintf(stderr, "%s: %s\n", str, snd_strerror(err))
#define DALSA(str, err) fprintf(stderr, "%s: %s\n", str, snd_strerror(err))
#else
#define DALSA(str, err) do {} while (0)
#endif
@ -103,9 +103,9 @@ static unsigned int cap_rates[] = {
};
static snd_pcm_format_t cap_fmts[] = {
/* XXX add s24le3 and s24be3 */
SND_PCM_FORMAT_S32_LE, SND_PCM_FORMAT_S32_BE,
SND_PCM_FORMAT_S24_LE, SND_PCM_FORMAT_S24_BE,
SND_PCM_FORMAT_S16_LE, SND_PCM_FORMAT_S16_BE,
SND_PCM_FORMAT_S32_LE, SND_PCM_FORMAT_S32_BE,
SND_PCM_FORMAT_S24_LE, SND_PCM_FORMAT_S24_BE,
SND_PCM_FORMAT_S16_LE, SND_PCM_FORMAT_S16_BE,
SND_PCM_FORMAT_U8
};
@ -498,11 +498,11 @@ sio_alsa_xrun(struct sio_alsa_hdl *hdl)
*
* to understand the formula, draw a picture :)
*/
rbpf = (hdl->sio.mode & SIO_REC) ?
rbpf = (hdl->sio.mode & SIO_REC) ?
hdl->sio.par.bps * hdl->sio.par.rchan : 1;
wbpf = (hdl->sio.mode & SIO_PLAY) ?
hdl->sio.par.bps * hdl->sio.par.pchan : 1;
rround = hdl->sio.par.round * rbpf;
rround = hdl->sio.par.round * rbpf;
clk = hdl->sio.cpos % hdl->sio.par.round;
rdrop = (clk * rbpf - hdl->sio.rused) % rround;
@ -537,12 +537,12 @@ sio_alsa_setpar_hw(snd_pcm_t *pcm, snd_pcm_hw_params_t *hwp,
snd_pcm_uframes_t *round, unsigned int *periods)
{
static snd_pcm_format_t fmts[] = {
SND_PCM_FORMAT_S32_LE, SND_PCM_FORMAT_S32_BE,
SND_PCM_FORMAT_S32_LE, SND_PCM_FORMAT_S32_BE,
SND_PCM_FORMAT_U32_LE, SND_PCM_FORMAT_U32_BE,
SND_PCM_FORMAT_S24_LE, SND_PCM_FORMAT_S24_BE,
SND_PCM_FORMAT_S24_LE, SND_PCM_FORMAT_S24_BE,
SND_PCM_FORMAT_U24_LE, SND_PCM_FORMAT_U24_BE,
SND_PCM_FORMAT_S16_LE, SND_PCM_FORMAT_S16_BE,
SND_PCM_FORMAT_U16_LE, SND_PCM_FORMAT_U16_BE,
SND_PCM_FORMAT_S16_LE, SND_PCM_FORMAT_S16_BE,
SND_PCM_FORMAT_U16_LE, SND_PCM_FORMAT_U16_BE,
SND_PCM_FORMAT_U8, SND_PCM_FORMAT_S8
};
int i, err, dir = 0;
@ -699,7 +699,7 @@ sio_alsa_getcap(struct sio_hdl *sh, struct sio_cap *cap)
sio_alsa_fmttopar(hdl, cap_fmts[i],
&cap->enc[i].bits,
&cap->enc[i].sig,
&cap->enc[i].le);
&cap->enc[i].le);
cap->enc[i].bps = SIO_BPS(cap->enc[0].bits);
cap->enc[i].msb = 1;
}
@ -796,7 +796,7 @@ sio_alsa_setpar(struct sio_hdl *sh, struct sio_par *par)
ofmt, orate, (unsigned int)oround, operiods);
DPRINTFN(2, "ifmt = %u, irate = %u, iround = %u, iperiods = %u\n",
ifmt, irate, (unsigned int)iround, iperiods);
if (ifmt != ofmt) {
DPRINTF("play and rec formats differ\n");
hdl->sio.eof = 1;
@ -1122,7 +1122,7 @@ sio_alsa_revents(struct sio_hdl *sh, struct pollfd *pfd)
if (hdl->sio.eof)
return POLLHUP;
for (i = 0; i < hdl->onfds + hdl->infds; i++) {
DPRINTFN(4, "sio_alsa_revents: pfds[%d].revents = %x\n",
i, pfd[i].revents);

View File

@ -125,7 +125,8 @@ sio_aucat_runmsg(struct sio_aucat_hdl *hdl)
hdl->pstate = PSTATE_INIT;
break;
default:
DPRINTF("sio_aucat_runmsg: unhandled message %u\n", hdl->aucat.rmsg.cmd);
DPRINTF("sio_aucat_runmsg: unhandled message %u\n",
hdl->aucat.rmsg.cmd);
hdl->sio.eof = 1;
return 0;
}

View File

@ -560,7 +560,8 @@ sio_sun_setpar(struct sio_hdl *sh, struct sio_par *par)
}
DPRINTFN(2, "sio_sun_setpar: %i: trying pars = %u/%u/%u\n",
i, rate, prec, enc);
if (ioctl(hdl->fd, AUDIO_SETINFO, &aui) < 0 && errno != EINVAL) {
if (ioctl(hdl->fd, AUDIO_SETINFO, &aui) < 0 &&
errno != EINVAL) {
DPERROR("sio_sun_setpar: setinfo(pars)");
hdl->sio.eof = 1;
return 0;
@ -581,7 +582,7 @@ sio_sun_setpar(struct sio_hdl *sh, struct sio_par *par)
case AUDIO_ENCODING_ULINEAR:
break;
default:
DPRINTF("sio_sun_setpar: couldn't set linear encoding\n");
DPRINTF("sio_sun_setpar: couldn't set encoding\n");
hdl->sio.eof = 1;
return 0;
}
@ -672,7 +673,7 @@ sio_sun_setpar(struct sio_hdl *sh, struct sio_par *par)
}
infr = aui.record.block_size / ibpf;
onfr = aui.play.block_size / obpf;
DPRINTFN(2, "sio_sun_setpar: %i: trying round = %u -> (%u, %u)\n",
DPRINTFN(2, "sio_sun_setpar: %i: round = %u -> (%u, %u)\n",
i, round, infr, onfr);
/*
@ -847,7 +848,7 @@ sio_sun_revents(struct sio_hdl *sh, struct pollfd *pfd)
doerr = (ap.play_xrun - hdl->oerr) / hdl->obpf;
hdl->obytes = ap.play_pos;
hdl->oerr = ap.play_xrun;
hdl->odelta += delta;
hdl->odelta += delta;
if (!(hdl->sio.mode & SIO_REC)) {
hdl->idelta += delta;
dierr = doerr;