#pragma once #include "EffectApplication.h" #include "../shape/OsciPoint.h" class DelayEffect : public EffectApplication { public: DelayEffect(); ~DelayEffect(); OsciPoint apply(int index, OsciPoint input, const std::vector>& values, double sampleRate) override; private: const static int MAX_DELAY = 192000 * 10; std::vector delayBuffer = std::vector(MAX_DELAY); int head = 0; int position = 0; int samplesSinceLastDelay = 0; };