osci-render/Source/audio/DelayEffect.h

19 wiersze
481 B
C
Czysty Zwykły widok Historia

#pragma once
#include "EffectApplication.h"
2024-01-07 16:17:20 +00:00
#include "../shape/Point.h"
class DelayEffect : public EffectApplication {
public:
DelayEffect();
~DelayEffect();
Point apply(int index, Point input, const std::vector<std::atomic<double>>& values, double sampleRate) override;
private:
const static int MAX_DELAY = 192000 * 10;
2024-01-07 16:17:20 +00:00
std::vector<Point> delayBuffer = std::vector<Point>(MAX_DELAY);
int head = 0;
int position = 0;
int samplesSinceLastDelay = 0;
};