Audacity 3.2.0
Public Member Functions | Static Public Member Functions | List of all members
AudacityVst3HostApplication Class Referencefinal

#include <AudacityVst3HostApplication.h>

Inheritance diagram for AudacityVst3HostApplication:
[legend]
Collaboration diagram for AudacityVst3HostApplication:
[legend]

Public Member Functions

DECLARE_FUNKNOWN_METHODS AudacityVst3HostApplication ()
 
virtual ~AudacityVst3HostApplication ()
 
Steinberg::tresult PLUGIN_API getName (Steinberg::Vst::String128 name) override
 
Steinberg::tresult PLUGIN_API createInstance (Steinberg::TUID cid, Steinberg::TUID _iid, void **obj) override
 
Steinberg::tresult PLUGIN_API isPlugInterfaceSupported (const Steinberg::TUID _iid) override
 

Static Public Member Functions

static IHostApplication & Get ()
 

Detailed Description

Definition at line 6 of file AudacityVst3HostApplication.h.

Constructor & Destructor Documentation

◆ AudacityVst3HostApplication()

DECLARE_FUNKNOWN_METHODS AudacityVst3HostApplication::AudacityVst3HostApplication ( )

◆ ~AudacityVst3HostApplication()

AudacityVst3HostApplication::~AudacityVst3HostApplication ( )
virtual

Definition at line 274 of file AudacityVst3HostApplication.cpp.

274{ FUNKNOWN_DTOR }

Member Function Documentation

◆ createInstance()

Steinberg::tresult PLUGIN_API AudacityVst3HostApplication::createInstance ( Steinberg::TUID  cid,
Steinberg::TUID  _iid,
void **  obj 
)
override

Definition at line 311 of file AudacityVst3HostApplication.cpp.

313{
314 using namespace Steinberg;
315
316 FUID classID(FUID::fromTUID(cid));
317 FUID interfaceID(FUID::fromTUID(_iid));
318 if (classID == Vst::IMessage::iid && interfaceID == Vst::IMessage::iid)
319 {
320 *obj = safenew AudacityHostMessage;
321 return kResultTrue;
322 }
323 else if (
324 classID == Vst::IAttributeList::iid &&
325 interfaceID == Vst::IAttributeList::iid)
326 {
328 return kResultTrue;
329 }
330 *obj = nullptr;
331 return kResultFalse;
332}
#define safenew
Definition: MemoryX.h:10

References safenew.

◆ Get()

Steinberg::Vst::IHostApplication & AudacityVst3HostApplication::Get ( )
static

Definition at line 276 of file AudacityVst3HostApplication.cpp.

277{
278 static AudacityVst3HostApplication instance;
279 return instance;
280}

Referenced by VST3EffectsModule::GetModule(), and VST3Wrapper::VST3Wrapper().

Here is the caller graph for this function:

◆ getName()

Steinberg::tresult PLUGIN_API AudacityVst3HostApplication::getName ( Steinberg::Vst::String128  name)
override

Definition at line 304 of file AudacityVst3HostApplication.cpp.

305{
306 return VST3::StringConvert::convert("Audacity VST3 host application", name) ?
307 Steinberg::kResultTrue :
308 Steinberg::kInternalError;
309}
const TranslatableString name
Definition: Distortion.cpp:74

References name.

◆ isPlugInterfaceSupported()

Steinberg::tresult AudacityVst3HostApplication::isPlugInterfaceSupported ( const Steinberg::TUID  _iid)
override

Definition at line 334 of file AudacityVst3HostApplication.cpp.

336{
337 static auto supportedInterfaces = { Steinberg::Vst::IComponent::iid,
338 Steinberg::Vst::IAudioProcessor::iid,
339 Steinberg::Vst::IEditController::iid,
340 Steinberg::Vst::IConnectionPoint::iid };
341
342 auto uid = Steinberg::FUID::fromTUID(_iid);
343 if (
344 std::find(supportedInterfaces.begin(), supportedInterfaces.end(), uid) !=
345 supportedInterfaces.end())
346 return Steinberg::kResultTrue;
347 return Steinberg::kResultFalse;
348}

The documentation for this class was generated from the following files: