diff options
Diffstat (limited to 'src/mdaPiano.cpp')
-rw-r--r-- | src/mdaPiano.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mdaPiano.cpp b/src/mdaPiano.cpp index f207079..3a05fbe 100644 --- a/src/mdaPiano.cpp +++ b/src/mdaPiano.cpp @@ -145,11 +145,17 @@ void mdaPiano::update() //parameter change } +void mdaPiano::setSampleRate(float rate) +{ + AudioEffectX::setSampleRate(rate); + Fs = rate; + iFs = 1.0f / Fs; + if(Fs > 64000.0f) cmax = 0xFF; else cmax = 0x7F; +} + + void mdaPiano::resume() { - Fs = getSampleRate(); - iFs = 1.0f / Fs; - if(Fs > 64000.0f) cmax = 0xFF; else cmax = 0x7F; memset(comb, 0, sizeof(float) * 256); DECLARE_LVZ_DEPRECATED (wantEvents) (); |