summaryrefslogtreecommitdiff
path: root/libs/zita-convolver
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2018-10-22 08:56:22 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2018-10-22 08:56:22 +0100
commit947f6c78b2780a5b41e67d29472cde45c7eabdea (patch)
treee5d367acb1df55a239e7861ecbf34044fed70eff /libs/zita-convolver
parent16927d747fe994fc4a20c526e084a3142d662f87 (diff)
Remaining changes needed to build zita-convolver with MSVC
Diffstat (limited to 'libs/zita-convolver')
-rw-r--r--libs/zita-convolver/zita-convolver.cc6
-rw-r--r--libs/zita-convolver/zita-convolver/zita-convolver.h19
2 files changed, 10 insertions, 15 deletions
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 <string.h>
#include <unistd.h>
-#if _MSC_VER
-#include <windows.h> // Needed for 'Sleep()'
+#ifdef _MSC_VER
+#include <windows.h> // 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 <fftw3.h>
#include <pthread.h>
#include <stdint.h>
@@ -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 <semaphore.h>
@@ -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)
{