=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/aucat/Attic/aproc.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- src/usr.bin/aucat/Attic/aproc.c 2012/03/23 11:59:54 1.70 +++ src/usr.bin/aucat/Attic/aproc.c 2012/04/11 06:05:43 1.71 @@ -1,4 +1,4 @@ -/* $OpenBSD: aproc.c,v 1.70 2012/03/23 11:59:54 ratchov Exp $ */ +/* $OpenBSD: aproc.c,v 1.71 2012/04/11 06:05:43 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -289,12 +289,12 @@ } int -rfile_do(struct aproc *p, unsigned todo, unsigned *done) +rfile_do(struct aproc *p, unsigned int todo, unsigned int *done) { struct abuf *obuf = LIST_FIRST(&p->outs); struct file *f = p->u.io.file; unsigned char *data; - unsigned n, count, off; + unsigned int n, count, off; off = p->u.io.partial; data = abuf_wgetblk(obuf, &count, 0); @@ -451,12 +451,12 @@ } int -wfile_do(struct aproc *p, unsigned todo, unsigned *done) +wfile_do(struct aproc *p, unsigned int todo, unsigned int *done) { struct abuf *ibuf = LIST_FIRST(&p->ins); struct file *f = p->u.io.file; unsigned char *data; - unsigned n, count, off; + unsigned int n, count, off; off = p->u.io.partial; data = abuf_rgetblk(ibuf, &count, 0); @@ -547,7 +547,7 @@ void mix_drop(struct abuf *buf, int extra) { - unsigned count; + unsigned int count; buf->r.mix.drop += extra; while (buf->r.mix.drop > 0) { @@ -583,10 +583,10 @@ * obuf->w.mix.todo doesn't exceed the given value */ void -mix_bzero(struct abuf *obuf, unsigned maxtodo) +mix_bzero(struct abuf *obuf, unsigned int maxtodo) { adata_t *odata; - unsigned ocount, todo; + unsigned int ocount, todo; if (obuf->w.mix.todo >= maxtodo) return; @@ -611,13 +611,13 @@ /* * Mix an input block over an output block. */ -unsigned +unsigned int mix_badd(struct abuf *ibuf, struct abuf *obuf) { adata_t *idata, *odata; - unsigned cmin, cmax; - unsigned i, j, cc, istart, inext, onext, ostart; - unsigned scount, icount, ocount; + unsigned int cmin, cmax; + unsigned int i, j, cc, istart, inext, onext, ostart; + unsigned int scount, icount, ocount; int vol, s; #ifdef DEBUG @@ -710,7 +710,7 @@ mix_xrun(struct aproc *p, struct abuf *i) { struct abuf *obuf = LIST_FIRST(&p->outs); - unsigned fdrop, remain; + unsigned int fdrop, remain; if (i->r.mix.done > 0) return 1; @@ -765,9 +765,9 @@ mix_in(struct aproc *p, struct abuf *ibuf) { struct abuf *i, *inext, *obuf = LIST_FIRST(&p->outs); - unsigned odone; - unsigned maxwrite; - unsigned scount; + unsigned int odone; + unsigned int maxwrite; + unsigned int scount; #ifdef DEBUG if (debug_level >= 4) { @@ -832,9 +832,9 @@ mix_out(struct aproc *p, struct abuf *obuf) { struct abuf *i, *inext; - unsigned odone; - unsigned maxwrite; - unsigned scount; + unsigned int odone; + unsigned int maxwrite; + unsigned int scount; #ifdef DEBUG if (debug_level >= 4) { @@ -919,7 +919,7 @@ mix_eof(struct aproc *p, struct abuf *ibuf) { struct abuf *i, *obuf = LIST_FIRST(&p->outs); - unsigned odone; + unsigned int odone; mix_setmaster(p); @@ -1021,8 +1021,8 @@ }; struct aproc * -mix_new(char *name, int maxlat, unsigned round, - unsigned autovol, unsigned master) +mix_new(char *name, int maxlat, unsigned int round, + unsigned int autovol, unsigned int master) { struct aproc *p; @@ -1043,7 +1043,7 @@ void mix_setmaster(struct aproc *p) { - unsigned n; + unsigned int n; struct abuf *i, *j; int weight; @@ -1113,7 +1113,7 @@ sub_silence(struct abuf *buf, int extra) { unsigned char *data; - unsigned count; + unsigned int count; buf->w.sub.silence += extra; if (buf->w.sub.silence > 0) { @@ -1152,9 +1152,9 @@ sub_bcopy(struct abuf *ibuf, struct abuf *obuf) { adata_t *idata, *odata; - unsigned cmin, cmax; - unsigned i, j, cc, istart, inext, onext, ostart; - unsigned icount, ocount, scount; + unsigned int cmin, cmax; + unsigned int i, j, cc, istart, inext, onext, ostart; + unsigned int icount, ocount, scount; /* * Drop samples for xrun correction @@ -1213,7 +1213,7 @@ sub_xrun(struct aproc *p, struct abuf *i) { struct abuf *ibuf = LIST_FIRST(&p->ins); - unsigned fdrop, remain; + unsigned int fdrop, remain; if (i->w.sub.done > 0) return 1; @@ -1269,7 +1269,7 @@ sub_in(struct aproc *p, struct abuf *ibuf) { struct abuf *i, *inext; - unsigned idone; + unsigned int idone; if (!ABUF_ROK(ibuf)) return 0; @@ -1315,7 +1315,7 @@ { struct abuf *ibuf = LIST_FIRST(&p->ins); struct abuf *i, *inext; - unsigned idone; + unsigned int idone; if (!SUB_WOK(obuf)) return 0; @@ -1352,7 +1352,7 @@ sub_hup(struct aproc *p, struct abuf *obuf) { struct abuf *i, *ibuf = LIST_FIRST(&p->ins); - unsigned idone; + unsigned int idone; if (!aproc_inuse(p)) { #ifdef DEBUG @@ -1427,7 +1427,7 @@ }; struct aproc * -sub_new(char *name, int maxlat, unsigned round) +sub_new(char *name, int maxlat, unsigned int round) { struct aproc *p; @@ -1451,19 +1451,19 @@ void resamp_bcopy(struct aproc *p, struct abuf *ibuf, struct abuf *obuf) { - unsigned inch; + unsigned int inch; adata_t *idata; - unsigned oblksz; - unsigned ifr; - unsigned onch; + unsigned int oblksz; + unsigned int ifr; + unsigned int onch; int s, ds, diff; adata_t *odata; - unsigned iblksz; - unsigned ofr; - unsigned c; + unsigned int iblksz; + unsigned int ofr; + unsigned int c; adata_t *ctxbuf, *ctx; - unsigned ctx_start; - unsigned icount, ocount; + unsigned int ctx_start; + unsigned int icount, ocount; /* * Calculate max frames readable at once from the input buffer. @@ -1643,10 +1643,10 @@ }; struct aproc * -resamp_new(char *name, unsigned iblksz, unsigned oblksz) +resamp_new(char *name, unsigned int iblksz, unsigned int oblksz) { struct aproc *p; - unsigned i; + unsigned int i; p = aproc_new(&resamp_ops, name); p->u.resamp.iblksz = iblksz; @@ -1676,14 +1676,14 @@ void enc_bcopy(struct aproc *p, struct abuf *ibuf, struct abuf *obuf) { - unsigned nch, scount, icount, ocount; - unsigned f; + unsigned int nch, scount, icount, ocount; + unsigned int f; adata_t *idata; int s; - unsigned oshift; + unsigned int oshift; int osigbit; - unsigned obps; - unsigned i; + unsigned int obps; + unsigned int i; unsigned char *odata; int obnext; int osnext; @@ -1834,16 +1834,16 @@ void dec_bcopy(struct aproc *p, struct abuf *ibuf, struct abuf *obuf) { - unsigned nch, scount, icount, ocount; - unsigned f; - unsigned ibps; - unsigned i; + unsigned int nch, scount, icount, ocount; + unsigned int f; + unsigned int ibps; + unsigned int i; int s = 0xdeadbeef; unsigned char *idata; int ibnext; int isnext; int isigbit; - unsigned ishift; + unsigned int ishift; adata_t *odata; /* @@ -1992,13 +1992,13 @@ void join_bcopy(struct aproc *p, struct abuf *ibuf, struct abuf *obuf) { - unsigned h, hops; - unsigned inch, inext; + unsigned int h, hops; + unsigned int inch, inext; adata_t *idata; - unsigned onch, onext; + unsigned int onch, onext; adata_t *odata; int scale; - unsigned c, f, scount, icount, ocount; + unsigned int c, f, scount, icount, ocount; /* * Calculate max frames readable at once from the input buffer. @@ -2136,7 +2136,7 @@ mon_flush(struct aproc *p) { struct abuf *obuf = LIST_FIRST(&p->outs); - unsigned count; + unsigned int count; #ifdef DEBUG if (debug_level >= 4) { @@ -2165,10 +2165,11 @@ * Copy one block. */ void -mon_snoop(struct aproc *p, struct abuf *ibuf, unsigned pos, unsigned todo) +mon_snoop(struct aproc *p, struct abuf *ibuf, + unsigned int pos, unsigned int todo) { struct abuf *obuf = LIST_FIRST(&p->outs); - unsigned scount, icount, ocount; + unsigned int scount, icount, ocount; adata_t *idata, *odata; #ifdef DEBUG @@ -2277,7 +2278,7 @@ }; struct aproc * -mon_new(char *name, unsigned bufsz) +mon_new(char *name, unsigned int bufsz) { struct aproc *p;