Remove FFTwrapper buffers for thread-safety
commit04c72d6cb90da482d11c9bedba58b950f4255023
authorJohannes Lorenz <j.git@lorenz-ho.me>
Sun, 2 Jan 2022 18:54:14 +0000 (2 19:54 +0100)
committerMark McCurry <mark.d.mccurry@gmail.com>
Wed, 5 Jan 2022 02:17:48 +0000 (4 21:17 -0500)
tree3c938c113ce29c9bcf1936bce46e91752113d1e7
parentc784cdb4c99c58d411983a53cb053b303adb0458
Remove FFTwrapper buffers for thread-safety

FFTwrapper is made thread-safe by not using buffers inside it. This
works, but requires that the buffers passed to the `freqs2smps` and
`smps2freqs`. This is assured by introducing 2 new classes
`FFTsampleBuffer` and `FFTfreqBuffer`, which are passed to `freqs2smps`
and `smps2freqs`.

Another thing to note is that fftw even modifies its input
buffers, so this commit partially needs to pass "scratch input buffers"
to `freqs2smps` and `smps2freqs`, so that these functions can copy the
input buffers there and only then run fftw on the scratch buffers.
src/DSP/FFTwrapper.cpp
src/DSP/FFTwrapper.h
src/Params/PADnoteParameters.cpp
src/Synth/OscilGen.cpp
src/Synth/OscilGen.h