CfftPlan class
Reusable complex-input FFT plan (c2c) with internal native buffers.
Instances support both forward (fft) and inverse (ifft) transforms at a fixed transform size n. Call close to release native memory.
Example:
import 'dart:typed_data';
import 'package:open_dspc/open_dspc.dart';
final plan = CfftPlan(1024);
try {
final re = SignalGenerator.sine(n: 1024, freqHz: 440, sampleRate: 16000);
final im = Float32List(1024);
final z = plan.fft(re, im);
final x = plan.ifft(z.real, z.imag);
} finally {
plan.close();
}
- Inheritance
-
- Object
- NativeHandle<
_CfftPlanResource> - CfftPlan
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- imag → Float32List
-
Reusable imaginary-part output buffer for fft and ifft.
final
- isClosed → bool
-
Whether close() has been called.
no setterinherited
- n → int
-
FFT length used by this plan.
final
- real → Float32List
-
Reusable real-part output buffer for fft and ifft.
final
- res → _CfftPlanResource
-
Throws if closed; returns the native resource otherwise.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void -
Deterministic cleanup.
inherited
-
fft(
Float32List inRe, Float32List inIm) → Complex32List - Computes the complex forward FFT into the reusable real/imag buffers.
-
fftInto(
Float32List inRe, Float32List inIm, Float32List outRe, Float32List outIm) → void - Zero-allocation forward complex FFT into caller-provided output buffers.
-
ifft(
Float32List inRe, Float32List inIm) → Complex32List - Computes the complex inverse FFT into the reusable real/imag buffers.
-
ifftInto(
Float32List inRe, Float32List inIm, Float32List outRe, Float32List outIm) → void - Zero-allocation inverse complex FFT into caller-provided output buffers.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited