فهرست منبع

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.
PatTheMav 3 سال پیش
والد
کامیت
4a73b01581

+ 1 - 0
plugins/obs-vst/headers/VSTPlugin.h

@@ -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();

+ 5 - 0
plugins/obs-vst/linux/VSTPlugin-linux.cpp

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

+ 5 - 0
plugins/obs-vst/mac/VSTPlugin-osx.mm

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

+ 5 - 0
plugins/obs-vst/win/VSTPlugin-win.cpp

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