obs-vst: Add public function to check for load state of VST

The bundle/dllHandle/soHandle property is private, so a getter method
is needed to fetch the status of a loaded VST.
This commit is contained in:
PatTheMav 2022-09-20 14:05:43 +02:00 committed by Ryan Foster
parent e0f1f95c7a
commit 4a73b01581
4 changed files with 16 additions and 0 deletions

View file

@ -98,6 +98,7 @@ public:
void getSourceNames();
obs_audio_data *process(struct obs_audio_data *audio);
bool openInterfaceWhenActive = false;
bool vstLoaded();
bool isEditorOpen();
void onEditorClosed();

View file

@ -63,3 +63,8 @@ void VSTPlugin::unloadLibrary()
soHandle = nullptr;
}
}
bool VSTPlugin::vstLoaded()
{
return (soHandle != nullptr);
}

View file

@ -87,3 +87,8 @@ void VSTPlugin::unloadLibrary()
bundle = NULL;
}
}
bool VSTPlugin::vstLoaded()
{
return (bundle != NULL);
}

View file

@ -89,3 +89,8 @@ void VSTPlugin::unloadLibrary()
dllHandle = nullptr;
}
}
bool VSTPlugin::vstLoaded()
{
return (dllHandle != nullptr);
}