Checkpoint point, pre instantiation of supplementary LV2pedalboards.
This commit is contained in:
+11
-4
@@ -20,12 +20,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "json.hpp"
|
||||
#include "Pedalboard.hpp"
|
||||
|
||||
namespace pipedal
|
||||
{
|
||||
class VuUpdate
|
||||
class VuUpdateX
|
||||
{
|
||||
public:
|
||||
int pedalboardType_ = (int)PedalboardType::Invalid;
|
||||
int64_t instanceId_ = 0;
|
||||
long sampleTime_ = 0;
|
||||
bool isStereoInput_ = false;
|
||||
@@ -36,6 +38,9 @@ namespace pipedal
|
||||
float outputMaxValueR_ = 0;
|
||||
|
||||
public:
|
||||
|
||||
PedalboardType pedalboardType() const { return (PedalboardType)pedalboardType_; }
|
||||
void pedalboardType(PedalboardType value) { pedalboardType_ = (int)value; }
|
||||
void reset() {
|
||||
inputMaxValueL_ = 0;
|
||||
inputMaxValueR_ = 0;
|
||||
@@ -45,7 +50,10 @@ namespace pipedal
|
||||
|
||||
void AccumulateVu(float *value,float *input, uint32_t samples)
|
||||
{
|
||||
|
||||
if (input == nullptr) {
|
||||
*value = 0;
|
||||
return;
|
||||
}
|
||||
float v = *value;
|
||||
for (uint32_t i = 0; i < samples; ++i)
|
||||
{
|
||||
@@ -65,7 +73,6 @@ namespace pipedal
|
||||
{
|
||||
AccumulateVu(&inputMaxValueL_,inputL,samples);
|
||||
AccumulateVu(&inputMaxValueR_,inputR,samples);
|
||||
|
||||
}
|
||||
void AccumulateOutputs(float* output, uint32_t samples)
|
||||
{
|
||||
@@ -78,6 +85,6 @@ namespace pipedal
|
||||
AccumulateVu(&outputMaxValueR_,outputR,samples);
|
||||
}
|
||||
|
||||
DECLARE_JSON_MAP(VuUpdate);
|
||||
DECLARE_JSON_MAP(VuUpdateX);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user