You don't need int max as you're using it only once. Actually you don't need it at all, since nFrames is exactly what you need. ProcessDoubleReplacing is defined like so:
Code:
void IPlugEffect::ProcessDoubleReplacing(double** inputs, double** outputs, int nFrames)
inputs is just an array of arrays of doubles. It doesn't have ".size()", because it's just a dumb array. That's why you get int nFrames as well. That said, I believe you're using the first sample over and over. Remember input is an array! Have a look at the example project:
Code:
void IPlugEffect::ProcessDoubleReplacing(double** inputs, double** outputs, int nFrames)
{
// inputs has two arrays of doubles inside
double* in1 = inputs[0];
double* in2 = inputs[1];
// outputs does too
double* out1 = outputs[0];
double* out2 = outputs[1];
// in1, in2, out1 and out2 are now arrays of double
// we move the pointers with ++in1, ++in2, ++out1, ++out2
// you could also do out1[s]
for (int s = 0; s < nFrames; ++s, ++in1, ++in2, ++out1, ++out2)
{
*out1 = *in1 * mGain;
*out2 = *in2 * mGain;
}
}
Hope this helps!