DPF Plugin examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

512 lines
21KB

  1. /*
  2. * Author: Harry van Haaren 2013
  3. * harryhaaren@gmail.com
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  18. * MA 02110-1301, USA.
  19. */
  20. /*
  21. The DSP code in this file was generated using FAUST.
  22. The FAUST code used is under the following licenses:
  23. effect.lib/name Faust Audio Effect Library
  24. effect.lib/author Julius O. Smith (jos at ccrma.stanford.edu)
  25. effect.lib/copyright Julius O. Smith III
  26. effect.lib/version 1.33
  27. effect.lib/license STK-4.3
  28. effect.lib/reference https://ccrma.stanford.edu/realsimple/faust_strings/
  29. filter.lib/author Julius O. Smith (jos at ccrma.stanford.edu)
  30. filter.lib/name Faust Filter Library
  31. filter.lib/copyright Julius O. Smith III
  32. filter.lib/version 1.29
  33. filter.lib/license STK-4.3
  34. filter.lib/reference https://ccrma.stanford.edu/~jos/filters/
  35. music.lib/name Music Library
  36. music.lib/author GRAME
  37. music.lib/copyright GRAME
  38. music.lib/version 1.0
  39. music.lib/license LGPL
  40. math.lib/name Math Library
  41. math.lib/author GRAME
  42. math.lib/copyright GRAME
  43. math.lib/version 1.0
  44. math.lib/license LGPL
  45. */
  46. #ifndef OPENAV_DSP_REVERB_H
  47. #define OPENAV_DSP_REVERB_H
  48. #include <math.h>
  49. #include <cmath>
  50. #include <cstdlib>
  51. template <class T> const T& max (const T& a, const T& b) {
  52. return (a<b)?b:a;
  53. }
  54. template <class T> const T& min (const T& a, const T& b) {
  55. return !(b<a)?a:b;
  56. }
  57. template <int N> inline float faustpower(float x) { return powf(x,N); }
  58. template <int N> inline double faustpower(double x) { return pow(x,N); }
  59. template <int N> inline int faustpower(int x) { return faustpower<N/2>(x) * faustpower<N-N/2>(x); }
  60. template <> inline int faustpower<0>(int x) { return 1; }
  61. template <> inline int faustpower<1>(int x) { return x; }
  62. class Reverb // : Effect
  63. {
  64. public:
  65. Reverb(int sr)
  66. {
  67. init( sr );
  68. }
  69. int getNumInputs() { return 2; }
  70. int getNumOutputs(){ return 2; }
  71. void damping(float d)
  72. {
  73. if( d > 1.0 ) d = 1.0f;
  74. if( d < 0.0 ) d = 0.0f;
  75. fslider1 = (1-d) * 18500 + 1500.f;
  76. }
  77. void rt60(float rt)
  78. {
  79. if( rt > 1.0 ) rt = 1.0f;
  80. if( rt < 0.0 ) rt = 0.0f;
  81. fslider0 = 1 + rt * 5;
  82. }
  83. void dryWet(float dw)
  84. {
  85. if( dw > 1.0 ) dw = 1.0f;
  86. if( dw < 0.0 ) dw = 0.0f;
  87. _dryWet = dw;
  88. }
  89. void process (int count, const float** input, float** output)
  90. {
  91. float fSlow0 = fslider0;
  92. float fSlow1 = expf((fConst2 / fSlow0));
  93. float fSlow2 = faustpower<2>(fSlow1);
  94. float fSlow3 = (1.0f - fSlow2);
  95. float fSlow4 = cosf((fConst3 * fslider1));
  96. float fSlow5 = (1.0f - (fSlow4 * fSlow2));
  97. float fSlow6 = sqrtf(max(0.f, ((faustpower<2>(fSlow5) / faustpower<2>(fSlow3)) - 1.0f)));
  98. float fSlow7 = (fSlow5 / fSlow3);
  99. float fSlow8 = (fSlow7 - fSlow6);
  100. float fSlow9 = (fSlow0 - 0.5f);
  101. float fSlow10 = ((expf((fConst2 / fSlow9)) / fSlow1) - 1);
  102. float fSlow11 = (fSlow1 * ((1.0f + fSlow6) - fSlow7));
  103. float fSlow12 = expf((fConst12 / fSlow0));
  104. float fSlow13 = faustpower<2>(fSlow12);
  105. float fSlow14 = (1.0f - fSlow13);
  106. float fSlow15 = (1.0f - (fSlow4 * fSlow13));
  107. float fSlow16 = sqrtf(max(0.f, ((faustpower<2>(fSlow15) / faustpower<2>(fSlow14)) - 1.0f)));
  108. float fSlow17 = (fSlow15 / fSlow14);
  109. float fSlow18 = (fSlow17 - fSlow16);
  110. float fSlow19 = ((expf((fConst12 / fSlow9)) / fSlow12) - 1);
  111. float fSlow20 = (fSlow12 * ((1.0f + fSlow16) - fSlow17));
  112. float fSlow21 = expf((fConst17 / fSlow0));
  113. float fSlow22 = faustpower<2>(fSlow21);
  114. float fSlow23 = (1.0f - fSlow22);
  115. float fSlow24 = (1.0f - (fSlow4 * fSlow22));
  116. float fSlow25 = sqrtf(max(0.f, ((faustpower<2>(fSlow24) / faustpower<2>(fSlow23)) - 1.0f)));
  117. float fSlow26 = (fSlow24 / fSlow23);
  118. float fSlow27 = (fSlow26 - fSlow25);
  119. float fSlow28 = ((expf((fConst17 / fSlow9)) / fSlow21) - 1);
  120. float fSlow29 = (fSlow21 * ((1.0f + fSlow25) - fSlow26));
  121. float fSlow30 = expf((fConst22 / fSlow0));
  122. float fSlow31 = faustpower<2>(fSlow30);
  123. float fSlow32 = (1.0f - fSlow31);
  124. float fSlow33 = (1.0f - (fSlow4 * fSlow31));
  125. float fSlow34 = sqrtf(max(0.f, ((faustpower<2>(fSlow33) / faustpower<2>(fSlow32)) - 1.0f)));
  126. float fSlow35 = (fSlow33 / fSlow32);
  127. float fSlow36 = (fSlow35 - fSlow34);
  128. float fSlow37 = ((expf((fConst22 / fSlow9)) / fSlow30) - 1);
  129. float fSlow38 = (fSlow30 * ((1.0f + fSlow34) - fSlow35));
  130. float fSlow39 = expf((fConst27 / fSlow0));
  131. float fSlow40 = faustpower<2>(fSlow39);
  132. float fSlow41 = (1.0f - fSlow40);
  133. float fSlow42 = (1.0f - (fSlow4 * fSlow40));
  134. float fSlow43 = sqrtf(max(0.f, ((faustpower<2>(fSlow42) / faustpower<2>(fSlow41)) - 1.0f)));
  135. float fSlow44 = (fSlow42 / fSlow41);
  136. float fSlow45 = (fSlow44 - fSlow43);
  137. float fSlow46 = ((expf((fConst27 / fSlow9)) / fSlow39) - 1);
  138. float fSlow47 = (fSlow39 * ((1.0f + fSlow43) - fSlow44));
  139. float fSlow48 = expf((fConst32 / fSlow0));
  140. float fSlow49 = faustpower<2>(fSlow48);
  141. float fSlow50 = (1.0f - fSlow49);
  142. float fSlow51 = (1.0f - (fSlow4 * fSlow49));
  143. float fSlow52 = sqrtf(max(0.f, ((faustpower<2>(fSlow51) / faustpower<2>(fSlow50)) - 1.0f)));
  144. float fSlow53 = (fSlow51 / fSlow50);
  145. float fSlow54 = (fSlow53 - fSlow52);
  146. float fSlow55 = ((expf((fConst32 / fSlow9)) / fSlow48) - 1);
  147. float fSlow56 = (fSlow48 * ((1.0f + fSlow52) - fSlow53));
  148. float fSlow57 = expf((fConst37 / fSlow0));
  149. float fSlow58 = faustpower<2>(fSlow57);
  150. float fSlow59 = (1.0f - fSlow58);
  151. float fSlow60 = (1.0f - (fSlow4 * fSlow58));
  152. float fSlow61 = sqrtf(max(0.f, ((faustpower<2>(fSlow60) / faustpower<2>(fSlow59)) - 1.0f)));
  153. float fSlow62 = (fSlow60 / fSlow59);
  154. float fSlow63 = (fSlow62 - fSlow61);
  155. float fSlow64 = ((expf((fConst37 / fSlow9)) / fSlow57) - 1);
  156. float fSlow65 = (fSlow57 * ((1.0f + fSlow61) - fSlow62));
  157. float fSlow66 = expf((fConst42 / fSlow0));
  158. float fSlow67 = faustpower<2>(fSlow66);
  159. float fSlow68 = (1.0f - fSlow67);
  160. float fSlow69 = (1.0f - (fSlow67 * fSlow4));
  161. float fSlow70 = sqrtf(max(0.f, ((faustpower<2>(fSlow69) / faustpower<2>(fSlow68)) - 1.0f)));
  162. float fSlow71 = (fSlow69 / fSlow68);
  163. float fSlow72 = (fSlow71 - fSlow70);
  164. float fSlow73 = ((expf((fConst42 / fSlow9)) / fSlow66) - 1);
  165. float fSlow74 = (fSlow66 * ((1.0f + fSlow70) - fSlow71));
  166. const float* input0 = input[0];
  167. const float* input1 = input[1];
  168. float* output0 = output[0];
  169. float* output1 = output[1];
  170. for (int i=0; i<count; i++) {
  171. fRec11[0] = ((fConst7 * (fRec4[1] + fRec4[2])) + (fConst6 * fRec11[1]));
  172. fRec10[0] = ((fSlow11 * (fRec4[1] + (fSlow10 * fRec11[0]))) + (fSlow8 * fRec10[1]));
  173. fVec0[IOTA&8191] = (1e-20f + (0.35355339059327373f * fRec10[0]));
  174. float fTemp0 = (0.3f * (float)input0[i]);
  175. float fTemp1 = ((fTemp0 + fVec0[(IOTA-iConst9)&8191]) - (0.6f * fRec8[1]));
  176. fVec1[IOTA&2047] = fTemp1;
  177. fRec8[0] = fVec1[(IOTA-iConst10)&2047];
  178. float fRec9 = (0.6f * fVec1[IOTA&2047]);
  179. fRec15[0] = ((fConst7 * (fRec0[1] + fRec0[2])) + (fConst6 * fRec15[1]));
  180. fRec14[0] = ((fSlow20 * (fRec0[1] + (fSlow19 * fRec15[0]))) + (fSlow18 * fRec14[1]));
  181. fVec2[IOTA&8191] = (1e-20f + (0.35355339059327373f * fRec14[0]));
  182. float fTemp2 = ((fTemp0 + fVec2[(IOTA-iConst14)&8191]) - (0.6f * fRec12[1]));
  183. fVec3[IOTA&1023] = fTemp2;
  184. fRec12[0] = fVec3[(IOTA-iConst15)&1023];
  185. float fRec13 = (0.6f * fVec3[IOTA&1023]);
  186. float fTemp3 = (fRec13 + fRec9);
  187. fRec19[0] = ((fConst7 * (fRec2[1] + fRec2[2])) + (fConst6 * fRec19[1]));
  188. fRec18[0] = ((fSlow29 * (fRec2[1] + (fSlow28 * fRec19[0]))) + (fSlow27 * fRec18[1]));
  189. fVec4[IOTA&8191] = (1e-20f + (0.35355339059327373f * fRec18[0]));
  190. float fTemp4 = (fVec4[(IOTA-iConst19)&8191] - (fTemp0 + (0.6f * fRec16[1])));
  191. fVec5[IOTA&2047] = fTemp4;
  192. fRec16[0] = fVec5[(IOTA-iConst20)&2047];
  193. float fRec17 = (0.6f * fVec5[IOTA&2047]);
  194. fRec23[0] = ((fConst7 * (fRec6[1] + fRec6[2])) + (fConst6 * fRec23[1]));
  195. fRec22[0] = ((fSlow38 * (fRec6[1] + (fSlow37 * fRec23[0]))) + (fSlow36 * fRec22[1]));
  196. fVec6[IOTA&8191] = (1e-20f + (0.35355339059327373f * fRec22[0]));
  197. float fTemp5 = (fVec6[(IOTA-iConst24)&8191] - (fTemp0 + (0.6f * fRec20[1])));
  198. fVec7[IOTA&1023] = fTemp5;
  199. fRec20[0] = fVec7[(IOTA-iConst25)&1023];
  200. float fRec21 = (0.6f * fVec7[IOTA&1023]);
  201. float fTemp6 = (fRec21 + (fRec17 + fTemp3));
  202. fRec27[0] = ((fConst7 * (fRec1[1] + fRec1[2])) + (fConst6 * fRec27[1]));
  203. fRec26[0] = ((fSlow47 * (fRec1[1] + (fSlow46 * fRec27[0]))) + (fSlow45 * fRec26[1]));
  204. fVec8[IOTA&16383] = (1e-20f + (0.35355339059327373f * fRec26[0]));
  205. float fTemp7 = (0.3f * (float)input1[i]);
  206. float fTemp8 = ((fTemp7 + fVec8[(IOTA-iConst29)&16383]) + (0.6f * fRec24[1]));
  207. fVec9[IOTA&2047] = fTemp8;
  208. fRec24[0] = fVec9[(IOTA-iConst30)&2047];
  209. float fRec25 = (0 - (0.6f * fVec9[IOTA&2047]));
  210. fRec31[0] = ((fConst7 * (fRec5[1] + fRec5[2])) + (fConst6 * fRec31[1]));
  211. fRec30[0] = ((fSlow56 * (fRec5[1] + (fSlow55 * fRec31[0]))) + (fSlow54 * fRec30[1]));
  212. fVec10[IOTA&8191] = (1e-20f + (0.35355339059327373f * fRec30[0]));
  213. float fTemp9 = ((fTemp7 + fVec10[(IOTA-iConst34)&8191]) + (0.6f * fRec28[1]));
  214. fVec11[IOTA&2047] = fTemp9;
  215. fRec28[0] = fVec11[(IOTA-iConst35)&2047];
  216. float fRec29 = (0 - (0.6f * fVec11[IOTA&2047]));
  217. fRec35[0] = ((fConst7 * (fRec3[1] + fRec3[2])) + (fConst6 * fRec35[1]));
  218. fRec34[0] = ((fSlow65 * (fRec3[1] + (fSlow64 * fRec35[0]))) + (fSlow63 * fRec34[1]));
  219. fVec12[IOTA&16383] = (1e-20f + (0.35355339059327373f * fRec34[0]));
  220. float fTemp10 = ((fVec12[(IOTA-iConst39)&16383] + (0.6f * fRec32[1])) - fTemp7);
  221. fVec13[IOTA&2047] = fTemp10;
  222. fRec32[0] = fVec13[(IOTA-iConst40)&2047];
  223. float fRec33 = (0 - (0.6f * fVec13[IOTA&2047]));
  224. fRec39[0] = ((fConst7 * (fRec7[1] + fRec7[2])) + (fConst6 * fRec39[1]));
  225. fRec38[0] = ((fSlow74 * (fRec7[1] + (fSlow73 * fRec39[0]))) + (fSlow72 * fRec38[1]));
  226. fVec14[IOTA&16383] = (1e-20f + (0.35355339059327373f * fRec38[0]));
  227. float fTemp11 = ((fVec14[(IOTA-iConst44)&16383] + (0.6f * fRec36[1])) - fTemp7);
  228. fVec15[IOTA&1023] = fTemp11;
  229. fRec36[0] = fVec15[(IOTA-iConst45)&1023];
  230. float fRec37 = (0 - (0.6f * fVec15[IOTA&1023]));
  231. fRec0[0] = (fRec12[1] + (fRec8[1] + (fRec16[1] + (fRec20[1] + (fRec24[1] + (fRec28[1] + (fRec32[1] + (fRec36[1] + (fRec37 + (fRec33 + (fRec29 + (fRec25 + fTemp6))))))))))));
  232. fRec1[0] = (0 - ((fRec24[1] + (fRec28[1] + (fRec32[1] + (fRec36[1] + (fRec37 + (fRec33 + (fRec25 + fRec29))))))) - (fRec12[1] + (fRec8[1] + (fRec16[1] + (fRec20[1] + fTemp6))))));
  233. float fTemp12 = (fRec17 + fRec21);
  234. fRec2[0] = (0 - ((fRec16[1] + (fRec20[1] + (fRec32[1] + (fRec36[1] + (fRec37 + (fRec33 + fTemp12)))))) - (fRec12[1] + (fRec8[1] + (fRec24[1] + (fRec28[1] + (fRec29 + (fRec25 + fTemp3))))))));
  235. fRec3[0] = (0 - ((fRec16[1] + (fRec20[1] + (fRec24[1] + (fRec28[1] + (fRec29 + (fRec25 + fTemp12)))))) - (fRec12[1] + (fRec8[1] + (fRec32[1] + (fRec36[1] + (fRec37 + (fRec33 + fTemp3))))))));
  236. float fTemp13 = (fRec13 + fRec17);
  237. float fTemp14 = (fRec9 + fRec21);
  238. fRec4[0] = (0 - ((fRec8[1] + (fRec20[1] + (fRec28[1] + (fRec36[1] + (fRec37 + (fRec29 + fTemp14)))))) - (fRec12[1] + (fRec16[1] + (fRec24[1] + (fRec32[1] + (fRec33 + (fRec25 + fTemp13))))))));
  239. fRec5[0] = (0 - ((fRec8[1] + (fRec20[1] + (fRec24[1] + (fRec32[1] + (fRec33 + (fRec25 + fTemp14)))))) - (fRec12[1] + (fRec16[1] + (fRec28[1] + (fRec36[1] + (fRec37 + (fRec29 + fTemp13))))))));
  240. float fTemp15 = (fRec13 + fRec21);
  241. float fTemp16 = (fRec9 + fRec17);
  242. fRec6[0] = (0 - ((fRec8[1] + (fRec16[1] + (fRec28[1] + (fRec32[1] + (fRec33 + (fRec29 + fTemp16)))))) - (fRec12[1] + (fRec20[1] + (fRec24[1] + (fRec36[1] + (fRec37 + (fRec25 + fTemp15))))))));
  243. fRec7[0] = (0 - ((fRec8[1] + (fRec16[1] + (fRec24[1] + (fRec36[1] + (fRec37 + (fRec25 + fTemp16)))))) - (fRec12[1] + (fRec20[1] + (fRec28[1] + (fRec32[1] + (fRec33 + (fRec29 + fTemp15))))))));
  244. float reverb0 = (float)(0.37f * (fRec1[0] + fRec2[0]));
  245. float reverb1 = (float)(0.37f * (fRec1[0] - fRec2[0]));
  246. output0[i] = (input0[i] * (1-_dryWet)) + (reverb0 * _dryWet );
  247. output1[i] = (input1[i] * (1-_dryWet)) + (reverb1 * _dryWet );
  248. // post processing
  249. fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
  250. fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
  251. fRec5[2] = fRec5[1]; fRec5[1] = fRec5[0];
  252. fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
  253. fRec3[2] = fRec3[1]; fRec3[1] = fRec3[0];
  254. fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
  255. fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
  256. fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
  257. fRec36[1] = fRec36[0];
  258. fRec38[1] = fRec38[0];
  259. fRec39[1] = fRec39[0];
  260. fRec32[1] = fRec32[0];
  261. fRec34[1] = fRec34[0];
  262. fRec35[1] = fRec35[0];
  263. fRec28[1] = fRec28[0];
  264. fRec30[1] = fRec30[0];
  265. fRec31[1] = fRec31[0];
  266. fRec24[1] = fRec24[0];
  267. fRec26[1] = fRec26[0];
  268. fRec27[1] = fRec27[0];
  269. fRec20[1] = fRec20[0];
  270. fRec22[1] = fRec22[0];
  271. fRec23[1] = fRec23[0];
  272. fRec16[1] = fRec16[0];
  273. fRec18[1] = fRec18[0];
  274. fRec19[1] = fRec19[0];
  275. fRec12[1] = fRec12[0];
  276. fRec14[1] = fRec14[0];
  277. fRec15[1] = fRec15[0];
  278. fRec8[1] = fRec8[0];
  279. IOTA = IOTA+1;
  280. fRec10[1] = fRec10[0];
  281. fRec11[1] = fRec11[0];
  282. }
  283. }
  284. private:
  285. float _dryWet;
  286. float fslider0;
  287. int iConst0;
  288. float fConst1;
  289. float fConst2;
  290. float fslider1;
  291. float fConst3;
  292. float fConst4;
  293. float fConst5;
  294. float fConst6;
  295. float fConst7;
  296. float fRec11[2];
  297. float fRec10[2];
  298. int IOTA;
  299. float fVec0[8192];
  300. float fConst8;
  301. int iConst9;
  302. float fVec1[2048];
  303. int iConst10;
  304. float fRec8[2];
  305. float fConst11;
  306. float fConst12;
  307. float fRec15[2];
  308. float fRec14[2];
  309. float fVec2[8192];
  310. float fConst13;
  311. int iConst14;
  312. float fVec3[1024];
  313. int iConst15;
  314. float fRec12[2];
  315. float fConst16;
  316. float fConst17;
  317. float fRec19[2];
  318. float fRec18[2];
  319. float fVec4[8192];
  320. float fConst18;
  321. int iConst19;
  322. float fVec5[2048];
  323. int iConst20;
  324. float fRec16[2];
  325. float fConst21;
  326. float fConst22;
  327. float fRec23[2];
  328. float fRec22[2];
  329. float fVec6[8192];
  330. float fConst23;
  331. int iConst24;
  332. float fVec7[1024];
  333. int iConst25;
  334. float fRec20[2];
  335. float fConst26;
  336. float fConst27;
  337. float fRec27[2];
  338. float fRec26[2];
  339. float fVec8[16384];
  340. float fConst28;
  341. int iConst29;
  342. float fVec9[2048];
  343. int iConst30;
  344. float fRec24[2];
  345. float fConst31;
  346. float fConst32;
  347. float fRec31[2];
  348. float fRec30[2];
  349. float fVec10[8192];
  350. float fConst33;
  351. int iConst34;
  352. float fVec11[2048];
  353. int iConst35;
  354. float fRec28[2];
  355. float fConst36;
  356. float fConst37;
  357. float fRec35[2];
  358. float fRec34[2];
  359. float fVec12[16384];
  360. float fConst38;
  361. int iConst39;
  362. float fVec13[2048];
  363. int iConst40;
  364. float fRec32[2];
  365. float fConst41;
  366. float fConst42;
  367. float fRec39[2];
  368. float fRec38[2];
  369. float fVec14[16384];
  370. float fConst43;
  371. int iConst44;
  372. float fVec15[1024];
  373. int iConst45;
  374. float fRec36[2];
  375. float fRec0[3];
  376. float fRec1[3];
  377. float fRec2[3];
  378. float fRec3[3];
  379. float fRec4[3];
  380. float fRec5[3];
  381. float fRec6[3];
  382. float fRec7[3];
  383. /// Long nasty function setting initial values
  384. void init(int samplingFreq)
  385. {
  386. fslider0 = 3.0f;
  387. iConst0 = min(192000, max(1, samplingFreq));
  388. fConst1 = floorf((0.5f + (0.174713f * iConst0)));
  389. fConst2 = ((0 - (6.907755278982138f * fConst1)) / iConst0);
  390. fslider1 = 6e+03f;
  391. fConst3 = (6.283185307179586f / float(iConst0));
  392. fConst4 = (1.0f / tanf((1256.6370614359173f / iConst0)));
  393. fConst5 = (1 + fConst4);
  394. fConst6 = (0 - ((1 - fConst4) / fConst5));
  395. fConst7 = (1.0f / fConst5);
  396. for (int i=0; i<2; i++) fRec11[i] = 0;
  397. for (int i=0; i<2; i++) fRec10[i] = 0;
  398. IOTA = 0;
  399. for (int i=0; i<8192; i++) fVec0[i] = 0;
  400. fConst8 = floorf((0.5f + (0.022904f * iConst0)));
  401. iConst9 = int((int((fConst1 - fConst8)) & 8191));
  402. for (int i=0; i<2048; i++) fVec1[i] = 0;
  403. iConst10 = int((int((fConst8 - 1)) & 2047));
  404. for (int i=0; i<2; i++) fRec8[i] = 0;
  405. fConst11 = floorf((0.5f + (0.153129f * iConst0)));
  406. fConst12 = ((0 - (6.907755278982138f * fConst11)) / iConst0);
  407. for (int i=0; i<2; i++) fRec15[i] = 0;
  408. for (int i=0; i<2; i++) fRec14[i] = 0;
  409. for (int i=0; i<8192; i++) fVec2[i] = 0;
  410. fConst13 = floorf((0.5f + (0.020346f * iConst0)));
  411. iConst14 = int((int((fConst11 - fConst13)) & 8191));
  412. for (int i=0; i<1024; i++) fVec3[i] = 0;
  413. iConst15 = int((int((fConst13 - 1)) & 1023));
  414. for (int i=0; i<2; i++) fRec12[i] = 0;
  415. fConst16 = floorf((0.5f + (0.127837f * iConst0)));
  416. fConst17 = ((0 - (6.907755278982138f * fConst16)) / iConst0);
  417. for (int i=0; i<2; i++) fRec19[i] = 0;
  418. for (int i=0; i<2; i++) fRec18[i] = 0;
  419. for (int i=0; i<8192; i++) fVec4[i] = 0;
  420. fConst18 = floorf((0.5f + (0.031604f * iConst0)));
  421. iConst19 = int((int((fConst16 - fConst18)) & 8191));
  422. for (int i=0; i<2048; i++) fVec5[i] = 0;
  423. iConst20 = int((int((fConst18 - 1)) & 2047));
  424. for (int i=0; i<2; i++) fRec16[i] = 0;
  425. fConst21 = floorf((0.5f + (0.125f * iConst0)));
  426. fConst22 = ((0 - (6.907755278982138f * fConst21)) / iConst0);
  427. for (int i=0; i<2; i++) fRec23[i] = 0;
  428. for (int i=0; i<2; i++) fRec22[i] = 0;
  429. for (int i=0; i<8192; i++) fVec6[i] = 0;
  430. fConst23 = floorf((0.5f + (0.013458f * iConst0)));
  431. iConst24 = int((int((fConst21 - fConst23)) & 8191));
  432. for (int i=0; i<1024; i++) fVec7[i] = 0;
  433. iConst25 = int((int((fConst23 - 1)) & 1023));
  434. for (int i=0; i<2; i++) fRec20[i] = 0;
  435. fConst26 = floorf((0.5f + (0.210389f * iConst0)));
  436. fConst27 = ((0 - (6.907755278982138f * fConst26)) / iConst0);
  437. for (int i=0; i<2; i++) fRec27[i] = 0;
  438. for (int i=0; i<2; i++) fRec26[i] = 0;
  439. for (int i=0; i<16384; i++) fVec8[i] = 0;
  440. fConst28 = floorf((0.5f + (0.024421f * iConst0)));
  441. iConst29 = int((int((fConst26 - fConst28)) & 16383));
  442. for (int i=0; i<2048; i++) fVec9[i] = 0;
  443. iConst30 = int((int((fConst28 - 1)) & 2047));
  444. for (int i=0; i<2; i++) fRec24[i] = 0;
  445. fConst31 = floorf((0.5f + (0.192303f * iConst0)));
  446. fConst32 = ((0 - (6.907755278982138f * fConst31)) / iConst0);
  447. for (int i=0; i<2; i++) fRec31[i] = 0;
  448. for (int i=0; i<2; i++) fRec30[i] = 0;
  449. for (int i=0; i<8192; i++) fVec10[i] = 0;
  450. fConst33 = floorf((0.5f + (0.029291f * iConst0)));
  451. iConst34 = int((int((fConst31 - fConst33)) & 8191));
  452. for (int i=0; i<2048; i++) fVec11[i] = 0;
  453. iConst35 = int((int((fConst33 - 1)) & 2047));
  454. for (int i=0; i<2; i++) fRec28[i] = 0;
  455. fConst36 = floorf((0.5f + (0.256891f * iConst0)));
  456. fConst37 = ((0 - (6.907755278982138f * fConst36)) / iConst0);
  457. for (int i=0; i<2; i++) fRec35[i] = 0;
  458. for (int i=0; i<2; i++) fRec34[i] = 0;
  459. for (int i=0; i<16384; i++) fVec12[i] = 0;
  460. fConst38 = floorf((0.5f + (0.027333f * iConst0)));
  461. iConst39 = int((int((fConst36 - fConst38)) & 16383));
  462. for (int i=0; i<2048; i++) fVec13[i] = 0;
  463. iConst40 = int((int((fConst38 - 1)) & 2047));
  464. for (int i=0; i<2; i++) fRec32[i] = 0;
  465. fConst41 = floorf((0.5f + (0.219991f * iConst0)));
  466. fConst42 = ((0 - (6.907755278982138f * fConst41)) / iConst0);
  467. for (int i=0; i<2; i++) fRec39[i] = 0;
  468. for (int i=0; i<2; i++) fRec38[i] = 0;
  469. for (int i=0; i<16384; i++) fVec14[i] = 0;
  470. fConst43 = floorf((0.5f + (0.019123f * iConst0)));
  471. iConst44 = int((int((fConst41 - fConst43)) & 16383));
  472. for (int i=0; i<1024; i++) fVec15[i] = 0;
  473. iConst45 = int((int((fConst43 - 1)) & 1023));
  474. for (int i=0; i<2; i++) fRec36[i] = 0;
  475. for (int i=0; i<3; i++) fRec0[i] = 0;
  476. for (int i=0; i<3; i++) fRec1[i] = 0;
  477. for (int i=0; i<3; i++) fRec2[i] = 0;
  478. for (int i=0; i<3; i++) fRec3[i] = 0;
  479. for (int i=0; i<3; i++) fRec4[i] = 0;
  480. for (int i=0; i<3; i++) fRec5[i] = 0;
  481. for (int i=0; i<3; i++) fRec6[i] = 0;
  482. for (int i=0; i<3; i++) fRec7[i] = 0;
  483. }
  484. };
  485. #endif // OPENAV_DSP_REVERB_H