process method

void process(
  1. List<double> input,
  2. List<double> outputLeft,
  3. List<double> outputRight
)

Implementation

void process(List<double> input, List<double> outputLeft, List<double> outputRight)
{
    outputLeft.fillRange(0, outputLeft.length, 0.0);
    outputRight.fillRange(0, outputRight.length, 0.0);

    for (CombFilter cf in cfsL)
    {
        cf.process(input, outputLeft);
    }

    for (AllPassFilter apf in apfsL)
    {
        apf.process(outputLeft);
    }

    for (CombFilter cf in cfsR)
    {
        cf.process(input, outputRight);
    }

    for (AllPassFilter apf in apfsR)
    {
        apf.process(outputRight);
    }

    // With the default settings, we can skip this part.
    if (1.0 - _wet1 > 1.0E-3 || _wet2 > 1.0E-3)
    {
        for (int t = 0; t < input.length; t++)
        {
            double left = outputLeft[t];
            double right = outputRight[t];
            outputLeft[t] = left * _wet1 + right * _wet2;
            outputRight[t] = right * _wet1 + left * _wet2;
        }
    }
}