Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 566 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 566 Bytes

PFFFT, a pretty fast Fourier Transform bindings for Odin.

Example:

import "./odin-pffft"

fft: []complex64
samples: []f32

pffft_setup := pffft.new_setup(fft_size, pffft.Transform.REAL)
defer pffft.destroy_setup(pffft_setup)

pffft.transform_ordered(
    pffft_setup,
    raw_data(samples),
    raw_data(mem.slice_data_cast([]f32, fft)),
    nil,
    pffft.Direction.FORWARD
)

Building pffft on MacOS:

clang pffft.c pffft.h -c -O2 -Os -fPIC
ar rcs pffft.a pffft.o