From bef7200a1beea66f601ba67dbbfe631d591ecf39 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Thu, 17 Mar 2011 07:55:36 +0000 Subject: use a DEFAULT_RATE macro instead of hardcoding 44100, no object change --- usr.bin/aucat/aucat.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'usr.bin/aucat') 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 * @@ -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); -- cgit v1.2.3