From d8879c536f6ae4a9c00429d91add5a447f7278a4 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 3 Sep 2013 00:55:00 +0000 Subject: remove factor option --- sio.c | 7 ++----- sio.h | 2 +- spectrogram.c | 13 ++----------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/sio.c b/sio.c index 69a91f6..7f388e4 100644 --- a/sio.c +++ b/sio.c @@ -35,7 +35,7 @@ struct sio { }; struct sio * -init_sio(int factor) +init_sio() { struct sio *sio; size_t bufsz; @@ -67,10 +67,7 @@ init_sio(int factor) sio->par.sig != SIGNED) errx(1, "unsupported audio params"); - if (factor < 0) - sio->round = ROUND >> -factor; - else - sio->round = ROUND << factor; + sio->round = ROUND; sio->roundsz = sio->round * sio->par.rchan * sizeof(int16_t); bufsz = sio->par.rate / FPS; /* 24 pictures/second */ diff --git a/sio.h b/sio.h index 12e3d29..40d7793 100644 --- a/sio.h +++ b/sio.h @@ -20,7 +20,7 @@ struct sio; -struct sio *init_sio(int); +struct sio *init_sio(void); unsigned int get_round(struct sio *); int16_t *read_sio(struct sio *); void del_sio(struct sio *); diff --git a/spectrogram.c b/spectrogram.c index 3b00946..d8f4bb3 100644 --- a/spectrogram.c +++ b/spectrogram.c @@ -122,9 +122,7 @@ catch(int notused) void usage(void) { - fprintf(stderr, "Usage: %s [-12dh]\n", __progname); - fprintf(stderr, "\t-1\thalf size\n"); - fprintf(stderr, "\t-2\tdouble size\n"); + fprintf(stderr, "Usage: %s [-dh]\n", __progname); fprintf(stderr, "\t-d\tdaemonize\n"); fprintf(stderr, "\t-h\tthis help\n"); @@ -335,7 +333,6 @@ main(int argc, char **argv) Atom nhints; XSizeHints *hints; int scr; - int factor = 0; struct panel *left, *right; struct sio *sio; @@ -349,12 +346,6 @@ main(int argc, char **argv) while ((ch = getopt(argc, argv, "12hd")) != -1) switch (ch) { - case '1': - --factor; - break; - case '2': - ++factor; - break; case 'd': dflag = 1; break; @@ -372,7 +363,7 @@ main(int argc, char **argv) if (!dsp) errx(1, "Cannot connect to X11 server"); - sio = init_sio(factor); + sio = init_sio(); if (dflag) daemon(0, 0); -- cgit v1.2.3