From owner-freebsd-ports-bugs@FreeBSD.ORG Sun May 5 09:20:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B55A0F1D for ; Sun, 5 May 2013 09:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 976FA79B for ; Sun, 5 May 2013 09:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r459K06B021415 for ; Sun, 5 May 2013 09:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r459K0ex021414; Sun, 5 May 2013 09:20:00 GMT (envelope-from gnats) Resent-Date: Sun, 5 May 2013 09:20:00 GMT Resent-Message-Id: <201305050920.r459K0ex021414@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yamagi Burmeister Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 767B5F0A for ; Sun, 5 May 2013 09:17:37 +0000 (UTC) (envelope-from yamagi@yamagi.org) Received: from mail.yamagi.org (mail.yamagi.org [IPv6:2a01:4f8:121:2102:1::7]) by mx1.freebsd.org (Postfix) with ESMTP id EE5E8792 for ; Sun, 5 May 2013 09:17:36 +0000 (UTC) Received: from happy.home.yamagi.org (p579A6312.dip0.t-ipconnect.de [87.154.99.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.yamagi.org (Postfix) with ESMTPSA id BFE751666312 for ; Sun, 5 May 2013 11:17:35 +0200 (CEST) Received: from happy.home.yamagi.org (localhost [127.0.0.1]) by happy.home.yamagi.org (8.14.5/8.14.5) with ESMTP id r459HYol079078 for ; Sun, 5 May 2013 11:17:34 +0200 (CEST) (envelope-from yamagi@happy.home.yamagi.org) Received: (from yamagi@localhost) by happy.home.yamagi.org (8.14.5/8.14.5/Submit) id r459HYSG079077; Sun, 5 May 2013 11:17:34 +0200 (CEST) (envelope-from yamagi) Message-Id: <201305050917.r459HYSG079077@happy.home.yamagi.org> Date: Sun, 5 May 2013 11:17:34 +0200 (CEST) From: Yamagi Burmeister To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/178343: [PATCH] Fix distortions with audio/openal-soft X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Yamagi Burmeister List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 May 2013 09:20:00 -0000 >Number: 178343 >Category: ports >Synopsis: [PATCH] Fix distortions with audio/openal-soft >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 05 09:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Yamagi Burmeister >Release: FreeBSD 9.1-RELEASE amd64 >Organization: >Environment: System: FreeBSD happy.home.yamagi.org 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243792M: Sun Dec 2 17:53:10 CET 2012 root@happy.home.yamagi.org:/usr/obj/usr/src/sys/HAPPY amd64 >Description: Since version 1.15 audio/openal-soft has an integer overflow bug which results in heavy distortions in conjunction with the OSS backend. It can be triggered on at least snd_hda and snd_envy24ht with several applications. The bug was confirmed by Chris Robinson (author of openal-soft) and he send me the attached patch. It fixes the problem and I guess that it should be included into the port until a new upstream version is released. The attached patch adds the file files/patch-Alc-ALu.c to audio/openal-soft. >How-To-Repeat: Install audio/openal-soft and start any OpenAL based application. For example games/ioquake3. The sound will distort if the application volume is high enough. >Fix: Index: files/patch-Alc-ALu.c =================================================================== --- files/patch-Alc-ALu.c (Revision 0) +++ files/patch-Alc-ALu.c (Arbeitskopie) @@ -0,0 +1,11 @@ +--- Alc/ALu.c_ 2013-05-01 09:31:36.000000000 +0200 ++++ Alc/ALu.c 2013-05-01 09:31:52.000000000 +0200 +@@ -920,7 +920,7 @@ + val = val+1.0f - fabsf(val-1.0f); + val = (val-2.0f + fabsf(val+2.0f)) * 0.25f; + /* Convert to a signed integer, between -2147483647 and +2147483647. */ +- return fastf2i((ALfloat)(val*2147483647.0)); ++ return fastf2i(val*16777215.0f)<<7; + } + static __inline ALuint aluF2UI(ALfloat val) + { return aluF2I(val)+2147483648u; } >Release-Note: >Audit-Trail: >Unformatted: