X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fpanner_manager.cc;h=b14c7c79cf532efcf4a969e9495c327f4ef0ac47;hb=7953df93bfec2df8bb0a8568a9dacbd00235aac4;hp=0084a62285a8ddc981b6e08cd33d290bc81abd4e;hpb=e279b9892b467aa823e253d97b6e9504cca0e252;p=ardour.git diff --git a/libs/ardour/panner_manager.cc b/libs/ardour/panner_manager.cc index 0084a62285..b14c7c79cf 100644 --- a/libs/ardour/panner_manager.cc +++ b/libs/ardour/panner_manager.cc @@ -30,7 +30,7 @@ #include "ardour/debug.h" #include "ardour/panner_manager.h" -#include "ardour/panner_search_path.h" +#include "ardour/search_paths.h" #include "i18n.h" @@ -63,7 +63,24 @@ PannerManager::instance () static bool panner_filter (const string& str, void */*arg*/) { -#ifdef __APPLE__ +#ifdef COMPILER_MSVC + /** + * Different build targets (Debug / Release etc) use different versions + * of the 'C' runtime (which can't be 'mixed & matched'). Therefore, in + * case the supplied search path contains multiple version(s) of a given + * panner module, only select the one(s) which match the current build + * target (otherwise, all hell will break loose !!) + */ + #if defined (_DEBUG) + return str.length() > 12 && (str.find ("panner_") == 0) && (str.find ("D.dll") == (str.length() - 5)); + #elif defined (RDC_BUILD) + return str.length() > 14 && (str.find ("panner_") == 0) && (str.find ("RDC.dll") == (str.length() - 7)); + #elif defined (_WIN64) + return str.length() > 13 && (str.find ("panner_") == 0) && (str.find ("64.dll") == (str.length() - 6)); + #else + return str.length() > 13 && (str.find ("panner_") == 0) && (str.find ("32.dll") == (str.length() - 6)); + #endif +#elif defined (__APPLE__) return str[0] != '.' && (str.length() > 6 && str.find (".dylib") == (str.length() - 6)); #else return str[0] != '.' && (str.length() > 3 && (str.find (".so") == (str.length() - 3) || str.find (".dll") == (str.length() - 4)));