ref: 2e86b938c226edc0d8bd6c3855baf3bec02b5179
parent: 29851f9c445d41cd82e422cb4b8c13fd2a13aea5
parent: 775d674bf2fea68eb44212ba9ee3ca82d93de451
author: Paul Batchelor <[email protected]>
date: Sat Mar 6 13:36:23 EST 2021
Merge branch 'master' of github.com:paulbatchelor/soundpipe
--- a/lib/fft/fftlib.c
+++ b/lib/fft/fftlib.c
@@ -9,6 +9,8 @@
#define M_PI 3.14159265358979323846
#endif
+#define LOG2(n) (log(n) / log(2))
+
#define POW2(m) ((uint32_t) 1 << (m)) /* integer power of 2 for m<32 */
/* fft's with M bigger than this bust primary cache */
--- a/lib/fft/sp_fft.c
+++ b/lib/fft/sp_fft.c
@@ -26,13 +26,13 @@
void sp_fftr(sp_fft *fft, SPFLOAT *buf, int FFTsize)
{
- int M = log2(FFTsize);
+ int M = LOG2(FFTsize);
rffts1(buf, M, fft->utbl, fft->BRLow);
}
void sp_fft_cpx(sp_fft *fft, SPFLOAT *buf, int FFTsize)
{
- int M = log2(FFTsize);
+ int M = LOG2(FFTsize);
ffts1(buf, M, fft->utbl, fft->BRLowCpx);
}
@@ -40,7 +40,7 @@
void sp_ifftr(sp_fft *fft, SPFLOAT *buf, int FFTsize)
{
- int M = log2(FFTsize);
+ int M = LOG2(FFTsize);
riffts1(buf, M, fft->utbl, fft->BRLow);
}