From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlWKE-0001KV-3s for qemu-devel@nongnu.org; Mon, 14 Apr 2008 17:34:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlWKC-0001J6-BO for qemu-devel@nongnu.org; Mon, 14 Apr 2008 17:34:53 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlWKB-0001Iw-Uh for qemu-devel@nongnu.org; Mon, 14 Apr 2008 17:34:52 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JlWKB-0006N7-5W for qemu-devel@nongnu.org; Mon, 14 Apr 2008 17:34:52 -0400 Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate02.web.de (Postfix) with ESMTP id 3A7C0D8D339F for ; Mon, 14 Apr 2008 23:34:49 +0200 (CEST) Received: from [88.64.24.193] (helo=[192.168.1.198]) by smtp05.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1JlWK9-0006aO-00 for qemu-devel@nongnu.org; Mon, 14 Apr 2008 23:34:49 +0200 Message-ID: <4803CDF4.3010503@web.de> Date: Mon, 14 Apr 2008 23:34:44 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4801DC59.1010403@web.de> <4803AEB6.5020307@web.de> In-Reply-To: <4803AEB6.5020307@web.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig10E7641A0185B3104C2F32B8" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [RFC][PATCH 4/4] Add support for Marvell 88w8618 / MusicPal Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig10E7641A0185B3104C2F32B8 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Jan Kiszka wrote: > +static void audio_fill_mixer_buffer(mv88w8618_audio_state *s, unsigned= int length) > +{ > + unsigned int pos; > + double val; > + > + if (s->mute) { > + memset(s->mixer_buffer, 0, length); > + return; > + } > + > + if (s->playback_mode & 1) > + for (pos =3D 0; pos < length; pos +=3D 2) { > + val =3D *(int16_t *)(s->target_buffer + s->play_pos + pos); > + val =3D le16_to_cpu(val) * pow(10.0, s->volume/20.0); > + *(int16_t *)(s->mixer_buffer + pos) =3D val; > + } This variant "sounds" better: for (pos =3D 0; pos < length; pos +=3D 2) { uint16_t tmp =3D *(uint16_t *) (s->target_buffer + s->play_pos + pos); val =3D (int16_t)le16_to_cpu(tmp); val =3D val * pow(10.0, s->volume/20.0); *(int16_t *)(s->mixer_buffer + pos) =3D val; } Find latest patches at http://home.arcor.de/jan.kiszka/patches/QEMU/ Jan --------------enig10E7641A0185B3104C2F32B8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIA834niDOoMHTA+kRAuA0AJwNFd6gpmR0XSE7D1YeIOLt/RYWzgCeLpF3 IeSfSPNxjFSsluvxH7ZtLpE= =a1V+ -----END PGP SIGNATURE----- --------------enig10E7641A0185B3104C2F32B8--