DOSBox-X
|
00001 // Reverb model declaration 00002 // 00003 // Written by Jezar at Dreampoint, June 2000 00004 // Modifications by Jerome Fisher, 2009 00005 // http://www.dreampoint.co.uk 00006 // This code is public domain 00007 00008 #ifndef _revmodel_ 00009 #define _revmodel_ 00010 00011 #include "comb.h" 00012 #include "allpass.h" 00013 #include "tuning.h" 00014 #include "../FileStream.h" 00015 00016 class revmodel 00017 { 00018 public: 00019 revmodel(float scaletuning); 00020 ~revmodel(); 00021 void mute(); 00022 void process(const float *inputL, const float *inputR, float *outputL, float *outputR, long numsamples); 00023 void setroomsize(float value); 00024 float getroomsize(); 00025 void setdamp(float value); 00026 float getdamp(); 00027 void setwet(float value); 00028 float getwet(); 00029 void setdry(float value); 00030 float getdry(); 00031 void setwidth(float value); 00032 float getwidth(); 00033 void setmode(float value); 00034 float getmode(); 00035 void setfiltval(float value); 00036 00037 void saveState( std::ostream &stream ); 00038 void loadState( std::istream &stream ); 00039 private: 00040 void update(); 00041 private: 00042 float gain; 00043 float roomsize,roomsize1; 00044 float damp,damp1; 00045 float wet,wet1,wet2; 00046 float dry; 00047 float width; 00048 float mode; 00049 00050 // LPF stuff 00051 float filtval; 00052 float filtprev1; 00053 float filtprev2; 00054 00055 // Comb filters 00056 comb combL[numcombs]; 00057 comb combR[numcombs]; 00058 00059 // Allpass filters 00060 allpass allpassL[numallpasses]; 00061 allpass allpassR[numallpasses]; 00062 }; 00063 00064 #endif//_revmodel_