From c95cb049878b593307fcf4c48dfab55df75faa4f Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Mon, 17 Mar 2014 18:42:20 +0100 Subject: [PATCH] dont check dev_cycle() ret val as we check dev state --- sndiod/dev.c | 15 ++++----------- sndiod/dev.h | 2 +- sndiod/siofile.c | 3 +-- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/sndiod/dev.c b/sndiod/dev.c index 53d9425..c4d107e 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -50,7 +50,6 @@ void dev_mon_snoop(struct dev *); int play_filt_resamp(struct slot *, void *, void *, int); int play_filt_dec(struct slot *, void *, void *, int); void dev_mix_badd(struct dev *, struct slot *); -void dev_empty_cycle(struct dev *); void dev_mix_adjvol(struct dev *); int rec_filt_resamp(struct slot *, void *, void *, int); int rec_filt_enc(struct slot *, void *, void *, int); @@ -58,7 +57,7 @@ void dev_sub_bcopy(struct dev *, struct slot *); void dev_onmove(struct dev *, int); void dev_master(struct dev *, unsigned int); -int dev_cycle(struct dev *); +void dev_cycle(struct dev *); int dev_getpos(struct dev *); struct dev *dev_new(char *, struct aparams *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); @@ -630,11 +629,6 @@ dev_mix_badd(struct dev *d, struct slot *s) abuf_rdiscard(&s->mix.buf, s->round * s->mix.bpf); } -void -dev_empty_cycle(struct dev *d) -{ -} - /* * Normalize input levels. */ @@ -752,7 +746,7 @@ dev_sub_bcopy(struct dev *d, struct slot *s) * run a one block cycle, return 0 if the device was stopped and/or * closed. */ -int +void dev_cycle(struct dev *d) { struct slot *s, **ps; @@ -772,7 +766,7 @@ dev_cycle(struct dev *d) d->pstate = DEV_INIT; if (d->refcnt == 0) dev_close(d); - return 0; + return; } if (d->prime > 0) { @@ -792,7 +786,7 @@ dev_cycle(struct dev *d) d->encbuf, d->round); } d->prime -= d->round; - return 1; + return; } d->delta -= d->round; @@ -925,7 +919,6 @@ dev_cycle(struct dev *d) enc_do(&d->enc, (unsigned char *)DEV_PBUF(d), d->encbuf, d->round); } - return 1; } /* diff --git a/sndiod/dev.h b/sndiod/dev.h index f3d482c..01af7f2 100644 --- a/sndiod/dev.h +++ b/sndiod/dev.h @@ -206,7 +206,7 @@ unsigned int dev_roundof(struct dev *, unsigned int); * interface to hardware device */ void dev_onmove(struct dev *, int); -int dev_cycle(struct dev *); +void dev_cycle(struct dev *); /* * midi & midi call-backs diff --git a/sndiod/siofile.c b/sndiod/siofile.c index 39801f4..2fd0628 100644 --- a/sndiod/siofile.c +++ b/sndiod/siofile.c @@ -348,8 +348,7 @@ dev_sio_run(void *arg) panic(); } #endif - if (!dev_cycle(d)) - return; + dev_cycle(d); if (d->mode & MODE_PLAY) { d->sio.cstate = DEV_SIO_WRITE; d->sio.todo = d->round * d->pchan * d->par.bps;