From aeab33127d7f6a8f3e6b74fada32c358815dc22e Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Fri, 2 Apr 2021 18:40:57 +0200 Subject: [PATCH] more audio BS --- core/src/dsp/routing.h | 41 ----------------------------------------- 1 file changed, 41 deletions(-) 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