diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f02d8541..8cdd8231d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -480,6 +480,7 @@ IF(LMMS_BUILD_WIN32) "${MINGW_PREFIX}/bin/libglib-2.0-0.dll" "${MINGW_PREFIX}/bin/libgthread-2.0-0.dll" "${MINGW_PREFIX}/bin/zlib1.dll" + "${MINGW_PREFIX}/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32/bin/libwinpthread-1.dll" DESTINATION .) ELSE(LMMS_BUILD_WIN32) diff --git a/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c b/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c index 41fb4f043..967edf646 100644 --- a/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c +++ b/plugins/LadspaEffect/swh/bode_shifter_cv_1432.c @@ -247,7 +247,7 @@ static void runBodeShifterCV(LADSPA_Handle instance, unsigned long sample_count) /* Perform the Hilbert FIR convolution * (probably FFT would be faster) */ hilb = 0.0f; - for (i = 0; i <= NZEROS/2; i++) { + for (i = 0; i < NZEROS/2; i++) { hilb += (xcoeffs[i] * delay[(dptr - i*2) & (D_SIZE - 1)]); } diff --git a/plugins/vst_base/RemoteVstPlugin.cpp b/plugins/vst_base/RemoteVstPlugin.cpp index ef85fbd48..cc441ce77 100644 --- a/plugins/vst_base/RemoteVstPlugin.cpp +++ b/plugins/vst_base/RemoteVstPlugin.cpp @@ -1860,10 +1860,12 @@ int main( int _argc, char * * _argv ) } #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION // (non-portable) initialization of statically linked pthread library pthread_win32_process_attach_np(); pthread_win32_thread_attach_np(); #endif +#endif #ifdef LMMS_BUILD_LINUX #ifdef LMMS_HAVE_SCHED_H @@ -1897,8 +1899,10 @@ int main( int _argc, char * * _argv ) #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION pthread_win32_thread_detach_np(); pthread_win32_process_detach_np(); +#endif #endif return 0; diff --git a/plugins/zynaddsubfx/LocalZynAddSubFx.cpp b/plugins/zynaddsubfx/LocalZynAddSubFx.cpp index 1fb3a74c6..f3e13cf3c 100644 --- a/plugins/zynaddsubfx/LocalZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/LocalZynAddSubFx.cpp @@ -26,6 +26,7 @@ #include "zynaddsubfx/src/Misc/Util.h" #include +#include #include "LocalZynAddSubFx.h" @@ -52,9 +53,11 @@ LocalZynAddSubFx::LocalZynAddSubFx() : if( s_instanceCount == 0 ) { #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION // (non-portable) initialization of statically linked pthread library pthread_win32_process_attach_np(); pthread_win32_thread_attach_np(); +#endif #endif initConfig(); diff --git a/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp b/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp index 0a963f328..227bc9e75 100644 --- a/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp @@ -268,10 +268,12 @@ int main( int _argc, char * * _argv ) } #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION // (non-portable) initialization of statically linked pthread library pthread_win32_process_attach_np(); pthread_win32_thread_attach_np(); #endif +#endif RemoteZynAddSubFx * remoteZASF = @@ -283,8 +285,10 @@ int main( int _argc, char * * _argv ) #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION pthread_win32_thread_detach_np(); pthread_win32_process_detach_np(); +#endif #endif return 0;