muzgen/lib/Mul.hpp

33 lines
610 B
C++
Raw Permalink Normal View History

#ifndef muz_MUL_HPP
#define muz_MUL_HPP
#include "commons.hpp"
#include "Signal.hpp"
#include "AudioConf.hpp"
namespace muz
{
/**
* Product of two input signals.
**/
class Mul: public Signal
{
public:
explicit Mul(AudioConf const& conf,
std::unique_ptr<Signal> lhs,
std::unique_ptr<Signal> rhs);
virtual ~Mul();
void next(std::vector<float>& out) override;
private:
AudioConf m_conf;
std::vector<float> m_out_left;
std::vector<float> m_out_right;
std::unique_ptr<Signal> m_lhs;
std::unique_ptr<Signal> m_rhs;
};
}
#endif