reVeno/Source/Veno/Audio/VenoBuffer.h

35 lines
815 B
C
Raw Normal View History

2020-06-13 10:56:20 +02:00
//
// Created by versustune on 12.06.20.
//
#ifndef VENO_VENOBUFFER_H
#define VENO_VENOBUFFER_H
#include <vector>
2020-07-09 16:31:33 +02:00
#include "JuceHeader.h"
2020-06-13 10:56:20 +02:00
class VenoBuffer
{
2020-06-13 10:56:20 +02:00
private:
std::vector<float> buffer;
std::vector<float> right;
std::vector<float> left;
public:
VenoBuffer ();
~VenoBuffer ();
void reset (int size);
void addMonoSample (float value, int index);
void addLeftSample (float value, int index);
void addRightSample (float value, int index);
void calcPeak ();
2020-06-13 10:56:20 +02:00
float leftPeak;
float rightPeak;
float monoPeak;
const std::vector<float>& getBuffer () const;
const std::vector<float>& getRight () const;
const std::vector<float>& getLeft () const;
2020-07-09 16:31:33 +02:00
protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoBuffer);
2020-06-13 10:56:20 +02:00
};
#endif //VENO_VENOBUFFER_H