#pragma once #include #include "data/node.h" #include "data/audioframe.h" #include namespace Xybrid::Gadgets { class QuickLevel : public Data::Node { QContiguousCache buf; std::array, 2> lv; public: // time across which the displayed levels are calculated static const constexpr double SPAN_TIME = 1.0/30; static const constexpr double DISPLAY_EXPONENT = 1; QuickLevel(); ~QuickLevel() override = default; void init() override; void reset() override; void release() override; void process() override; void onPortDisconnected(Data::Port::Type, Data::Port::DataType, uint8_t, std::weak_ptr) override; void onGadgetCreated() override; void drawCustomChrome(QPainter*, const QStyleOptionGraphicsItem*) override; }; }