aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2013-09-03 00:55:00 +0000
committerDimitri Sokolyuk <demon@dim13.org>2013-09-03 00:55:00 +0000
commitd8879c536f6ae4a9c00429d91add5a447f7278a4 (patch)
treee0c70f4ae87b800e11e77ea68db3c3bfbb4e2586
parent90b5a6e93d667c3e5bec33cb7ffb6d3e3ac8a5dd (diff)
remove factor option
-rw-r--r--sio.c7
-rw-r--r--sio.h2
-rw-r--r--spectrogram.c13
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);