FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ARA_Examples/ExamplesCommon/PlugInHosting/VST3Loader.cpp at main · Celemony/ARA_Examples · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Celemony
/
ARA_Examples
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
16
Code
Pull requests
1
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Security and quality
Insights
Expand file tree
Breadcrumbs
ARA_Examples
/
ExamplesCommon
/
PlugInHosting
/
VST3Loader.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
468 lines (390 loc) · 17.6 KB
Breadcrumbs
ARA_Examples
/
ExamplesCommon
/
PlugInHosting
/
VST3Loader.cpp
Copy path
File metadata and controls
468 lines (390 loc) · 17.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
//
------------------------------------------------------------------------------
//
! \file VST3Loader.cpp
//
! VST3 specific ARA implementation for the SDK's hosting examples
//
! \project ARA SDK Examples
//
! \copyright Copyright (c) 2012-2025, Celemony Software GmbH, All Rights Reserved.
//
! \license Licensed under the Apache License, Version 2.0 (the "License");
//
! you may not use this file except in compliance with the License.
//
! You may obtain a copy of the License at
//
!
//
! http://www.apache.org/licenses/LICENSE-2.0
//
!
//
! Unless required by applicable law or agreed to in writing, software
//
! distributed under the License is distributed on an "AS IS" BASIS,
//
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
! See the License for the specific language governing permissions and
//
! limitations under the License.
//
------------------------------------------------------------------------------
#
include
"
VST3Loader.h
"
#
if
defined (NDEBUG)
#
define
RELEASE
1
#
else
#
define
DEVELOPMENT
1
#
endif
#
include
"
ARA_API/ARAVST3.h
"
#
include
"
ARA_Library/Debug/ARADebug.h
"
ARA_DISABLE_VST3_WARNINGS_BEGIN
#
include
"
base/source/fstring.h
"
#
include
"
pluginterfaces/vst/ivstcomponent.h
"
#
include
"
pluginterfaces/vst/ivstaudioprocessor.h
"
#
include
"
pluginterfaces/vst/ivstprocesscontext.h
"
ARA_DISABLE_VST3_WARNINGS_END
DEF_CLASS_IID
(Steinberg::Vst::IComponent)
DEF_CLASS_IID
(Steinberg::Vst::IAudioProcessor)
DEF_CLASS_IID
(
ARA
::IMainFactory)
DEF_CLASS_IID
(
ARA
::IPlugInEntryPoint)
DEF_CLASS_IID
(
ARA
::IPlugInEntryPoint2)
#
include
<
cstring
>
#
include
<
string
>
#
include
<
utility
>
#
include
<
vector
>
#
if
defined (_WIN32)
#
define
WIN32_LEAN_AND_MEAN
#
include
<
Windows.h
>
#
include
<
conio.h
>
extern
"
C
"
typedef
bool
(
PLUGIN_API
*InitModuleProc) ();
extern
"
C
"
typedef
bool
(
PLUGIN_API
*ExitModuleProc) ();
#
elif
defined (__APPLE__)
#
include
<
CoreFoundation/CoreFoundation.h
>
extern
"
C
"
typedef
bool
(*bundleEntryPtr) (CFBundleRef);
extern
"
C
"
typedef
bool
(*bundleExitPtr) (
void
);
#
elif
defined (__linux__)
#
include
<
dlfcn.h
>
extern
"
C
"
typedef
bool
(
PLUGIN_API
*ModuleEntryFunc) (
void
*);
extern
"
C
"
typedef
bool
(
PLUGIN_API
*ModuleExitFunc) ();
#
endif
#
if
defined (_MSC_VER)
__pragma
(warning(disable :
4191
))
/*
unsafe conversion
*/
#
elif
defined (__GNUC__)
_Pragma
(
"
GCC diagnostic ignored
\"
-Wold-style-cast
\"
"
)
#
endif
using
namespace
Steinberg
;
using
namespace
Vst
;
struct
_VST3Binary
{
#
if
defined (_WIN32)
HMODULE
libHandle;
#
elif
defined (__APPLE__)
CFBundleRef libHandle;
#
elif
defined (__linux__)
void
* libHandle;
#
endif
IPtr<IPluginFactory> pluginFactory;
std::vector<IPtr<
ARA
::IMainFactory>> araMainFactories;
#
if
ARA_VALIDATE_API_CALLS
bool
hasMultiplePlugIns;
#
endif
};
struct
_VST3Effect
{
IPtr<IComponent> component;
int32_t
channelCount;
#
if
ARA_VALIDATE_API_CALLS
VST3Binary binary;
std::string className;
#
endif
};
VST3Binary
VST3LoadBinary
(
const
char
* binaryName)
{
#
if
defined (__APPLE__) || defined (__linux__)
//
if the binary name contains no '/', dlopen () searches the system library paths for the file,
//
and ignores the current directory - to prevent this, we prefix with "./" if needed
std::string temp {
"
./
"
};
if
(!
std::strchr
(binaryName,
'
/
'
))
{
temp += binaryName;
binaryName = temp.
c_str
();
}
#
endif
VST3Binary vst3Binary {
new
_VST3Binary };
#
if
defined (_WIN32)
vst3Binary->
libHandle
= ::
LoadLibraryA
(binaryName);
ARA_INTERNAL_ASSERT
(vst3Binary->
libHandle
);
const
auto
initBinaryFunc { (InitModuleProc) ::
GetProcAddress
(vst3Binary->
libHandle
,
"
InitDll
"
) };
const
auto
factoryFunc { (GetFactoryProc) ::
GetProcAddress
(vst3Binary->
libHandle
,
"
GetPluginFactory
"
) };
#
elif
defined (__APPLE__)
CFURLRef url {
CFURLCreateFromFileSystemRepresentation
(
kCFAllocatorDefault
, (
const
UInt8*) binaryName, (CFIndex)
std::strlen
(binaryName),
true
) };
ARA_INTERNAL_ASSERT
(url);
vst3Binary->
libHandle
=
CFBundleCreate
(
kCFAllocatorDefault
, url);
CFRelease
(url);
ARA_INTERNAL_ASSERT
(vst3Binary->
libHandle
);
Boolean
ARA_MAYBE_UNUSED_VAR
(didLoad);
didLoad =
CFBundleLoadExecutable
(vst3Binary->
libHandle
);
ARA_INTERNAL_ASSERT
(didLoad);
const
auto
initBinaryFunc { (bundleEntryPtr)
CFBundleGetFunctionPointerForName
(vst3Binary->
libHandle
,
CFSTR
(
"
bundleEntry
"
)) };
const
auto
factoryFunc { (GetFactoryProc)
CFBundleGetFunctionPointerForName
(vst3Binary->
libHandle
,
CFSTR
(
"
GetPluginFactory
"
)) };
#
elif
defined (__linux__)
vst3Binary->
libHandle
=
dlopen
(binaryName,
RTLD_LAZY
);
ARA_INTERNAL_ASSERT
(vst3Binary->
libHandle
);
const
auto
initBinaryFunc { (ModuleEntryFunc)
dlsym
(vst3Binary->
libHandle
,
"
ModuleEntry
"
) };
const
auto
factoryFunc { (GetFactoryProc)
dlsym
(vst3Binary->
libHandle
,
"
GetPluginFactory
"
) };
#
endif
ARA_INTERNAL_ASSERT
(initBinaryFunc);
bool
ARA_MAYBE_UNUSED_VAR
(entrySucceeded);
#
if
defined (_WIN32)
entrySucceeded =
initBinaryFunc
();
#
else
entrySucceeded =
initBinaryFunc
(vst3Binary->
libHandle
);
#
endif
ARA_INTERNAL_ASSERT
(entrySucceeded);
ARA_INTERNAL_ASSERT
(factoryFunc);
vst3Binary->
pluginFactory
=
factoryFunc
();
ARA_INTERNAL_ASSERT
(vst3Binary->
pluginFactory
);
#
if
ARA_VALIDATE_API_CALLS
std::vector<PClassInfo> mainFactoryClasses;
std::vector<PClassInfo> audioProcessorClasses;
#
endif
for
(int32 i =
0
; i < vst3Binary->
pluginFactory
->
countClasses
(); ++i)
{
PClassInfo classInfo;
tresult
ARA_MAYBE_UNUSED_VAR
(result);
result = vst3Binary->
pluginFactory
->
getClassInfo
(i, &classInfo);
ARA_INTERNAL_ASSERT
(result == Steinberg::
kResultOk
);
//
find and instantiate all ARA::IMainFactory classes and ensure they have unique names and IDs
if
(
std::strcmp
(
kARAMainFactoryClass
, classInfo.
category
) ==
0
)
{
#
if
ARA_VALIDATE_API_CALLS
for
(
const
auto
& mainFactoryClass : mainFactoryClasses)
{
ARA_VALIDATE_API_CONDITION
(
std::strcmp
(mainFactoryClass.
name
, classInfo.
name
) !=
0
);
ARA_VALIDATE_API_CONDITION
(!
FUnknownPrivate::iidEqual
(mainFactoryClass.
cid
, classInfo.
cid
));
}
mainFactoryClasses.
emplace_back
(classInfo);
#
endif
IPtr<
ARA
::IMainFactory> araMainFactory;
result = vst3Binary->
pluginFactory
->
createInstance
(classInfo.
cid
,
ARA
::IMainFactory::iid, (
void
**) &araMainFactory);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
ARA_INTERNAL_ASSERT
(araMainFactory);
#
if
ARA_VALIDATE_API_CALLS
//
ensure all ARAFactories are unique (address and factoryID)
const
auto
araFactory { araMainFactory->
getFactory
() };
ARA_VALIDATE_API_CONDITION
(araFactory);
for
(
auto
& otherMainFactory : vst3Binary->
araMainFactories
)
{
const
auto
otherARAFactory { otherMainFactory->
getFactory
() };
ARA_VALIDATE_API_CONDITION
(araFactory != otherARAFactory);
ARA_VALIDATE_API_CONDITION
(
std::strcmp
(araFactory->
factoryID
, otherARAFactory->
factoryID
) !=
0
);
ARA_VALIDATE_API_CONDITION
(
std::strcmp
(araFactory->
plugInName
, otherARAFactory->
plugInName
) !=
0
);
}
#
endif
vst3Binary->
araMainFactories
.
emplace_back
(
std::move
(araMainFactory));
}
#
if
ARA_VALIDATE_API_CALLS
//
find all IAudioProcessor classes and ensure they have unique names and IDs
else
if
(
std::strcmp
(
kVstAudioEffectClass
, classInfo.
category
) ==
0
)
{
for
(
const
auto
& audioProcessorClass : audioProcessorClasses)
{
ARA_VALIDATE_API_CONDITION
(
std::strcmp
(audioProcessorClass.
name
, classInfo.
name
) !=
0
);
ARA_VALIDATE_API_CONDITION
(!
FUnknownPrivate::iidEqual
(audioProcessorClass.
cid
, classInfo.
cid
));
}
audioProcessorClasses.
emplace_back
(classInfo);
}
#
endif
}
//
verify we've found at least as many audio processor classes as we've found ARA main factories
ARA_VALIDATE_API_CONDITION
(audioProcessorClasses.
size
() >= mainFactoryClasses.
size
());
#
if
ARA_VALIDATE_API_CALLS
//
if multiple processors in same binary, verify there's a matchingly named IAudioProcessor class for each ARA::IMainFactory class
vst3Binary->
hasMultiplePlugIns
= audioProcessorClasses.
size
() >
1
;
if
(vst3Binary->
hasMultiplePlugIns
)
{
for
(
const
auto
& mainFactoryClass : mainFactoryClasses)
{
bool
foundMatchingClass {
false
};
for
(
const
auto
& audioProcessorClass : audioProcessorClasses)
{
if
(
std::strcmp
(audioProcessorClass.
name
, mainFactoryClass.
name
) ==
0
)
{
ARA_VALIDATE_API_CONDITION
((!foundMatchingClass) &&
"
found multiple IAudioProcessor classes with same name
"
);
foundMatchingClass =
true
;
//
here we could create an instances of the audioProcessorClass to validate it
//
returns the same ARAFactory, but this will be validated later in
//
VST3BindToARADocumentController () to avoid creating a component instance here.
}
}
ARA_VALIDATE_API_CONDITION
(foundMatchingClass &&
"
found no IAudioProcessor class for given ARA::IMainFactory class by name
"
);
}
}
#
endif
return
vst3Binary;
}
const
ARA
::ARAFactory*
VST3GetARAFactory
(VST3Binary vst3Binary,
const
char
* optionalPlugInName)
{
if
(vst3Binary->
araMainFactories
.
empty
())
return
nullptr
;
if
(!optionalPlugInName)
return
vst3Binary->
araMainFactories
.
front
()->
getFactory
();
for
(
auto
& araMainFactory : vst3Binary->
araMainFactories
)
{
const
auto
araFactory { araMainFactory->
getFactory
() };
if
(
std::strcmp
(optionalPlugInName, araFactory->
plugInName
) ==
0
)
return
araFactory;
}
return
nullptr
;
}
VST3Effect
VST3CreateEffect
(VST3Binary vst3Binary,
const
char
* optionalPlugInName)
{
for
(int32 i =
0
; i < vst3Binary->
pluginFactory
->
countClasses
(); ++i)
{
PClassInfo classInfo;
tresult
ARA_MAYBE_UNUSED_VAR
(result);
result = vst3Binary->
pluginFactory
->
getClassInfo
(i, &classInfo);
ARA_INTERNAL_ASSERT
(result == Steinberg::
kResultOk
);
if
(
std::strcmp
(
kVstAudioEffectClass
, classInfo.
category
) ==
0
)
{
if
(optionalPlugInName && (
std::strcmp
(optionalPlugInName, classInfo.
name
) !=
0
))
continue
;
//
create only the component part for the purpose of this test code (skipping controller part)
IPtr<IComponent> component;
result = vst3Binary->
pluginFactory
->
createInstance
(classInfo.
cid
, IComponent::iid, (
void
**) &component);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
ARA_INTERNAL_ASSERT
(component);
result = component->
initialize
(
nullptr
);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
#
if
ARA_VALIDATE_API_CALLS
return
new
_VST3Effect { component,
0
, vst3Binary, classInfo.
name
};
#
else
return
new
_VST3Effect { component,
0
};
#
endif
}
}
ARA_INTERNAL_ASSERT
(
false
);
return
nullptr
;
}
const
ARA
::ARAPlugInExtensionInstance*
VST3BindToARADocumentController
(VST3Effect vst3Effect,
ARA
::ARADocumentControllerRef controllerRef,
ARA
::ARAPlugInInstanceRoleFlags assignedRoles)
{
FUnknownPtr<
ARA
::IPlugInEntryPoint> entry { vst3Effect->
component
};
ARA_INTERNAL_ASSERT
(entry);
//
both ARA::IMainFactory and the associated ARA::IPlugInEntryPoint must return the same underlying ARAFactory
#
if
ARA_VALIDATE_API_CALLS
const
auto
araFactory {
VST3GetARAFactory
(vst3Effect->
binary
, (vst3Effect->
binary
->
hasMultiplePlugIns
) ? vst3Effect->
className
.
c_str
() :
nullptr
) };
ARA_VALIDATE_API_CONDITION
(araFactory &&
"
could not find matching ARA::IMainFactory for given IAudioProcessor
"
);
if
(entry->
getFactory
() != araFactory)
ARA_VALIDATE_API_CONDITION
(
std::strcmp
(entry->
getFactory
()->
factoryID
, araFactory->
factoryID
) ==
0
);
//
class name must match plug-in name in factory
ARA_VALIDATE_API_CONDITION
(
std::strcmp
(entry->
getFactory
()->
plugInName
, vst3Effect->
className
.
c_str
()) ==
0
);
#
endif
constexpr
ARA
::ARAPlugInInstanceRoleFlags knownRoles {
ARA
::
kARAPlaybackRendererRole
|
ARA
::
kARAEditorRendererRole
|
ARA
::
kARAEditorViewRole
};
ARA_INTERNAL_ASSERT
((assignedRoles | knownRoles) == knownRoles);
if
(FUnknownPtr<
ARA
::IPlugInEntryPoint2> entry2 { vst3Effect->
component
})
{
if
(
auto
result = entry2->
bindToDocumentControllerWithRoles
(controllerRef, knownRoles, assignedRoles))
return
result;
}
#
if
defined (ARA_SUPPORT_VERSION_1) && (ARA_SUPPORT_VERSION_1)
ARA_INTERNAL_ASSERT
(assignedRoles == knownRoles);
return
entry->
bindToDocumentController
(controllerRef);
#
else
ARA_INTERNAL_ASSERT
(
false
);
return
nullptr
;
#
endif
}
void
VST3StartRendering
(VST3Effect vst3Effect,
int32_t
channelCount,
int32_t
maxBlockSize,
double
sampleRate)
{
FUnknownPtr<IAudioProcessor> processor { vst3Effect->
component
};
ARA_INTERNAL_ASSERT
(processor);
ARA_INTERNAL_ASSERT
(vst3Effect->
channelCount
==
0
);
vst3Effect->
channelCount
= channelCount;
ProcessSetup setup = {
kRealtime
,
kSample32
, maxBlockSize, sampleRate };
tresult
ARA_MAYBE_UNUSED_VAR
(result);
result = processor->
setupProcessing
(setup);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
SpeakerArrangement arrangement;
switch
(channelCount)
{
default
:
{
ARA_INTERNAL_ASSERT
(
false
&&
"
no default format defined for given channel count
"
);
//
no break; intended here
}
case
1
: arrangement = SpeakerArr::
kMono
;
break
;
case
2
: arrangement = SpeakerArr::
kStereo
;
break
;
case
3
: arrangement = SpeakerArr::k30Music;
break
;
case
4
: arrangement = SpeakerArr::k40Music;
break
;
case
5
: arrangement = SpeakerArr::k50;
break
;
case
6
: arrangement = SpeakerArr::k51;
break
;
case
7
: arrangement = SpeakerArr::k61Music;
break
;
case
8
: arrangement = SpeakerArr::k71Music;
break
;
case
9
: arrangement = SpeakerArr::k81Music;
break
;
}
SpeakerArrangement inputs = arrangement;
SpeakerArrangement outputs = arrangement;
result = processor->
setBusArrangements
(&inputs,
1
, &outputs,
1
);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
result = vst3Effect->
component
->
activateBus
(
kAudio
,
kInput
,
0
,
true
);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
result = vst3Effect->
component
->
activateBus
(
kAudio
,
kOutput
,
0
,
true
);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
result = vst3Effect->
component
->
setActive
(
true
);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
}
void
VST3RenderBuffer
(VST3Effect vst3Effect,
int32_t
blockSize,
double
sampleRate,
int64_t
samplePosition,
float
** buffers)
{
FUnknownPtr<IAudioProcessor> processor { vst3Effect->
component
};
ARA_INTERNAL_ASSERT
(processor);
for
(
int32_t
i =
0
; i < vst3Effect->
channelCount
; ++i)
memset
(buffers[i],
0
,
static_cast
<
size_t
> (blockSize) *
sizeof
(
float
));
AudioBusBuffers inputs;
inputs.
numChannels
= vst3Effect->
channelCount
;
inputs.
silenceFlags
=
0xFFFFFFFFFFFFFFFFU
;
inputs.
channelBuffers32
= buffers;
AudioBusBuffers outputs;
outputs.
numChannels
= vst3Effect->
channelCount
;
outputs.
silenceFlags
=
0
;
outputs.
channelBuffers32
= buffers;
//
in order for an ARA playback renderer to produce output, it must be set to playback mode (in stop, only editor renderers are active)
//
thus we implement some crude, minimal transport information here.
ProcessContext context {};
context.
state
= ProcessContext::
kPlaying
;
context.
sampleRate
= sampleRate;
context.
projectTimeSamples
= samplePosition;
ProcessData data;
data.
processMode
=
kRealtime
;
data.
symbolicSampleSize
=
kSample32
;
data.
numSamples
= blockSize;
data.
numInputs
=
1
;
data.
numOutputs
=
1
;
data.
inputs
= &inputs;
data.
outputs
= &outputs;
data.
processContext
= &context;
tresult
ARA_MAYBE_UNUSED_VAR
(result);
result = processor->
process
(data);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
}
void
VST3StopRendering
(VST3Effect vst3Effect)
{
ARA_INTERNAL_ASSERT
(vst3Effect->
channelCount
!=
0
);
tresult
ARA_MAYBE_UNUSED_VAR
(result);
result = vst3Effect->
component
->
setActive
(
false
);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
result = vst3Effect->
component
->
activateBus
(
kAudio
,
kInput
,
0
,
false
);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
result = vst3Effect->
component
->
activateBus
(
kAudio
,
kOutput
,
0
,
false
);
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
vst3Effect->
channelCount
=
0
;
}
void
VST3DestroyEffect
(VST3Effect vst3Effect)
{
tresult
ARA_MAYBE_UNUSED_VAR
(result);
result = vst3Effect->
component
->
terminate
();
ARA_INTERNAL_ASSERT
(result ==
kResultOk
);
vst3Effect->
component
=
nullptr
;
delete
vst3Effect;
}
void
VST3UnloadBinary
(VST3Binary vst3Binary)
{
vst3Binary->
araMainFactories
.
clear
();
vst3Binary->
pluginFactory
=
nullptr
;
#
if
defined (_WIN32)
((ExitModuleProc) ::
GetProcAddress
(vst3Binary->
libHandle
,
"
ExitDll
"
)) ();
FreeLibrary
(vst3Binary->
libHandle
);
#
elif
defined (__APPLE__)
((bundleExitPtr)
CFBundleGetFunctionPointerForName
(vst3Binary->
libHandle
,
CFSTR
(
"
bundleExit
"
))) ();
CFRelease
(vst3Binary->
libHandle
);
#
elif
defined (__linux__)
((ModuleExitFunc)
dlsym
(vst3Binary->
libHandle
,
"
ModuleExit
"
)) ();
dlclose
(vst3Binary->
libHandle
);
#
endif
delete
vst3Binary;
}
Back
|
FazBrowse Home
|
New Git URL