From owner-freebsd-hackers Sat Feb 19 14:28:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ab-bg.net (ab-bg.net [212.56.11.129]) by hub.freebsd.org (Postfix) with SMTP id 4D77137BD1F for ; Sat, 19 Feb 2000 14:28:42 -0800 (PST) (envelope-from v0rbiz@ab-bg.net) Received: (qmail 12176 invoked by uid 1000); 19 Feb 2000 22:27:14 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 19 Feb 2000 22:27:14 -0000 Date: Sun, 20 Feb 2000 00:27:14 +0200 (EET) From: Victor Ivanov To: hackers@freebsd.org Subject: Re: Bug in ioctl() [Was: Help needed with ioctl() calls] In-Reply-To: <20000219184059.A327@marder-1> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG mixer uses 100 levels for each "device" (master volume, pcm, synth, etc), but your hardware maybe uses 64 (or 128). mixer needs to be universal.. so does the ioctl() and the interface to the hardware mixer. Look at the sources in the kernel :)... maybe you'll find something like this (which looses accuracy, but there's no other way): percent = actual * 100 / 64; in this case both 91 and 92 are 58 when measuring 1..64 and this is not a bug :) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message