Subject: Re: eap(4) and ess(4) and mixer volume values
To: Matthias Scheler <tron@zhadum.de>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 08/16/2000 08:22:40
Matthias Scheler wrote:

> I found an easier way already:
>
> #define TO_OSSVOL(x) ((((x) * 200 / 255) + 1) >> 1)
> #define FROM_OSSVOL(x) (((((x) > 100 ? 100 : (x)) * 510 / 100) + 1) >> 1)
>
> It uses one extra bit of precision which is enough for appropriate rounding.

Looks great!  Will you commit this fix to both places?

    -- Lennart