ports/178343: [PATCH] Fix distortions with audio/openal-soft

Yamagi Burmeister yamagi at yamagi.org
Sun May 5 09:20:00 UTC 2013


>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 at 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:


More information about the freebsd-ports-bugs mailing list