zynaddsubfx

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

commit 02aa9b6b80a9419a9e3de35f6529b36aac35d514
parent d79193922b0f75c3ef7dc9d4fa8d9cef84c266b2
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Sun, 15 Oct 2017 11:32:22 -0400

Fix Mingw std::thread Use

This is the third attempt, hopefully there's no remaining issues...

Diffstat:
Msrc/Params/PADnoteParameters.cpp | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/Params/PADnoteParameters.cpp b/src/Params/PADnoteParameters.cpp @@ -965,6 +965,11 @@ int PADnoteParameters::sampleGenerator(PADnoteParameters::callback cb, delete[] spectrum; }; +#ifdef WIN32 + //Temporarily disable multi-threading here as C++11 threads are broken on + //mingw cross compilation + thread_cb(1,0); +#else unsigned nthreads = std::min(max_threads, std::thread::hardware_concurrency()); std::vector<std::thread> threads(nthreads); @@ -972,6 +977,7 @@ int PADnoteParameters::sampleGenerator(PADnoteParameters::callback cb, threads[i] = std::thread(thread_cb, nthreads, i); for(unsigned i = 0; i < nthreads; ++i) threads[i].join(); +#endif return samplemax; }