computeSpectrum method

void computeSpectrum(
  1. List<double> values
)

Implementation

void computeSpectrum(List<double> values) {
  final size = values.length;
  final ptr = malloc.allocate<Double>(size * sizeOf<Double>());

  try {
    for (int i = 0; i < size; i++) {
      ptr[i] = values[i];
    }

    bindings.SpectrumMathComputeSpectrum(_pointer, ptr, size);
  } finally {
    malloc.free(ptr);
  }
}