# HG changeset patch # User Chris Cannam # Date 1441633519 -3600 # Node ID 7dcff010d9cde72d1b30b8c64f7d0a6b83479d82 # Parent 50fde8eecba509de09e6731f2d52a035592a9d7f Some tidying, switch to libc++ diff -r 50fde8eecba5 -r 7dcff010d9cd .hgsubstate --- a/.hgsubstate Mon Sep 07 12:01:19 2015 +0100 +++ b/.hgsubstate Mon Sep 07 14:45:19 2015 +0100 @@ -1,3 +1,3 @@ 7a48704e9a0fac1486240f9f7b7e31436a588064 bqvec -b4018913cd9b9ec5833c6003b5c0642f0353eb2f constant-q-cpp +b8d8f2325662aa3eeb898407aecd52c61e04f7d2 constant-q-cpp d25a2e91e9d84aaff25e5d746398232d182d127d flattendynamics diff -r 50fde8eecba5 -r 7dcff010d9cd Makefile.osx --- a/Makefile.osx Mon Sep 07 12:01:19 2015 +0100 +++ b/Makefile.osx Mon Sep 07 14:45:19 2015 +0100 @@ -1,7 +1,7 @@ -ARCHFLAGS ?= -mmacosx-version-min=10.6 -arch x86_64 -arch i386 +ARCHFLAGS ?= -mmacosx-version-min=10.7 -arch x86_64 -arch i386 -CXXFLAGS += $(ARCHFLAGS) -DMALLOC_IS_ALIGNED -O3 -ftree-vectorize -I../vamp-plugin-sdk +CXXFLAGS += $(ARCHFLAGS) -DMALLOC_IS_ALIGNED -O3 -ftree-vectorize -I../vamp-plugin-sdk -std=c++11 -stdlib=libc++ LDFLAGS += $(ARCHFLAGS) -dynamiclib ../vamp-plugin-sdk/libvamp-sdk.a -exported_symbols_list vamp-plugin.list -install_name silvet.dylib diff -r 50fde8eecba5 -r 7dcff010d9cd src/Silvet.cpp --- a/src/Silvet.cpp Mon Sep 07 12:01:19 2015 +0100 +++ b/src/Silvet.cpp Mon Sep 07 14:45:19 2015 +0100 @@ -24,17 +24,21 @@ #include "LiveInstruments.h" #include -#include #include +#if (defined(MAX_EM_THREADS) && (MAX_EM_THREADS > 1)) +#include +using std::future; +using std::async; +#endif + using std::vector; using std::cout; using std::cerr; using std::endl; using std::pair; -using std::future; -using std::async; + using Vamp::RealTime; static int processingSampleRate = 44100; @@ -727,7 +731,11 @@ localBestShifts = vector >(width); } - int emThreadCount = MAX_EM_THREADS; + int emThreadCount = 1; + +#if (defined(MAX_EM_THREADS) && (MAX_EM_THREADS > 1)) + emThreadCount = MAX_EM_THREADS; + if (emThreadCount > int(std::thread::hardware_concurrency())) { emThreadCount = std::thread::hardware_concurrency(); } @@ -736,7 +744,6 @@ emThreadCount = 1; } -#if (defined(MAX_EM_THREADS) && (MAX_EM_THREADS > 1)) if (emThreadCount > 1) { for (int i = 0; i < width; ) { typedef future, vector>> EMFuture;