diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-01-18 04:35:33 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-01-18 04:35:33 +0000 |
commit | 9ff5ccdea43ff2a954c1a400516dc6858e188e9c (patch) | |
tree | 6098867a573275a38bf000a382752bf115af0765 /externals/grill/fftease/src/main.h | |
parent | 478eeca99ee6f5bad3063700fbcc9d8913c770ae (diff) |
""
svn path=/trunk/; revision=344
Diffstat (limited to 'externals/grill/fftease/src/main.h')
-rw-r--r-- | externals/grill/fftease/src/main.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/externals/grill/fftease/src/main.h b/externals/grill/fftease/src/main.h index aeaea3e4..0ee99584 100644 --- a/externals/grill/fftease/src/main.h +++ b/externals/grill/fftease/src/main.h @@ -47,6 +47,11 @@ public: fftease(I mult,I flags); virtual ~fftease(); + static F FromdB(F v) { return pow(10.,v*.05); } + + inline I get_N() const { return _N; } + inline F get_Fund() const { return smprt/(_N*2); } + protected: virtual BL Init(); @@ -61,7 +66,8 @@ protected: virtual V Transform(I _N2,S *const *in) = 0; - I Mult() const { return _mult; } + V Mult(I n) { _mult = n; MakeVar(); } + inline I Mult() const { return _mult; } F *_input1,*_input2; F *_buffer1,*_buffer2; @@ -75,18 +81,22 @@ protected: enum { F_STEREO = 0x01, - F_WINDOW = 0x02, + F_BALANCED = 0x02, F_BITSHUFFLE = 0x04, F_CONVERT = 0x08,F_CRES = 0x10, F_RMS = 0x20 }; - I _mult,_flags; + I _flags; F _rms; private: + + V MakeVar() { _N = Blocksize()*_mult; } + I blsz; F smprt; + I _mult,_N; static V setup(t_classid c) {} |