From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39867 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcnRB-0001RK-S3 for qemu-devel@nongnu.org; Tue, 11 Jan 2011 18:15:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcnR7-0001DP-0u for qemu-devel@nongnu.org; Tue, 11 Jan 2011 18:15:37 -0500 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:53375 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcnR6-0001Co-K7 for qemu-devel@nongnu.org; Tue, 11 Jan 2011 18:15:32 -0500 Date: Wed, 12 Jan 2011 02:15:18 +0300 (MSK) From: malc In-Reply-To: <201101112350.55791.michael@walle.cc> Message-ID: References: <4D2B6F8B.5080302@web.de> <201101112350.55791.michael@walle.cc> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [Qemu-devel] Re: [PATCH] audio: split sample conversion and volumemixing List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Walle Cc: Jan Kiszka , "Schildbach, Wolfgang" , qemu-devel@nongnu.org On Tue, 11 Jan 2011, Michael Walle wrote: > > Hi Wolfgang, > > > The fixed point path for scaling in mixeng_volume() seems to be under by > > a factor of two, IMHO. The right shift should be by 31, not 32. (Because > > the volume, which I assume is a signed 32 bit integer, can be 0.5 at > > most). > I must admit i just copied the shift from the original define. But the volume > and the samples are signed 64bit values. > > @malc: any comments on this? I don't understand the problem, the result of multiplication is converted from 32.32 fixed point to integer by shifting right by 32.. It escapes me how 31 fits here. > > > Does the code work with FLOAT_MIXENG undefined? > At least for my input voice, it works with integer arithmetic. > > -- mailto:av1474@comtv.ru