13
0

Remaining changes needed to build zita-convolver with MSVC

This commit is contained in:
John Emmas 2018-10-22 08:56:22 +01:00
parent 16927d747f
commit 947f6c78b2
3 changed files with 12 additions and 15 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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)
{