Using POD MultiEffect works ok of course with a single method call for each mode as below
void AudioCallback(float *in, float *out, size_t size)
{
float outl, outr, inl, inr;
Controls();
//audio
for (size_t i = 0; i < size; i += 2)
{
inl = in[i];
inr = in[i + 1];
switch (mode)
{
case REV:
GetReverbSample(outl, outr, inl, inr);
break;
case DEL:
GetDelaySample(outl, outr, inl, inr);
break;
case CRU:
GetCrushSample(outl, outr, inl, inr);
break;
default:
outl = outr = 0;
}
// left out
out[i] = outl;
// right out
out[i+1] = outr;
}
}
But if I add a second method call , so as to chain two effect together it doesn’t work., see code example below.
You can see I’ve added GetCrushSample after GetReverbSample. for case REV
void AudioCallback(float *in, float *out, size_t size)
{
float outl, outr, inl, inr;
Controls();
//audio
for (size_t i = 0; i < size; i += 2)
{
inl = in[i];
inr = in[i + 1];
switch (mode)
{
case REV:
GetReverbSample(outl, outr, inl, inr);
GetCrushSample(outl, outr, inl, inr);
break;
case DEL:
GetDelaySample(outl, outr, inl, inr);
break;
case CRU:
GetCrushSample(outl, outr, inl, inr);
break;
default:
outl = outr = 0;
}
// left out
out[i] = outl;
// right out
out[i+1] = outr;
}
}
Can some one please correct me and tell me why I can’t get this to work ?
Is there any documentation about “chaining” methods ?
Do I need another callback or something ?
I feel I’m doing something very stupid
Cheers