diff --git a/core/src/dsp/routing.h b/core/src/dsp/routing.h index 3e563b4c..3cd4fd65 100644 --- a/core/src/dsp/routing.h +++ b/core/src/dsp/routing.h @@ -180,45 +180,4 @@ namespace dsp { }; - - template - class Throttle : public generic_block> { - public: - Throttle() {} - - Throttle(stream* in) { init(in); } - - void init(stream* in) { - _in = in; - generic_block::registerInput(_in); - } - - void setInput(stream* in) { - std::lock_guard lck(generic_block::ctrlMtx); - generic_block::tempStop(); - generic_block::unregisterInput(_in); - _in = in; - generic_block::registerInput(_in); - generic_block::tempStart(); - } - - stream out; - - private: - int run() { - // TODO: If too slow, buffering might be necessary - int count = _in->read(); - if (count < 0) { return -1; } - - auto now = std::chrono::high_resolution_clock::now(); - - _in->flush(); - out.swap(count); - return count; - } - - std::chrono::time_point last; - - stream* _in; - }; } \ No newline at end of file