=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sndiod/dev.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- src/usr.bin/sndiod/dev.c 2015/11/25 18:51:08 1.22 +++ src/usr.bin/sndiod/dev.c 2016/01/08 16:17:31 1.23 @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.22 2015/11/25 18:51:08 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.23 2016/01/08 16:17:31 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -547,12 +547,12 @@ if (s->mode & MODE_PLAY) { abuf_rdiscard(&s->mix.buf, s->round * s->mix.bpf); } - s->skip--; + s->skip--; } return max - s->skip; } -int +int play_filt_resamp(struct slot *s, void *res_in, void *out, int todo) { int i, offs, vol, nch; @@ -582,7 +582,7 @@ return todo; } -int +int play_filt_dec(struct slot *s, void *in, void *out, int todo) { void *tmp; @@ -663,7 +663,7 @@ } } -int +int rec_filt_resamp(struct slot *s, void *in, void *res_out, int todo) { int i, vol, offs, nch; @@ -692,7 +692,7 @@ return todo; } -int +int rec_filt_enc(struct slot *s, void *in, void *out, int todo) { void *tmp; @@ -847,11 +847,11 @@ dev_mix_adjvol(d); continue; } - + /* * check for xruns */ - if (((s->mode & MODE_PLAY) && + if (((s->mode & MODE_PLAY) && s->mix.buf.used < s->round * s->mix.bpf) || ((s->mode & MODE_RECMASK) && s->sub.buf.len - s->sub.buf.used < @@ -917,7 +917,7 @@ dev_onmove(struct dev *d, int delta) { long long pos; - struct slot *s, *snext; + struct slot *s, *snext; d->delta += delta; @@ -1286,11 +1286,11 @@ } d->poffs = 0; - /* + /* * empty cycles don't increment delta, so it's ok to * start at 0 **/ - d->delta = 0; + d->delta = 0; d->pstate = DEV_RUN; dev_sio_start(d); @@ -1608,7 +1608,7 @@ * start the device if not started */ dev_wakeup(d); - + /* * get the current position, the origin is when the first sample * played and/or recorded @@ -1710,7 +1710,7 @@ s->sub.encbuf = xmalloc(s->round * slot_nch * sizeof(adata_t)); } - + /* * N-th recorded block is the N-th played block */ @@ -1728,7 +1728,7 @@ /* * device may be disconnected, and if so we're called from * slot->ops->exit() on a closed device - */ + */ if (s->dev->pstate == DEV_CFG) return; if (s->tstate == MMC_OFF) @@ -1769,7 +1769,7 @@ log_puts("\n"); } #endif - s->mix.bpf = s->par.bps * + s->mix.bpf = s->par.bps * (s->mix.slot_cmax - s->mix.slot_cmin + 1); abuf_init(&s->mix.buf, bufsz * s->mix.bpf); } @@ -1784,7 +1784,7 @@ log_puts("\n"); } #endif - s->sub.bpf = s->par.bps * + s->sub.bpf = s->par.bps * (s->sub.slot_cmax - s->sub.slot_cmin + 1); abuf_init(&s->sub.buf, bufsz * s->sub.bpf); } @@ -1829,7 +1829,7 @@ panic(); } #endif - } + } *ps = s->next; if (s->mode & MODE_RECMASK) { if (s->sub.encbuf)