Now i'm trying to add simple GR meter.But i never worked with vu meters before.
Trying this example.
https://github.com/tappleby/hush-vst.../IPlug/Example
I added necessary thing to .cpp and .header files.But getting some errors with source code.
For example...
peakL = MAX(peakL, fabs(*out1));
peakR = MAX(peakR, fabs(*out2));
}
const double METER_ATTACK = 0.6, METER_DECAY = 0.1;
double xL = (peakL < prevL ? METER_DECAY : METER_ATTACK);
double xR = (peakR < prevR ? METER_DECAY : METER_ATTACK);
peakL = peakL * xL + prevL * (1.0 - xL);
peakR = peakR * xR + prevR * (1.0 - xR);
prevL = peakL;
prevR = peakR;
if (GetGUI()) {
GetGUI()->SetControlFromPlug(mMeterIdx_L, peakL);
GetGUI()->SetControlFromPlug(mMeterIdx_R, peakR);
I tried this code but it can't see peakL and peakR.But i defined them like this "double peakL = 0.0, peakR = 0.0;".