iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
IPlugPlatform.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the iPlug 2 library. Copyright (C) the iPlug 2 developers.
5
6 See LICENSE.txt for more info.
7
8 ==============================================================================
9*/
10
11#pragma once
12
18#ifdef _WIN32
19 #define OS_WIN
20#elif defined __APPLE__
21 #include <TargetConditionals.h>
22 #if TARGET_OS_IPHONE
23 #define OS_IOS
24 #elif TARGET_OS_MAC
25 #define OS_MAC
26 #endif
27#elif defined __linux || defined __linux__ || defined linux
28 #define OS_LINUX
29#elif defined EMSCRIPTEN
30 #define OS_WEB
31#else
32 #error "No OS defined!"
33#endif
34
35#if defined(_WIN64) || defined(__LP64__)
36 #define ARCH_64BIT
37#endif
38
39#if __cplusplus == 201402L
40#define IPLUG_CPP14
41#endif
42
43//these two components of the c standard library are used thoughtout IPlug/WDL
44#include <cstring>
45#include <cstdlib>
46
47#ifdef PARAMS_MUTEX
48 #define ENTER_PARAMS_MUTEX mParams_mutex.Enter(); Trace(TRACELOC, "%s", "ENTER_PARAMS_MUTEX");
49 #define LEAVE_PARAMS_MUTEX mParams_mutex.Leave(); Trace(TRACELOC, "%s", "LEAVE_PARAMS_MUTEX");
50 #define ENTER_PARAMS_MUTEX_STATIC _this->mParams_mutex.Enter(); Trace(TRACELOC, "%s", "ENTER_PARAMS_MUTEX");
51 #define LEAVE_PARAMS_MUTEX_STATIC _this->mParams_mutex.Leave(); Trace(TRACELOC, "%s", "LEAVE_PARAMS_MUTEX");
52#else
53 #define ENTER_PARAMS_MUTEX
54 #define LEAVE_PARAMS_MUTEX
55 #define ENTER_PARAMS_MUTEX_STATIC
56 #define LEAVE_PARAMS_MUTEX_STATIC
57#endif
58
59#define BEGIN_IPLUG_NAMESPACE namespace iplug {
60#define END_IPLUG_NAMESPACE }
61
62#define BEGIN_IGRAPHICS_NAMESPACE namespace igraphics {
63#define END_IGRAPHICS_NAMESPACE }
64
65namespace iplug {namespace igraphics {}};
66
67#if defined IGRAPHICS_GLES2 || IGRAPHICS_GLES3 || IGRAPHICS_GL2 || defined IGRAPHICS_GL3
68 #define IGRAPHICS_GL
69#endif