aboutsummaryrefslogtreecommitdiff
path: root/sc4pd/source/Decay.cpp
diff options
context:
space:
mode:
authorTim Blechmann <timblech@users.sourceforge.net>2004-08-02 20:13:59 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:11:55 +0200
commit1bf32780fe1281eda6deb51f661f2f234a16fd1f (patch)
tree9626c91fbc00ab8c51476f3ea1d5b0946f61b2d8 /sc4pd/source/Decay.cpp
parent5e1268fb9920b248ee377797b130605f669c6dee (diff)
*** empty log message ***
svn path=/trunk/externals/tb/; revision=1904
Diffstat (limited to 'sc4pd/source/Decay.cpp')
-rw-r--r--sc4pd/source/Decay.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc4pd/source/Decay.cpp b/sc4pd/source/Decay.cpp
index 38112aa..467611c 100644
--- a/sc4pd/source/Decay.cpp
+++ b/sc4pd/source/Decay.cpp
@@ -37,6 +37,7 @@
#include "sc4pd.hpp"
+/* todo: linear interpolation is broken */
/* ------------------------ Decay~ -----------------------------*/
class Decay_ar
@@ -67,7 +68,7 @@ Decay_ar::Decay_ar(int argc,t_atom * argv)
AtomList Args(argc,argv);
- m_b1 = sc_getfloatarg(Args,0);
+ decayTime = sc_getfloatarg(Args,0);
AddOutSignal();
@@ -148,12 +149,12 @@ void Decay_ar::m_signal(int n, t_sample *const *in,
void Decay_ar::m_set(float f)
{
decayTime = f;
- m_b1= 0.f ? 0.f : exp(log001 / (decayTime * Samplerate()));
+ m_b1= f == 0.f ? 0.f : exp(log001 / (decayTime * Samplerate()));
}
void Decay_ar::m_dsp(int n, t_sample *const *in, t_sample *const *out)
{
- m_b1= 0.f ? 0.f : exp(log001 / (decayTime * Samplerate()));
+ m_b1= decayTime == 0.f ? 0.f : exp(log001 / (decayTime * Samplerate()));
}
/* todo: does it make sense to implement a message-based Decay?