From owner-freebsd-multimedia@FreeBSD.ORG Thu Sep 1 08:16:24 2005 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 555A516A41F for ; Thu, 1 Sep 2005 08:16:24 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from phws.ph.noda.tus.ac.jp (phws.ph.noda.tus.ac.jp [133.31.102.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id E77B743D49 for ; Thu, 1 Sep 2005 08:16:23 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost (unknown [133.31.111.131]) by phws.ph.noda.tus.ac.jp (Postfix) with ESMTP id 4882F4D804B; Thu, 1 Sep 2005 17:15:52 +0900 (JST) Date: Thu, 01 Sep 2005 17:16:21 +0900 (JST) Message-Id: <20050901.171621.343192221.kazuhito@ph.noda.tus.ac.jp> To: skywizard@MyBSD.org.my From: Kazuhito HONDA In-Reply-To: <20050829072613.3eb2b46e.skywizard@MyBSD.org.my> References: <20050828234613.3e8b063a.torfinn.ingolfsen@broadpark.no> <20050829072613.3eb2b46e.skywizard@MyBSD.org.my> X-Mailer: Mew version 3.3 on XEmacs 21.5-b18 (chestnut) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@freebsd.org Subject: Re: Sound patches and volume problems? X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 08:16:24 -0000 Hello, From: Ariff Abdullah Subject: Re: Sound patches and volume problems? Date: Mon, 29 Aug 2005 07:26:13 +0800 > but I do suspect it's all about incorrect volume resolution or > perhaps volume miscalculation within uaudio.c. Ah, though it may not be related to that problem, uaudio.c has one bug about volume calculation at least. This sometimes gives a USB audio device an unexpected value. But this doesn't affect when the volume is small. Sincerely yours kazuhito HONDA kazuhito@ph.noda.tus.ac.jp --- uaudio.c.orig Thu Sep 1 16:51:34 2005 +++ uaudio.c Thu Sep 1 16:52:13 2005 @@ -4130,10 +4130,10 @@ uaudio_mixer_set(device_t dev, unsigned if (mc->ctl == type) { if (mc->nchan == 2) { /* set Right */ - uaudio_ctl_set(sc, SET_CUR, mc, 1, (int)(right*256)/100); + uaudio_ctl_set(sc, SET_CUR, mc, 1, (int)(right*255)/100); } /* set Left or Mono */ - uaudio_ctl_set(sc, SET_CUR, mc, 0, (int)(left*256)/100); + uaudio_ctl_set(sc, SET_CUR, mc, 0, (int)(left*255)/100); } } return;