summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/client/DeprecatedLoader.cpp2
-rw-r--r--src/libs/client/OSCClientReceiver.cpp4
-rw-r--r--src/libs/client/OSCEngineSender.cpp6
-rw-r--r--src/libs/client/OSCEngineSender.hpp4
-rw-r--r--src/libs/client/SigClientInterface.hpp4
-rw-r--r--src/libs/client/ThreadedSigClientInterface.hpp4
-rw-r--r--src/libs/engine/ClientBroadcaster.cpp4
-rw-r--r--src/libs/engine/OSCClientSender.cpp4
-rw-r--r--src/libs/engine/OSCClientSender.hpp8
-rw-r--r--src/libs/engine/OSCEngineReceiver.cpp8
-rw-r--r--src/libs/engine/OSCEngineReceiver.hpp2
-rw-r--r--src/libs/engine/ObjectSender.cpp2
-rw-r--r--src/libs/engine/QueuedEngineInterface.cpp4
-rw-r--r--src/libs/engine/QueuedEngineInterface.hpp4
-rw-r--r--src/libs/gui/NewSubpatchWindow.cpp2
-rw-r--r--src/libs/gui/ThreadedLoader.cpp11
-rw-r--r--src/libs/serialisation/Loader.cpp2
17 files changed, 41 insertions, 34 deletions
diff --git a/src/libs/client/DeprecatedLoader.cpp b/src/libs/client/DeprecatedLoader.cpp
index d064830b..6b44fcf8 100644
--- a/src/libs/client/DeprecatedLoader.cpp
+++ b/src/libs/client/DeprecatedLoader.cpp
@@ -299,7 +299,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
// Create it, if we're not merging
if (!existing && path != "/") {
- _engine->create_patch(path, poly);
+ _engine->new_patch(path, poly);
for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
_engine->set_variable(path, i->first, i->second);
}
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 3f5447d0..00c5c28f 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -238,7 +238,7 @@ OSCClientReceiver::_connection_cb(const char* path, const char* types, lo_arg**
const char* const src_port_path = &argv[0]->s;
const char* const dst_port_path = &argv[1]->s;
- connection(src_port_path, dst_port_path);
+ connect(src_port_path, dst_port_path);
return 0;
}
@@ -250,7 +250,7 @@ OSCClientReceiver::_disconnection_cb(const char* path, const char* types, lo_arg
const char* src_port_path = &argv[0]->s;
const char* dst_port_path = &argv[1]->s;
- disconnection(src_port_path, dst_port_path);
+ disconnect(src_port_path, dst_port_path);
return 0;
}
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index 412cb5cd..44149865 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -183,11 +183,11 @@ OSCEngineSender::quit()
// Object commands
void
-OSCEngineSender::create_patch(const string& path,
- uint32_t poly)
+OSCEngineSender::new_patch(const string& path,
+ uint32_t poly)
{
assert(_engine_addr);
- lo_send(_engine_addr, "/ingen/create_patch", "isi",
+ lo_send(_engine_addr, "/ingen/new_patch", "isi",
next_id(),
path.c_str(),
poly);
diff --git a/src/libs/client/OSCEngineSender.hpp b/src/libs/client/OSCEngineSender.hpp
index dfbdff62..bb935d7a 100644
--- a/src/libs/client/OSCEngineSender.hpp
+++ b/src/libs/client/OSCEngineSender.hpp
@@ -73,8 +73,8 @@ public:
// Object commands
- void create_patch(const string& path,
- uint32_t poly);
+ void new_patch(const string& path,
+ uint32_t poly);
void create_port(const string& path,
const string& data_type,
diff --git a/src/libs/client/SigClientInterface.hpp b/src/libs/client/SigClientInterface.hpp
index 858ea3e6..1fed9e65 100644
--- a/src/libs/client/SigClientInterface.hpp
+++ b/src/libs/client/SigClientInterface.hpp
@@ -116,7 +116,7 @@ protected:
void polyphonic(const string& path, bool polyphonic)
{ if (_enabled) signal_polyphonic.emit(path, polyphonic); }
- void connection(const string& src_port_path, const string& dst_port_path)
+ void connect(const string& src_port_path, const string& dst_port_path)
{ if (_enabled) signal_connection.emit(src_port_path, dst_port_path); }
void object_destroyed(const string& path)
@@ -137,7 +137,7 @@ protected:
void object_renamed(const string& old_path, const string& new_path)
{ if (_enabled) signal_object_renamed.emit(old_path, new_path); }
- void disconnection(const string& src_port_path, const string& dst_port_path)
+ void disconnect(const string& src_port_path, const string& dst_port_path)
{ if (_enabled) signal_disconnection.emit(src_port_path, dst_port_path); }
void variable_change(const string& path, const string& key, const Raul::Atom& value)
diff --git a/src/libs/client/ThreadedSigClientInterface.hpp b/src/libs/client/ThreadedSigClientInterface.hpp
index 2dab8897..63a35b59 100644
--- a/src/libs/client/ThreadedSigClientInterface.hpp
+++ b/src/libs/client/ThreadedSigClientInterface.hpp
@@ -106,7 +106,7 @@ public:
void polyphonic(const string& path, bool polyphonic)
{ push_sig(sigc::bind(polyphonic_slot, path, polyphonic)); }
- void connection(const string& src_port_path, const string& dst_port_path)
+ void connect(const string& src_port_path, const string& dst_port_path)
{ push_sig(sigc::bind(connection_slot, src_port_path, dst_port_path)); }
void object_destroyed(const string& path)
@@ -127,7 +127,7 @@ public:
void object_renamed(const string& old_path, const string& new_path)
{ push_sig(sigc::bind(object_renamed_slot, old_path, new_path)); }
- void disconnection(const string& src_port_path, const string& dst_port_path)
+ void disconnect(const string& src_port_path, const string& dst_port_path)
{ push_sig(sigc::bind(disconnection_slot, src_port_path, dst_port_path)); }
void variable_change(const string& path, const string& key, const Raul::Atom& value)
diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp
index 34f34933..23b841c0 100644
--- a/src/libs/engine/ClientBroadcaster.cpp
+++ b/src/libs/engine/ClientBroadcaster.cpp
@@ -180,7 +180,7 @@ void
ClientBroadcaster::send_connection(const SharedPtr<const ConnectionImpl> c)
{
for (Clients::const_iterator i = _clients.begin(); i != _clients.end(); ++i)
- (*i).second->connection(c->src_port()->path(), c->dst_port()->path());
+ (*i).second->connect(c->src_port()->path(), c->dst_port()->path());
}
@@ -188,7 +188,7 @@ void
ClientBroadcaster::send_disconnection(const string& src_port_path, const string& dst_port_path)
{
for (Clients::const_iterator i = _clients.begin(); i != _clients.end(); ++i)
- (*i).second->disconnection(src_port_path, dst_port_path);
+ (*i).second->disconnect(src_port_path, dst_port_path);
}
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp
index 3b853571..2139a49a 100644
--- a/src/libs/engine/OSCClientSender.cpp
+++ b/src/libs/engine/OSCClientSender.cpp
@@ -426,7 +426,7 @@ OSCClientSender::patch_polyphony(const std::string& patch_path, uint32_t poly)
* \arg \b dst-path (string) - Path of the destination port</p> \n \n
*/
void
-OSCClientSender::connection(const std::string& src_port_path, const std::string& dst_port_path)
+OSCClientSender::connect(const std::string& src_port_path, const std::string& dst_port_path)
{
send("/ingen/new_connection", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END);
}
@@ -438,7 +438,7 @@ OSCClientSender::connection(const std::string& src_port_path, const std::string&
* \arg \b dst-path (string) - Path of the destination port</p> \n \n
*/
void
-OSCClientSender::disconnection(const std::string& src_port_path, const std::string& dst_port_path)
+OSCClientSender::disconnect(const std::string& src_port_path, const std::string& dst_port_path)
{
send("/ingen/disconnection", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END);
}
diff --git a/src/libs/engine/OSCClientSender.hpp b/src/libs/engine/OSCClientSender.hpp
index cd2264df..d102790d 100644
--- a/src/libs/engine/OSCClientSender.hpp
+++ b/src/libs/engine/OSCClientSender.hpp
@@ -109,11 +109,11 @@ public:
virtual void object_renamed(const std::string& old_path,
const std::string& new_path);
- virtual void connection(const std::string& src_port_path,
- const std::string& dst_port_path);
+ virtual void connect(const std::string& src_port_path,
+ const std::string& dst_port_path);
- virtual void disconnection(const std::string& src_port_path,
- const std::string& dst_port_path);
+ virtual void disconnect(const std::string& src_port_path,
+ const std::string& dst_port_path);
virtual void variable_change(const std::string& subject_path,
const std::string& predicate,
diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp
index ca035a7f..5c1318cd 100644
--- a/src/libs/engine/OSCEngineReceiver.cpp
+++ b/src/libs/engine/OSCEngineReceiver.cpp
@@ -86,7 +86,7 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t
lo_server_add_method(_server, "/ingen/load_plugins", "i", load_plugins_cb, this);
lo_server_add_method(_server, "/ingen/activate", "i", engine_activate_cb, this);
lo_server_add_method(_server, "/ingen/deactivate", "i", engine_deactivate_cb, this);
- lo_server_add_method(_server, "/ingen/create_patch", "isi", create_patch_cb, this);
+ lo_server_add_method(_server, "/ingen/new_patch", "isi", new_patch_cb, this);
lo_server_add_method(_server, "/ingen/enable_patch", "is", enable_patch_cb, this);
lo_server_add_method(_server, "/ingen/disable_patch", "is", disable_patch_cb, this);
lo_server_add_method(_server, "/ingen/clear_patch", "is", clear_patch_cb, this);
@@ -373,18 +373,18 @@ OSCEngineReceiver::_engine_deactivate_cb(const char* path, const char* types, lo
/** \page engine_osc_namespace
- * <p> \b /ingen/create_patch - Creates a new, empty, toplevel patch.
+ * <p> \b /ingen/new_patch - Creates a new, empty, toplevel patch.
* \arg \b response-id (integer)
* \arg \b patch-path (string) - Patch path (complete, ie /master/parent/new_patch)
* \arg \b poly (integer) - Patch's (internal) polyphony </p> \n \n
*/
int
-OSCEngineReceiver::_create_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_new_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
const int32_t poly = argv[2]->i;
- create_patch(patch_path, poly);
+ new_patch(patch_path, poly);
return 0;
}
diff --git a/src/libs/engine/OSCEngineReceiver.hpp b/src/libs/engine/OSCEngineReceiver.hpp
index a998054f..006192bf 100644
--- a/src/libs/engine/OSCEngineReceiver.hpp
+++ b/src/libs/engine/OSCEngineReceiver.hpp
@@ -93,7 +93,7 @@ private:
LO_HANDLER(load_plugins);
LO_HANDLER(engine_activate);
LO_HANDLER(engine_deactivate);
- LO_HANDLER(create_patch);
+ LO_HANDLER(new_patch);
LO_HANDLER(rename);
LO_HANDLER(create_port);
LO_HANDLER(create_node);
diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp
index 67bd41d2..47312226 100644
--- a/src/libs/engine/ObjectSender.cpp
+++ b/src/libs/engine/ObjectSender.cpp
@@ -69,7 +69,7 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r
// Send connections
for (PatchImpl::Connections::const_iterator j = patch->connections().begin();
j != patch->connections().end(); ++j)
- client->connection((*j)->src_port_path(), (*j)->dst_port_path());
+ client->connect((*j)->src_port_path(), (*j)->dst_port_path());
}
}
diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp
index 988093aa..3aa96aee 100644
--- a/src/libs/engine/QueuedEngineInterface.cpp
+++ b/src/libs/engine/QueuedEngineInterface.cpp
@@ -138,8 +138,8 @@ QueuedEngineInterface::bundle_end()
// Object commands
void
-QueuedEngineInterface::create_patch(const string& path,
- uint32_t poly)
+QueuedEngineInterface::new_patch(const string& path,
+ uint32_t poly)
{
push_queued(new CreatePatchEvent(_engine, _responder, now(), path, poly));
}
diff --git a/src/libs/engine/QueuedEngineInterface.hpp b/src/libs/engine/QueuedEngineInterface.hpp
index adf6d263..e8a8669d 100644
--- a/src/libs/engine/QueuedEngineInterface.hpp
+++ b/src/libs/engine/QueuedEngineInterface.hpp
@@ -81,8 +81,8 @@ public:
// Object commands
- virtual void create_patch(const string& path,
- uint32_t poly);
+ virtual void new_patch(const string& path,
+ uint32_t poly);
virtual void create_port(const string& path,
const string& data_type,
diff --git a/src/libs/gui/NewSubpatchWindow.cpp b/src/libs/gui/NewSubpatchWindow.cpp
index e33c9f2e..90e6c911 100644
--- a/src/libs/gui/NewSubpatchWindow.cpp
+++ b/src/libs/gui/NewSubpatchWindow.cpp
@@ -92,7 +92,7 @@ NewSubpatchWindow::ok_clicked()
const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text());
const uint32_t poly = _poly_spinbutton->get_value_as_int();
- App::instance().engine()->create_patch(path, poly);
+ App::instance().engine()->new_patch(path, poly);
for (GraphObject::Variables::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
App::instance().engine()->set_variable(path, i->first, i->second);
diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp
index 94c517a8..c2ba9307 100644
--- a/src/libs/gui/ThreadedLoader.cpp
+++ b/src/libs/gui/ThreadedLoader.cpp
@@ -19,6 +19,7 @@
#include <string>
#include "module/global.hpp"
#include "module/World.hpp"
+#include "module/Module.hpp"
#include "client/PatchModel.hpp"
#include "App.hpp"
#include "ThreadedLoader.hpp"
@@ -34,9 +35,15 @@ ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine)
, _deprecated_loader(engine)
{
set_name("Loader");
-
+
// FIXME: rework this so the thread is only present when it's doing something (save mem)
- if (App::instance().world()->serialisation_module) {
+ // and module isn't loaded until required
+
+ World* world = App::instance().world();
+ if (!world->serialisation_module)
+ world->serialisation_module = Ingen::Shared::load_module("ingen_serialisation");
+
+ if (world->serialisation_module) {
Loader* (*new_loader)() = NULL;
bool found = App::instance().world()->serialisation_module->get_symbol(
diff --git a/src/libs/serialisation/Loader.cpp b/src/libs/serialisation/Loader.cpp
index 0bfed964..c9b01bf8 100644
--- a/src/libs/serialisation/Loader.cpp
+++ b/src/libs/serialisation/Loader.cpp
@@ -112,7 +112,7 @@ Loader::load(Ingen::Shared::World* world,
cout << " as " << patch_path << endl;
if (patch_path != "/")
- world->engine->create_patch(patch_path, patch_poly);
+ world->engine->new_patch(patch_path, patch_poly);
/* Set document metadata (so File->Save doesn't prompt)
* FIXME: This needs some thinking for multiple clients... */