muzgen/lib/Add.hpp

33 lines
606 B
C++

#ifndef muz_ADD_HPP
#define muz_ADD_HPP
#include "commons.hpp"
#include "Signal.hpp"
#include "AudioConf.hpp"
namespace muz
{
/**
* Sum of two input signals.
**/
class Add: public Signal
{
public:
explicit Add(AudioConf const& conf,
std::unique_ptr<Signal> lhs,
std::unique_ptr<Signal> rhs);
virtual ~Add();
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