|
|
@@ -33,6 +33,11 @@ |
|
|
# import <Foundation/Foundation.h> |
|
|
# import <Foundation/Foundation.h> |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef CARLA_OS_WIN |
|
|
|
|
|
# include <pthread.h> |
|
|
|
|
|
# include <objbase.h> |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#ifdef HAVE_FLUIDSYNTH |
|
|
#ifdef HAVE_FLUIDSYNTH |
|
|
# include <fluidsynth.h> |
|
|
# include <fluidsynth.h> |
|
|
#endif |
|
|
#endif |
|
|
@@ -1411,6 +1416,21 @@ int main(int argc, char* argv[]) |
|
|
openLib = false; |
|
|
openLib = false; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------- |
|
|
|
|
|
// Initialize OS features |
|
|
|
|
|
|
|
|
|
|
|
#ifdef CARLA_OS_WIN |
|
|
|
|
|
OleInitialize(nullptr); |
|
|
|
|
|
CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); |
|
|
|
|
|
# ifndef __WINPTHREADS_VERSION |
|
|
|
|
|
// (non-portable) initialization of statically linked pthread library |
|
|
|
|
|
pthread_win32_process_attach_np(); |
|
|
|
|
|
pthread_win32_thread_attach_np(); |
|
|
|
|
|
# endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
if (openLib) |
|
|
if (openLib) |
|
|
{ |
|
|
{ |
|
|
handle = lib_open(filename); |
|
|
handle = lib_open(filename); |
|
|
@@ -1428,6 +1448,8 @@ int main(int argc, char* argv[]) |
|
|
if (doInit && getenv("CARLA_DISCOVERY_NO_PROCESSING_CHECKS") != nullptr) |
|
|
if (doInit && getenv("CARLA_DISCOVERY_NO_PROCESSING_CHECKS") != nullptr) |
|
|
doInit = false; |
|
|
doInit = false; |
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
if (doInit && openLib && handle != nullptr) |
|
|
if (doInit && openLib && handle != nullptr) |
|
|
{ |
|
|
{ |
|
|
// test fast loading & unloading DLL without initializing the plugin(s) |
|
|
// test fast loading & unloading DLL without initializing the plugin(s) |
|
|
@@ -1480,6 +1502,17 @@ int main(int argc, char* argv[]) |
|
|
if (openLib && handle != nullptr) |
|
|
if (openLib && handle != nullptr) |
|
|
lib_close(handle); |
|
|
lib_close(handle); |
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
#ifdef CARLA_OS_WIN |
|
|
|
|
|
#ifndef __WINPTHREADS_VERSION |
|
|
|
|
|
pthread_win32_thread_detach_np(); |
|
|
|
|
|
pthread_win32_process_detach_np(); |
|
|
|
|
|
#endif |
|
|
|
|
|
CoUninitialize(); |
|
|
|
|
|
OleUninitialize(); |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|