diff --git a/libs/ardour/convolver.cc b/libs/ardour/convolver.cc index bd00dccbe5..d0caa8e669 100644 --- a/libs/ardour/convolver.cc +++ b/libs/ardour/convolver.cc @@ -34,6 +34,8 @@ using namespace ARDOUR::DSP; using namespace ArdourZita; +using ARDOUR::Session; + Convolver::Convolver (Session& session, std::string const& path, IRChannelConfig irc, uint32_t pre_delay) : SessionHandleRef (session) , _irc (irc) diff --git a/libs/zita-convolver/zita-convolver.cc b/libs/zita-convolver/zita-convolver.cc index 91637b46d4..eb7d6603e1 100644 --- a/libs/zita-convolver/zita-convolver.cc +++ b/libs/zita-convolver/zita-convolver.cc @@ -22,8 +22,8 @@ #include #include -#if _MSC_VER -#include // Needed for 'Sleep()' +#ifdef _MSC_VER +#include // Needed for MSVC 'Sleep()' #endif #include "zita-convolver/zita-convolver.h" @@ -356,7 +356,7 @@ Convproc::cleanup (void) uint32_t k; while (!check_stop ()) { -#if _MSC_VER +#ifdef _MSC_VER Sleep (100); #else usleep (100000); diff --git a/libs/zita-convolver/zita-convolver/zita-convolver.h b/libs/zita-convolver/zita-convolver/zita-convolver.h index 39ec4ed474..6c4859bce5 100644 --- a/libs/zita-convolver/zita-convolver/zita-convolver.h +++ b/libs/zita-convolver/zita-convolver/zita-convolver.h @@ -20,6 +20,7 @@ #ifndef ARDOUR_ZITA_CONVOLVER_H #define ARDOUR_ZITA_CONVOLVER_H + #include #include #include @@ -32,11 +33,8 @@ namespace ArdourZita { #undef ZCSEMA_IS_IMPLEMENTED #endif -/* Note: - * - __MINGW32__ is also defined for 64bit builds - * - mingw, x-compile uses PTW32's implementation of semaphores, we should prefer defined(PTW32_VERSION) - */ -#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__MINGW32__) +/* note: mingw and msvc actually use PTW32's implementation of semaphores */ +#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(PTW32_VERSION) #include @@ -53,9 +51,6 @@ public: sem_destroy (&_sema); } - ZCsema (const ZCsema&); // disabled - ZCsema& operator= (const ZCsema&); // disabled - int init (int s, int v) { return sem_init (&_sema, s, v); @@ -77,13 +72,15 @@ public: } private: + ZCsema (const ZCsema&); // disabled + ZCsema& operator= (const ZCsema&); // disabled + sem_t _sema; }; #define ZCSEMA_IS_IMPLEMENTED -#endif -#if defined (__APPLE__) || defined (_MSC_VER) +#elif defined (__APPLE__) // NOTE: ***** I DO NOT REPEAT NOT PROVIDE SUPPORT FOR OSX ***** // @@ -106,10 +103,8 @@ public: pthread_cond_destroy (&_cond); } -#ifndef _MSC_VER /* remove for MSVC build */ ZCsema (const ZCsema&); // disabled ZCsema& operator= (const ZCsema&); // disabled -#endif int init (int s, int v) {