Skip to content

Commit

Permalink
Fixed issue with MathPower now working in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsjohnson committed Feb 10, 2016
1 parent 7870a48 commit b8588d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/marsyas/marsystems/MathPower.cpp
Expand Up @@ -68,20 +68,21 @@ MathPower::myUpdate(MarControlPtr sender)
ctrl_onObsNames_->setValue(obsNamesAddPrefix(inObsNames,
"MathPower_"), NOUPDATE);

exponent_ = ctrl_exponent_->to<mrs_real>();
}

void
MathPower::myProcess(realvec& in, realvec& out)
{
mrs_natural t,o;

mrs_real exponent = ctrl_exponent_->to<mrs_real>();

/// 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);
}
}
}
1 change: 0 additions & 1 deletion src/marsyas/marsystems/MathPower.h
Expand Up @@ -46,7 +46,6 @@ class marsyas_EXPORT MathPower: public MarSystem

/// MarControlPtr for the gain control
MarControlPtr ctrl_exponent_;
mrs_real exponent_;

public:
/// MathPower constructor.
Expand Down

0 comments on commit b8588d3

Please sign in to comment.