adsp.biquad.filters: add patch to fix build with gcc-6

This commit is contained in:
MilhouseVH 2016-11-15 23:49:07 +00:00
parent 8fc8625139
commit 221873110f

View File

@ -0,0 +1,35 @@
From abae62ace5cd09025acaf8e03e5edad94131ff07 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sun, 24 Apr 2016 22:42:07 +0200
Subject: [PATCH] ADSPHelpers.cpp: Fix compilation with gcc6
Fixes https://github.com/kodi-adsp/adsp.biquad.filters/issues/13
Patch inspired by
https://github.com/assaultcube/AC/commit/752950989b4e286459ca9aee3d61a868d7b20fa4
---
src/template/ADSPHelpers.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/template/ADSPHelpers.cpp b/src/template/ADSPHelpers.cpp
index 5aa6a7d..f66e77f 100644
--- a/src/template/ADSPHelpers.cpp
+++ b/src/template/ADSPHelpers.cpp
@@ -24,7 +24,7 @@
using namespace std;
#if !defined(TARGET_WINDOWS)
- inline float abs(float Val)
+ inline float iabs(float Val)
{
if(Val >= 0.0f)
{
@@ -441,7 +441,7 @@ float CADSPHelpers::Convert_dB_TO_Value(float dB)
float CADSPHelpers::Convert_Value_TO_dB(float Scale)
{
- return 20.0f*log10f(abs(Scale));
+ return 20.0f*log10f(iabs(Scale));
}
// reserved for future implementation