qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/11] audio: use a nominal volume of 1^32-1


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 03/11] audio: use a nominal volume of 1^32-1
Date: Thu, 01 Mar 2012 08:16:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

On 03/01/2012 07:27 AM, Marc-André Lureau wrote:
> So we can easily fit it into smaller int.

Fix your subject.  1^32-1 is 0; you meant 2^32 - 1.

> 
> We can just >>16 to fit it into a 16bits volume range for example.
> ---
>  audio/audio.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/audio/audio.c b/audio/audio.c
> index bd9237e..9ea5b39 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -110,8 +110,8 @@ const struct mixeng_volume nominal_volume = {
>      .r = 1.0,
>      .l = 1.0,
>  #else
> -    .r = 1ULL << 32,
> -    .l = 1ULL << 32,
> +    .r = (1ULL << 32) - 1,
> +    .l = (1ULL << 32) - 1,
>  #endif
>  };
>  

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]