mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-24 01:11:39 -04:00
Replace std::sin() with interpolated LUT.
This commit is contained in:
parent
291de8f869
commit
b41ff962f4
2 changed files with 153 additions and 2 deletions
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "dsp_types.hpp"
|
||||
#include "complex.hpp"
|
||||
#include "sine_table.hpp"
|
||||
#include "hal.h"
|
||||
|
||||
namespace std {
|
||||
|
@ -113,10 +114,10 @@ void fft_c_preswapped(std::array<T, N>& data) {
|
|||
/* Provide data to this function, pre-swapped. */
|
||||
for(size_t mmax = 1; N > mmax; mmax <<= 1) {
|
||||
const float theta = -pi / mmax;
|
||||
const float wtemp = std::sin(0.5f * theta);
|
||||
const float wtemp = sin_f32(0.5f * theta);
|
||||
const T wp {
|
||||
-2.0f * wtemp * wtemp,
|
||||
std::sin(theta)
|
||||
sin_f32(theta)
|
||||
};
|
||||
T w { 1.0f, 0.0f };
|
||||
for(size_t m = 0; m < mmax; ++m) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue