osci-render/Source/audio/DashedLineEffect.h

18 wiersze
483 B
C
Czysty Zwykły widok Historia

2024-02-20 14:14:24 +00:00
#pragma once
#include "EffectApplication.h"
#include "../shape/OsciPoint.h"
2024-02-20 14:14:24 +00:00
class DashedLineEffect : public EffectApplication {
public:
DashedLineEffect();
~DashedLineEffect();
OsciPoint apply(int index, OsciPoint input, const std::vector<std::atomic<double>>& values, double sampleRate) override;
2024-02-20 14:14:24 +00:00
private:
const static int MAX_BUFFER = 192000;
std::vector<OsciPoint> buffer = std::vector<OsciPoint>(MAX_BUFFER);
2024-02-20 14:14:24 +00:00
int dashIndex = 0;
int bufferIndex = 0;
};