From owner-svn-ports-head@FreeBSD.ORG Thu May 23 06:05:33 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 95C63200; Thu, 23 May 2013 06:05:33 +0000 (UTC) (envelope-from mva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6E9D55E9; Thu, 23 May 2013 06:05:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4N65XLN058624; Thu, 23 May 2013 06:05:33 GMT (envelope-from mva@svn.freebsd.org) Received: (from mva@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4N65XwF058622; Thu, 23 May 2013 06:05:33 GMT (envelope-from mva@svn.freebsd.org) Message-Id: <201305230605.r4N65XwF058622@svn.freebsd.org> From: Marcus von Appen Date: Thu, 23 May 2013 06:05:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r318843 - in head/audio/openal-soft: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2013 06:05:33 -0000 Author: mva Date: Thu May 23 06:05:32 2013 New Revision: 318843 URL: http://svnweb.freebsd.org/changeset/ports/318843 Log: - Fix a sound distortion issue for the OSS backend PR: ports/178343 Submitted by: Yamagi Burmeister Added: head/audio/openal-soft/files/patch-Alc-ALu.c (contents, props changed) Modified: head/audio/openal-soft/Makefile Modified: head/audio/openal-soft/Makefile ============================================================================== --- head/audio/openal-soft/Makefile Thu May 23 05:48:41 2013 (r318842) +++ head/audio/openal-soft/Makefile Thu May 23 06:05:32 2013 (r318843) @@ -2,6 +2,7 @@ PORTNAME= openal-soft PORTVERSION= 1.15.1 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://kcat.strangesoft.net/openal-releases/ Added: head/audio/openal-soft/files/patch-Alc-ALu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/openal-soft/files/patch-Alc-ALu.c Thu May 23 06:05:32 2013 (r318843) @@ -0,0 +1,37 @@ +--- Alc/ALu.c.orig 2013-05-23 08:00:01.000000000 +0200 ++++ Alc/ALu.c 2013-05-23 08:01:20.000000000 +0200 +@@ -912,24 +912,27 @@ + } + + +-static __inline ALfloat aluF2F(ALfloat val) +-{ return val; } +-static __inline ALint aluF2I(ALfloat val) ++static __inline ALint aluF2I25(ALfloat val) + { + /* Clamp the value between -1 and +1. This handles that without branching. */ + 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)); ++ /* Convert to a signed integer, between -16777215 and +16777215. */ ++ return fastf2i(val*16777215.0f); + } ++ ++static __inline ALfloat aluF2F(ALfloat val) ++{ return val; } ++static __inline ALint aluF2I(ALfloat val) ++{ return aluF2I25(val)<<7; } + static __inline ALuint aluF2UI(ALfloat val) + { return aluF2I(val)+2147483648u; } + static __inline ALshort aluF2S(ALfloat val) +-{ return aluF2I(val)>>16; } ++{ return aluF2I(val)>>9; } + static __inline ALushort aluF2US(ALfloat val) + { return aluF2S(val)+32768; } + static __inline ALbyte aluF2B(ALfloat val) +-{ return aluF2I(val)>>24; } ++{ return aluF2I(val)>>17; } + static __inline ALubyte aluF2UB(ALfloat val) + { return aluF2B(val)+128; } +