From 283aab28b08700ce88039b8bb9027cb989bcee16 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Fri, 5 Oct 2012 17:58:11 +0200 Subject: [PATCH] fix msb usage in aparams_native() --- sndiod/dsp.c | 4 ++-- sndiod/file.c | 2 ++ sndiod/siofile.c | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sndiod/dsp.c b/sndiod/dsp.c index c82b564..c0b6d65 100644 --- a/sndiod/dsp.c +++ b/sndiod/dsp.c @@ -194,8 +194,8 @@ int aparams_native(struct aparams *par) { return par->bps == sizeof(adata_t) && par->bits == ADATA_BITS && - (par->bps > 1 || par->le == ADATA_LE) && - (par->bits < par->bps * 8 || !par->msb); + (par->bps == 1 || par->le == ADATA_LE) && + (par->bits == par->bps * 8 || !par->msb); } int diff --git a/sndiod/file.c b/sndiod/file.c index 1d175c4..62f0352 100644 --- a/sndiod/file.c +++ b/sndiod/file.c @@ -442,10 +442,12 @@ filelist_init(void) it.it_interval.tv_usec = TIMER_USEC; it.it_value.tv_sec = 0; it.it_value.tv_usec = TIMER_USEC; +#if 0 if (setitimer(ITIMER_REAL, &it, NULL) < 0) { perror("setitimer"); exit(1); } +#endif timo_init(); log_sync = 0; } diff --git a/sndiod/siofile.c b/sndiod/siofile.c index 2957077..e229dc7 100644 --- a/sndiod/siofile.c +++ b/sndiod/siofile.c @@ -374,7 +374,9 @@ siofile_run(void *arg) #ifdef DEBUG if (!(f->events & POLLIN)) { siofile_log(f); - log_puts(": recording, but POLLIN not set\n"); + log_puts(": recording, but POLLIN not set: "); + log_putx(f->events); + log_puts("\n"); panic(); } if (f->rused < d->round) {