Skip to content

Instantly share code, notes, and snippets.

View razor7788's full-sized avatar
🤿
Focusing

razor0607 razor7788

🤿
Focusing
View GitHub Profile
@razor7788
razor7788 / fix_fft.c
Created October 21, 2021 11:31 — forked from Tomwi/fix_fft.c
/* fix_fft.c - Fixed-point in-place Fast Fourier Transform */
/*
All data are fixed-point short integers, in which -32768
to +32768 represent -1.0 to +1.0 respectively. Integer
arithmetic is used for speed, instead of the more natural
floating-point.
For the forward FFT (time -> freq), fixed scaling is
performed to prevent arithmetic overflow, and to map a 0dB
sine/cosine wave (i.e. amplitude = 32767) to two -6dB freq