zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 46a5b991e6b85045e4f8f43e6b3fb99c55d3b96b
parent 47cedb3ae83d1bfc3ae3725a1056a3241286f8f9
Author: fundamental <[email protected]>
Date:   Wed, 21 Nov 2012 17:12:28 -0500

DSSI: Fixes possible FFTW based segfault

- Previously on deallocation of a Master object fftw_cleanup() was called
  This invalidates all other existing fftw objects
- Thus this non-critical call was moved to main.cpp, s.t. it does not get called
  in a DSSI environment

Diffstat:
Msrc/CMakeLists.txt | 2+-
Msrc/Misc/Master.cpp | 1-
Msrc/main.cpp | 2++
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt @@ -329,8 +329,8 @@ message(STATUS "using link directories: ${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIR add_executable(zynaddsubfx main.cpp) target_link_libraries(zynaddsubfx - zynaddsubfx_nio zynaddsubfx_core + zynaddsubfx_nio ${GUI_LIBRARIES} ${NIO_LIBRARIES} ${AUDIO_LIBRARIES} diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp @@ -519,7 +519,6 @@ Master::~Master() delete sysefx[nefx]; delete fft; - FFT_cleanup(); pthread_mutex_destroy(&mutex); pthread_mutex_destroy(&vumutex); diff --git a/src/main.cpp b/src/main.cpp @@ -35,6 +35,7 @@ #include <getopt.h> +#include "DSP/FFTwrapper.h" #include "Misc/Master.h" #include "Misc/Part.h" #include "Misc/Util.h" @@ -164,6 +165,7 @@ void exitprogram() #endif delete [] denormalkillbuf; + FFT_cleanup(); } int main(int argc, char *argv[])