Received: from eggs.gnu.org ([208.118.235.92]:60566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7CMP-0002kA-Sb for qemu-devel@nongnu.org; Mon, 12 Mar 2012 17:00:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7CMK-000689-FL for qemu-devel@nongnu.org; Mon, 12 Mar 2012 17:00:53 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:56186 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7CMK-00067r-8c for qemu-devel@nongnu.org; Mon, 12 Mar 2012 17:00:48 -0400 Date: Tue, 13 Mar 2012 01:00:45 +0400 (MSK) From: malc In-Reply-To: Message-ID: References: <1331578211-18232-1-git-send-email-marcandre.lureau@redhat.com> <1331578211-18232-4-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH 03/11] audio: use a nominal volume of UINT_MAX List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Marc-Andr=E9_Lureau?= Cc: =?ISO-8859-15?Q?Marc-Andr=E9_Lureau?= , dnb@redhat.com, dlaor@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On Mon, 12 Mar 2012, Marc-Andr? Lureau wrote: > On Mon, Mar 12, 2012 at 9:29 PM, malc wrote: > >> So what I meant is rather G_MAXUINT32. > > > > Just leave it as is, it's perfectly fine. > > But it's not convenient to fit into a regular integer, as the number > of steps is 2^32 + 1. Why is it preferrable this way rather than a > MAXUINT? I must be missing something. Hardware range for example is > usually 0...2^nbits-1 > I really do not understand your point at all, mixeng_volume fields are int64_t's it's irrelevant what you initialize them with, they are still 64bit integers, and UINT_MAX as i already said is not even correct, it's 1/(2**32-1) less than one in fixed point. -- mailto:av1474@comtv.ru