26 #if !defined(SAMPLE_TYPE_FLOAT) && !defined(SAMPLE_TYPE_DOUBLE) 27 #define SAMPLE_TYPE_DOUBLE 30 #ifdef SAMPLE_TYPE_DOUBLE 31 using PLUG_SAMPLE_DST = double;
32 using PLUG_SAMPLE_SRC = float;
34 using PLUG_SAMPLE_DST = float;
35 using PLUG_SAMPLE_SRC = double;
38 using sample = PLUG_SAMPLE_DST;
40 #define LOGFILE "IPlugLog.txt" 41 #define MAX_PROCESS_TRACE_COUNT 100 42 #define MAX_IDLE_TRACE_COUNT 15 53 #ifdef IPLUG1_COMPATIBILITY 54 kBypassParam =
'bpas',
55 kPresetParam =
'prst',
65 static const double PI = 3.1415926535897932384626433832795;
71 static const double AMP_DB = 8.685889638065036553;
76 static const double IAMP_DB = 0.11512925464970;
77 static const double DEFAULT_SAMPLE_RATE = 44100.0;
78 static const int MAX_PRESET_NAME_LEN = 256;
79 #define UNUSED_PRESET_NAME "empty" 80 #define DEFAULT_USER_PRESET_NAME "user preset" 82 #define AU_MAX_IO_CHANNELS 128 85 #define MAX_MACOS_PATH_LEN 1024 86 #define MAX_WIN32_PATH_LEN 256 87 #define MAX_WIN32_PARAM_LEN 256 88 #define IPLUG_WIN_MAX_WIDE_PATH 4096 90 #define MAX_PLUGIN_NAME_LEN 128 92 #define MAX_PARAM_NAME_LEN 32 // e.g. "Gain" 93 #define MAX_PARAM_LABEL_LEN 32 // e.g. "Percent" 94 #define MAX_PARAM_DISPLAY_LEN 32 // e.g. "100" / "Mute" 95 #define MAX_PARAM_GROUP_LEN 32 // e.g. "oscillator section" 96 #define MAX_BUS_NAME_LEN 32 // e.g. "sidechain input" 97 #define MAX_CHAN_NAME_LEN 32 // e.g. "input 1" 99 #define MAX_VERSION_STR_LEN 32 100 #define MAX_BUILD_INFO_STR_LEN 256 101 static const int MAX_PARAM_DISPLAY_PRECISION = 6;
103 #define MAX_AAX_PARAMID_LEN 32 105 #define PARAM_UNINIT 99.99e-9 107 #ifndef MAX_BLOB_LENGTH 108 #define MAX_BLOB_LENGTH 2048 111 #ifndef IDLE_TIMER_RATE 112 #define IDLE_TIMER_RATE 20 // this controls the frequency of data going from processor to editor (and OnIdle calls) 115 #ifndef MAX_SYSEX_SIZE 116 #define MAX_SYSEX_SIZE 512 119 #define PARAM_TRANSFER_SIZE 512 120 #define MIDI_TRANSFER_SIZE 32 121 #define SYSEX_TRANSFER_SIZE 4 124 #define IPLUG_VERSION 0x010000 125 #define IPLUG_VERSION_MAGIC 'pfft' 127 static const int DEFAULT_BLOCK_SIZE = 1024;
128 static const double DEFAULT_TEMPO = 120.0;
129 static const int kNoParameter = -1;
130 static const int kNoValIdx = -1;
131 static const int kNoTag = -1;
133 #define MAX_BUS_CHANS 64 // wild cards in channel i/o strings will result in this many channels 165 static const char* ParamSourceStrs[kNumParamSources] = {
"Reset",
"Host",
"Preset",
"UI",
"Editor Delegate",
"Recompile",
"Unknown"};
176 static const char* RoutingDirStrs[2] = {
"Input",
"Output" };
219 kHostDigitalPerformer,
228 kHostWaveLabElements,
248 enum EResourceLocation
257 typedef char ChunkID[4];
270 static const ChunkID commonChunks[kNumPresetChunks] = {
271 {
'V',
'S',
'T',
'3'},
272 {
'C',
'o',
'm',
'p'},
273 {
'C',
'o',
'n',
't'},
274 {
'P',
'r',
'o',
'g'},
275 {
'I',
'n',
'f',
'o'},
280 static const int32_t kFormatVersion = 1;
281 static const int32_t kClassIDSize = 32;
282 static const int32_t kHeaderSize =
sizeof (ChunkID) +
sizeof (int32_t) + kClassIDSize +
sizeof (int64_t);
286 static const int kFXPVersionNum = 1;
287 static const int kFXBVersionNum = 2;
389 kVK_SEPARATOR = 0x6C,
EParamSource
Used to identify the source of a parameter change.
ERoute
Used to identify whether a bus/channel connection is an input or an output.
static const double AMP_DB
Magic number for gain to dB conversion.
static const double IAMP_DB
Magic number for dB to gain conversion.