Guitarix
gx_faust_support.h
Go to the documentation of this file.
1 #include <cmath>
2 #include "gx_resampler.h"
3 
4 #define max(x, y) (((x) > (y)) ? (x) : (y))
5 #define min(x, y) (((x) < (y)) ? (x) : (y))
6 
7 template <int N> inline float faustpower(float x) {return powf(x, N);}
8 template <int N> inline double faustpower(double x) {return pow(x, N);}
9 template <int N> inline int faustpower(int x) {return faustpower<N/2>(x) * faustpower<N-N/2>(x);}
10 template <> inline int faustpower<0>(int x) {return 1;}
11 template <> inline int faustpower<1>(int x) {return x;}
12 
13 #define FAUSTFLOAT float
14 #ifndef N_
15 #define N_(String) (String)
16 #endif
17 #ifndef NC_
18 #define NC_(Context, String) (String)
19 #endif
20 
21 #define always_inline inline __attribute__((__always_inline__))
int faustpower< 1 >(int x)
int faustpower< 0 >(int x)
float faustpower(float x)