summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/NodeModel.cpp2
-rw-r--r--src/libs/client/PluginModel.cpp4
-rw-r--r--src/libs/client/PluginModel.hpp9
3 files changed, 15 insertions, 0 deletions
diff --git a/src/libs/client/NodeModel.cpp b/src/libs/client/NodeModel.cpp
index c7b38ceb..8c5892e7 100644
--- a/src/libs/client/NodeModel.cpp
+++ b/src/libs/client/NodeModel.cpp
@@ -151,6 +151,8 @@ NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max)
{
assert(port->parent().get() == this);
+ Glib::Mutex::Lock(PluginModel::rdf_world()->mutex());
+
// FIXME: cache these values
// Plugin value first
diff --git a/src/libs/client/PluginModel.cpp b/src/libs/client/PluginModel.cpp
index 1e6729d6..10c767ff 100644
--- a/src/libs/client/PluginModel.cpp
+++ b/src/libs/client/PluginModel.cpp
@@ -28,6 +28,8 @@ namespace Client {
SLV2World PluginModel::_slv2_world = NULL;
SLV2Plugins PluginModel::_slv2_plugins = NULL;
#endif
+
+Raul::RDF::World* PluginModel::_rdf_world = NULL;
string
@@ -56,6 +58,8 @@ PluginModel::gui()
{
assert(_type == LV2);
+ Glib::Mutex::Lock(_rdf_world->mutex());
+
SLV2Values gui = slv2_plugin_get_guis(_slv2_plugin);
if (slv2_values_size(gui) > 0) {
printf("\tGUI:\n");
diff --git a/src/libs/client/PluginModel.hpp b/src/libs/client/PluginModel.hpp
index a8d420b8..ba5598c0 100644
--- a/src/libs/client/PluginModel.hpp
+++ b/src/libs/client/PluginModel.hpp
@@ -23,6 +23,7 @@
#include <iostream>
#include <raul/Path.hpp>
#include <raul/SharedPtr.hpp>
+#include <raul/RDFWorld.hpp>
#ifdef HAVE_SLV2
#include <slv2/slv2.h>
#endif
@@ -109,6 +110,12 @@ public:
void* gui();
#endif
+ static void set_rdf_world(Raul::RDF::World& world) {
+ _rdf_world = &world;
+ }
+
+ static Raul::RDF::World* rdf_world() { return _rdf_world; }
+
private:
Type _type;
string _uri;
@@ -120,6 +127,8 @@ private:
SLV2Plugin _slv2_plugin;
#endif
+
+ static Raul::RDF::World* _rdf_world;
};