-
Notifications
You must be signed in to change notification settings - Fork 7
/
dfxdefines.h
123 lines (89 loc) · 3.5 KB
/
dfxdefines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*------------------------------------------------------------------------
Destroy FX Library is a collection of foundation code
for creating audio processing plug-ins.
Copyright (C) 2002-2022 Sophia Poirier
This file is part of the Destroy FX Library (version 1.0).
Destroy FX Library is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Destroy FX Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Destroy FX Library. If not, see <http:https://www.gnu.org/licenses/>.
To contact the author, use the contact form at http:https://destroyfx.org
Destroy FX is a sovereign entity comprised of Sophia Poirier and Tom Murphy 7.
These are our general global defines and constants, to be included
somewhere in the include tree for every file for a DfxPlugin.
------------------------------------------------------------------------*/
#ifndef _DFX_DEFINES_H
#define _DFX_DEFINES_H
/*-----------------------------------------------------------------------------*/
/* XXX Microsoft's crummy C compiler doesn't define __STDC__ when its own C extensions are enabled */
#ifdef _MSC_EXTENSIONS
#ifndef __STDC__
#define __STDC__ 1
#endif
#endif
/*-----------------------------------------------------------------------------*/
#define DESTROY_FX_RULEZ
#ifndef PLUGIN_CREATOR_NAME_STRING
#define PLUGIN_CREATOR_NAME_STRING "Destroy FX"
#endif
#define DESTROYFX_CREATOR_ID 'DFX!'
#ifndef PLUGIN_CREATOR_ID
#define PLUGIN_CREATOR_ID DESTROYFX_CREATOR_ID
#endif
#ifndef PLUGIN_COLLECTION_NAME
#define PLUGIN_COLLECTION_NAME "Super Destroy FX upsetting+delightful plugin pack"
#endif
/* XXX needs workaround for plugin names with white spaces */
#ifndef PLUGIN_BUNDLE_IDENTIFIER
#define PLUGIN_BUNDLE_IDENTIFIER DESTROYFX_BUNDLE_ID_PREFIX PLUGIN_NAME_STRING DFX_BUNDLE_ID_SUFFIX
#endif
#ifndef PLUGIN_ICON_FILE_NAME
#define PLUGIN_ICON_FILE_NAME "destroyfx.icns"
#endif
#define DESTROYFX_URL "http:https://destroyfx.org"
#ifndef PLUGIN_HOMEPAGE_URL
#define PLUGIN_HOMEPAGE_URL DESTROYFX_URL
#endif
/*-----------------------------------------------------------------------------*/
#ifdef __STDC__
#if _WIN32 && !defined(TARGET_API_RTAS)
#include <windows.h>
#endif
#ifdef _MSC_VER
#ifdef TARGET_API_RTAS
typedef unsigned int uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
typedef INT32 int32_t;
typedef UINT32 uint32_t;
typedef INT64 int64_t;
typedef UINT64 uint64_t;
#endif
#else
#include <stdint.h>
#endif
#endif
/*-----------------------------------------------------------------------------*/
#ifdef __cplusplus
#include <cstddef>
#include <limits>
namespace dfx
{
using ParameterID = unsigned int;
// to indicate "not a real parameter" or something like that
static constexpr ParameterID kParameterID_Invalid = std::numeric_limits<ParameterID>::max();
static constexpr size_t kParameterNameMaxLength = 64;
static constexpr size_t kPresetNameMaxLength = 64;
static constexpr size_t kParameterValueStringMaxLength = 256;
static constexpr size_t kParameterUnitStringMaxLength = 256;
static constexpr size_t kParameterGroupStringMaxLength = 256;
}
#endif
#endif