Loading...
Searching...
No Matches
gx_faust_support.h
Go to the documentation of this file.
#include <cmath>
#include <algorithm>
#include "gx_resampler.h"
using std::signbit;
#define max(x, y) (((x) > (y)) ? (x) : (y))
#define min(x, y) (((x) < (y)) ? (x) : (y))
template <int N> inline float faustpower(float x) {return powf(x, N);}
template <int N> inline double faustpower(double x) {return pow(x, N);}
template <int N> inline int faustpower(int x) {return faustpower<N/2>(x) * faustpower<N-N/2>(x);}
template <> inline int faustpower<0>(int x) {return 1;}
template <> inline int faustpower<1>(int x) {return x;}
template<class T> inline T mydsp_faustpower2_f(T x) {return (x * x);}
template<class T> inline T mydsp_faustpower3_f(T x) {return ((x * x) * x);}
template<class T> inline T mydsp_faustpower4_f(T x) {return (((x * x) * x) * x);}
template<class T> inline T mydsp_faustpower5_f(T x) {return ((((x * x) * x) * x) * x);}
template<class T> inline T mydsp_faustpower6_f(T x) {return (((((x * x) * x) * x) * x) * x);}
#define FAUSTFLOAT float
#ifndef N_
#define N_(String) (String)
#endif
#ifndef NC_
#define NC_(Context, String) (String)
#endif
#ifndef GUITARIX_AS_PLUGIN
#define always_inline inline __attribute__((__always_inline__))
#else
#define always_inline inline
#endif
#define FAUSTFLOAT_BUF(buf, len) FAUSTFLOAT *buf=(FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT)*len)
#define FLOAT_BUF(b,s) float *b=(float*)alloca(sizeof(float)*s)
faustpower< 1 >
int faustpower< 1 >(int x)
Definition gx_faust_support.h:14
mydsp_faustpower2_f
T mydsp_faustpower2_f(T x)
Definition gx_faust_support.h:17
mydsp_faustpower3_f
T mydsp_faustpower3_f(T x)
Definition gx_faust_support.h:18
mydsp_faustpower4_f
T mydsp_faustpower4_f(T x)
Definition gx_faust_support.h:19
faustpower< 0 >
int faustpower< 0 >(int x)
Definition gx_faust_support.h:13
mydsp_faustpower6_f
T mydsp_faustpower6_f(T x)
Definition gx_faust_support.h:21
mydsp_faustpower5_f
T mydsp_faustpower5_f(T x)
Definition gx_faust_support.h:20
faustpower
float faustpower(float x)
Definition gx_faust_support.h:10
gx_resampler.h