summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2011-03-17 07:55:36 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2011-03-17 07:55:36 +0000
commitbef7200a1beea66f601ba67dbbfe631d591ecf39 (patch)
tree6d7454d6238f6fa3e3d289c1f239319a5613edf1
parente111c7a8eed6851480224b08fd4c24f90d393d19 (diff)
use a DEFAULT_RATE macro instead of hardcoding 44100, no object change
-rw-r--r--usr.bin/aucat/aucat.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c
index 38d60de4c38..18b3e07148b 100644
--- a/usr.bin/aucat/aucat.c
+++ b/usr.bin/aucat/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.107 2010/11/05 16:09:50 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.108 2011/03/17 07:55:35 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -57,6 +57,13 @@
#define PROG_AUCAT "aucat"
#define PROG_MIDICAT "midicat"
+/*
+ * sample rate if no ``-r'' is used
+ */
+#ifndef DEFAULT_RATE
+#define DEFAULT_RATE 44100
+#endif
+
#ifdef DEBUG
int debug_level = 0;
#endif
@@ -450,8 +457,8 @@ aucat_main(int argc, char **argv)
perror("malloc");
exit(1);
}
- aparams_init(&cs->ipar, 0, 1, 44100);
- aparams_init(&cs->opar, 0, 1, 44100);
+ aparams_init(&cs->ipar, 0, 1, DEFAULT_RATE);
+ aparams_init(&cs->opar, 0, 1, DEFAULT_RATE);
cs->mmc = 0;
cs->hdr = HDR_AUTO;
cs->xrun = XRUN_IGNORE;
@@ -467,8 +474,8 @@ aucat_main(int argc, char **argv)
perror("malloc");
exit(1);
}
- aparams_init(&cd->ipar, 0, 1, 44100);
- aparams_init(&cd->opar, 0, 1, 44100);
+ aparams_init(&cd->ipar, 0, 1, DEFAULT_RATE);
+ aparams_init(&cd->opar, 0, 1, DEFAULT_RATE);
SLIST_INIT(&cd->ins);
SLIST_INIT(&cd->outs);
SLIST_INIT(&cd->opts);