Subject: Re: eap(4) and ess(4) and mixer volume values
To: None <tech-kern@netbsd.org>
From: Matthias Scheler <tron@zhadum.de>
List: tech-kern
Date: 08/16/2000 16:17:44
In article <200008161331.PAA05735@kurt.tools.de>,
	ws@tools.de (Wolfgang Solfrank) writes:
> Hmm, everyone on this planet I know would write this as
> 
> #define	TO_OSSVOL(x)	(((x) * 100 + 127) / 255)
> #define	FROM_OSSVOL(x)	((((x) > 100 ? 100 : (x)) * 255 + 50) / 100)

Thanks I'll use these formulas.

> which avoids the usage of floating point computation.

I already created integer versions but yours need one less operation.

	Kind regards

-- 
Matthias Scheler                            http://www.sighardstrasse.de/~tron/