ifftInto method

void ifftInto(
  1. Float32List inRe,
  2. Float32List inIm,
  3. Float32List outRe,
  4. Float32List outIm,
)

Zero-allocation inverse complex FFT into caller-provided output buffers.

Example:

plan.ifftInto(specRe, specIm, outRe, outIm);

Implementation

void ifftInto(
  Float32List inRe,
  Float32List inIm,
  Float32List outRe,
  Float32List outIm,
) {
  if (outRe.length != n || outIm.length != n) {
    throw ArgumentError('output lengths must both equal n $n');
  }

  final r = res;
  _loadInput(inRe, inIm);
  yl_fft_plan_execute_c2c_backward(
    r.plan,
    r.inReal,
    r.inImag,
    r.outReal,
    r.outImag,
  );

  outRe.setAll(0, r.outReal.asTypedList(n));
  outIm.setAll(0, r.outImag.asTypedList(n));
}