From owner-freebsd-multimedia Sun Jul 13 18:57:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA20891 for multimedia-outgoing; Sun, 13 Jul 1997 18:57:30 -0700 (PDT) Received: from whqvax.picker.com (whqvax.picker.com [144.54.1.1]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id SAA20886 for ; Sun, 13 Jul 1997 18:57:26 -0700 (PDT) Received: from ct.picker.com by whqvax.picker.com with SMTP; Sun, 13 Jul 1997 21:56:23 -0400 (EDT) Received: from elmer.ct.picker.com ([144.54.57.34]) by ct.picker.com (4.1/SMI-4.1) id AA00211; Sun, 13 Jul 97 21:56:21 EDT Received: by elmer.ct.picker.com (SMI-8.6/SMI-SVR4) id VAA06422; Sun, 13 Jul 1997 21:54:23 -0400 Message-Id: <19970713215422.44611@ct.picker.com> Date: Sun, 13 Jul 1997 21:54:22 -0400 From: Randall Hopper To: Amancio Hasty Cc: multimedia@FreeBSD.ORG Subject: Re: guspnp9: Warp speed /dev/audio! & Recording always 44kHz References: <19970713211635.31507@ct.picker.com> <199707140136.SAA00270@rah.star-gate.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.76 In-Reply-To: <199707140136.SAA00270@rah.star-gate.com>; from Amancio Hasty on Sun, Jul 13, 1997 at 06:36:04PM -0700 Sender: owner-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Amancio Hasty: |Tnks I just added a ";" and it seems to work over here with my gus. Oops, I goofed. When you said ";" I knew it. I'm used to defining RANGE as an expression not a statement, so the last patch makes RANGE() a no-op for how the driver's using it. Here's the real patch. BTW, all 24 refs of RANGE() except one (in gus_wave.c) have their own ; after RANGE(). For consistency, might want to add the ; there and whack it from the macro. Randall --- ORIG/sound_config.h Fri Jul 11 10:56:33 1997 +++ sound_config.h Sun Jul 13 21:46:02 1997 @@ -32,7 +32,8 @@ * many variables should be reduced to a range. Here define a macro */ -#define RANGE(var, low, high) if (var<(low)) var=low; else var=high ; +#define RANGE(var, low, high) (var) = \ + ((var)<(low)?(low) : (var)>(high)?(high) : (var)); #undef CONFIGURE_SOUNDCARD #undef DYNAMIC_BUFFER