LADSPA: CAPS: fix compilation with MinGW GCC >= 5.0
This commit is contained in:
@@ -7,7 +7,7 @@ IF(LMMS_BUILD_WIN64)
|
||||
ADD_DEFINITIONS(-DLMMS_BUILD_WIN64)
|
||||
ENDIF(LMMS_BUILD_WIN64)
|
||||
SET_TARGET_PROPERTIES(caps PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES(caps PROPERTIES COMPILE_FLAGS "-O2 -funroll-loops -Wno-write-strings")
|
||||
SET_TARGET_PROPERTIES(caps PROPERTIES COMPILE_FLAGS "-O2 -funroll-loops -Wno-write-strings -std=c++11")
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_CUSTOM_COMMAND(TARGET caps POST_BUILD COMMAND "${STRIP}" \"$<TARGET_FILE:caps>\")
|
||||
|
||||
@@ -33,15 +33,11 @@
|
||||
#define _USE_GNU 1
|
||||
|
||||
/* unlocking some standard math calls. */
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define _ISOC9X_SOURCE 1
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
@@ -184,7 +180,7 @@ class Plugin {
|
||||
inline sample_t getport_unclamped (int i)
|
||||
{
|
||||
sample_t v = *ports[i];
|
||||
return (isinf (v) || isnan(v)) ? 0 : v;
|
||||
return (std::isinf (v) || std::isnan(v)) ? 0 : v;
|
||||
}
|
||||
|
||||
/* get port value and clamp to port range */
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#ifndef _DSP_WINDOWS_H_
|
||||
#define _DSP_WINDOWS_H_
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace DSP {
|
||||
|
||||
/* prototypes for window value application ... */
|
||||
@@ -147,7 +149,7 @@ kaiser (sample_t * s, int n, double beta)
|
||||
double k = besseli ((beta * sqrt (1 - pow ((2 * i / (n - 1)), 2)))) / bb;
|
||||
|
||||
/* can you spell hack */
|
||||
if (!isfinite (k) || isnan(k))
|
||||
if (std::isinf(k) || std::isnan(k))
|
||||
k = 0;
|
||||
|
||||
F (s[si], k);
|
||||
|
||||
Reference in New Issue
Block a user