#ifndef GLOBAL__H
#define GLOBAL__H

#include "../../../global.h"

#ifdef SHR3D_SFX_CORE_RAKARRACK

#define D_PI 6.283185f
#define M_PI_2 1.57079632679489661923
#define LOG_10 2.302585f
#define LOG_2  0.693147f
#define CNST_E  2.71828182845905f
#define MAX_FILTER_STAGES 5
#define SAMPLE_RATE 48000
#define fSAMPLE_RATE 48000.0f
#define cSAMPLE_RATE (1.0f / 48000.0f)
#define DENORMAL_GUARD 1e-18f	// Make it smaller until CPU problem re-appears
#define fPERIOD 128.0f
#define RND (rand()/(RAND_MAX+1.0))
#define RND1 (((f32) rand())/(((f32) RAND_MAX)+1.0f))
#define F2I(f,i) (i)=((f>0) ? ( (i32)(f) ) :( (i32)(f-1.0f) ))
#define dB2rap(dB) (f32)((expf((dB)*LOG_10/20.0f)))
#define rap2dB(rap) (f32)((20*log(rap)/LOG_10))
#define ATTACK 0.175f  //crossover time for reverse delay
#define MAX_DELAY 2	// Number of Seconds
#define ENV_TR 0.0001f
#define MAX_PHASER_STAGES 12
#define FF_MAX_VOWELS 6
#define FF_MAX_FORMANTS 12
#define FF_MAX_SEQUENCE 8

#endif // SHR3D_SFX_CORE_RAKARRACK

#endif // GLOBAL__H