Maybe not the best place to do this there but 1st I try do it inside the process() method (maybe calling original process() x times in a loop would be better way?). My prototype code looks like this:
Code: Select all
float process(float sample, int x){
float result = 0.0f;
float in_sample = sample;
// upsampling by x times using
float k = 1 / x;
for(i = 0; i < x + 1; i++){
sample = (1 - (i * k)) * old_sample + (i * k) * in_sample; //linear intepolation
result = a0 * sample + a[0] * x1 + a[1] * x2 + a[2] * y1 + a[3] * y2;
x2 = x1;
x1 = sample;
y2 = y1;
y1 = result;
}
old_sample = sample;
//Input for next stage
return result;
}