diff --git a/src/marsyas/marsystems/MathPower.cpp b/src/marsyas/marsystems/MathPower.cpp index ced9b62bc..01e8c5ace 100644 --- a/src/marsyas/marsystems/MathPower.cpp +++ b/src/marsyas/marsystems/MathPower.cpp @@ -68,7 +68,6 @@ MathPower::myUpdate(MarControlPtr sender) ctrl_onObsNames_->setValue(obsNamesAddPrefix(inObsNames, "MathPower_"), NOUPDATE); - exponent_ = ctrl_exponent_->to(); } void @@ -76,12 +75,14 @@ MathPower::myProcess(realvec& in, realvec& out) { mrs_natural t,o; + mrs_real exponent = ctrl_exponent_->to(); + /// Iterate over the observations and samples and do the processing. for (o = 0; o < inObservations_; o++) { for (t = 0; t < inSamples_; t++) { - out(o, t) = pow(in(o, t), exponent_); + out(o, t) = pow(in(o, t), exponent); } } } diff --git a/src/marsyas/marsystems/MathPower.h b/src/marsyas/marsystems/MathPower.h index 473762744..3c2bd2fe9 100644 --- a/src/marsyas/marsystems/MathPower.h +++ b/src/marsyas/marsystems/MathPower.h @@ -46,7 +46,6 @@ class marsyas_EXPORT MathPower: public MarSystem /// MarControlPtr for the gain control MarControlPtr ctrl_exponent_; - mrs_real exponent_; public: /// MathPower constructor.