From 39d5400b39c8089287d5d294becae1268d232d31 Mon Sep 17 00:00:00 2001
From: David Robillard
Date: Wed, 7 Feb 2007 03:22:42 +0000
Subject: Mad sed-fu for consistent private member naming.
git-svn-id: http://svn.drobilla.net/lad/ingen@286 a436a847-0d15-0410-975c-d299462d15a1
---
src/libs/client/ControlModel.h | 18 +--
src/libs/client/NodeModel.cpp | 40 ++---
src/libs/client/NodeModel.h | 22 +--
src/libs/client/OSCClientReceiver.cpp | 52 +++----
src/libs/client/OSCClientReceiver.h | 11 +-
src/libs/client/OSCEngineSender.cpp | 8 +-
src/libs/client/PatchModel.cpp | 78 +++++-----
src/libs/client/PatchModel.h | 28 ++--
src/libs/client/PluginModel.h | 54 +++----
src/libs/client/PresetModel.h | 18 +--
src/libs/engine/Array.h | 60 +++----
src/libs/engine/Connection.cpp | 6 +-
src/libs/engine/Connection.h | 14 +-
src/libs/engine/Engine.cpp | 102 ++++++------
src/libs/engine/Engine.h | 44 +++---
src/libs/engine/InputPort.cpp | 152 +++++++++---------
src/libs/engine/InputPort.h | 10 +-
src/libs/engine/JackAudioDriver.cpp | 14 +-
src/libs/engine/LV2Node.cpp | 8 +-
src/libs/engine/LashDriver.cpp | 54 +++----
src/libs/engine/LashDriver.h | 10 +-
src/libs/engine/List.h | 172 ++++++++++-----------
src/libs/engine/OSCEngineReceiver.cpp | 72 ++++-----
src/libs/engine/OSCEngineReceiver.h | 4 +-
src/libs/engine/ObjectStore.cpp | 8 +-
src/libs/engine/ObjectStore.h | 4 +-
src/libs/engine/PluginLibrary.h | 24 +--
src/libs/engine/TransportNode.cpp | 12 +-
src/libs/engine/Tree.h | 74 ++++-----
src/libs/engine/TreeImplementation.h | 112 +++++++-------
src/libs/engine/TypedConnection.cpp | 38 ++---
src/libs/engine/TypedConnection.h | 28 ++--
src/libs/engine/TypedPort.cpp | 22 +--
src/libs/engine/TypedPort.h | 10 +-
src/libs/engine/events/AddNodeEvent.cpp | 88 +++++------
src/libs/engine/events/AddNodeEvent.h | 22 +--
src/libs/engine/events/AllNotesOffEvent.cpp | 16 +-
src/libs/engine/events/AllNotesOffEvent.h | 4 +-
src/libs/engine/events/ClearPatchEvent.cpp | 50 +++---
src/libs/engine/events/ClearPatchEvent.h | 6 +-
src/libs/engine/events/ConnectionEvent.cpp | 148 +++++++++---------
src/libs/engine/events/ConnectionEvent.h | 32 ++--
src/libs/engine/events/CreatePatchEvent.cpp | 80 +++++-----
src/libs/engine/events/CreatePatchEvent.h | 14 +-
src/libs/engine/events/DSSIConfigureEvent.cpp | 22 +--
src/libs/engine/events/DSSIConfigureEvent.h | 8 +-
src/libs/engine/events/DSSIControlEvent.cpp | 22 +--
src/libs/engine/events/DSSIControlEvent.h | 8 +-
src/libs/engine/events/DSSIProgramEvent.cpp | 24 +--
src/libs/engine/events/DSSIProgramEvent.h | 8 +-
src/libs/engine/events/DSSIUpdateEvent.cpp | 22 +--
src/libs/engine/events/DSSIUpdateEvent.h | 6 +-
src/libs/engine/events/DisablePatchEvent.cpp | 16 +-
src/libs/engine/events/DisablePatchEvent.h | 4 +-
src/libs/engine/events/DisconnectNodeEvent.cpp | 52 +++----
src/libs/engine/events/DisconnectNodeEvent.h | 14 +-
src/libs/engine/events/DisconnectPortEvent.cpp | 60 +++----
src/libs/engine/events/DisconnectPortEvent.h | 14 +-
src/libs/engine/events/DisconnectionEvent.cpp | 144 ++++++++---------
src/libs/engine/events/DisconnectionEvent.h | 26 ++--
src/libs/engine/events/EnablePatchEvent.cpp | 28 ++--
src/libs/engine/events/EnablePatchEvent.h | 6 +-
src/libs/engine/events/MidiLearnEvent.cpp | 22 +--
src/libs/engine/events/MidiLearnEvent.h | 16 +-
src/libs/engine/events/NoteOffEvent.cpp | 26 ++--
src/libs/engine/events/NoteOffEvent.h | 6 +-
src/libs/engine/events/NoteOnEvent.cpp | 36 ++---
src/libs/engine/events/NoteOnEvent.h | 10 +-
src/libs/engine/events/RenameEvent.cpp | 56 +++----
src/libs/engine/events/RenameEvent.h | 12 +-
src/libs/engine/events/RequestAllObjectsEvent.cpp | 6 +-
src/libs/engine/events/RequestAllObjectsEvent.h | 2 +-
src/libs/engine/events/RequestMetadataEvent.cpp | 26 ++--
src/libs/engine/events/RequestMetadataEvent.h | 10 +-
src/libs/engine/events/RequestObjectEvent.cpp | 24 +--
src/libs/engine/events/RequestObjectEvent.h | 6 +-
src/libs/engine/events/RequestPluginEvent.cpp | 16 +-
src/libs/engine/events/RequestPluginEvent.h | 6 +-
src/libs/engine/events/RequestPluginsEvent.cpp | 8 +-
src/libs/engine/events/RequestPluginsEvent.h | 4 +-
src/libs/engine/events/RequestPortValueEvent.cpp | 22 +--
src/libs/engine/events/RequestPortValueEvent.h | 8 +-
src/libs/engine/events/SetMetadataEvent.cpp | 20 +--
src/libs/engine/events/SetMetadataEvent.h | 8 +-
src/libs/engine/events/SetPortValueEvent.cpp | 54 +++----
src/libs/engine/events/SetPortValueEvent.h | 10 +-
src/libs/engine/events/SetPortValueQueuedEvent.cpp | 60 +++----
src/libs/engine/events/SetPortValueQueuedEvent.h | 10 +-
88 files changed, 1404 insertions(+), 1407 deletions(-)
(limited to 'src/libs')
diff --git a/src/libs/client/ControlModel.h b/src/libs/client/ControlModel.h
index 337acfc6..749436b5 100644
--- a/src/libs/client/ControlModel.h
+++ b/src/libs/client/ControlModel.h
@@ -32,20 +32,20 @@ class ControlModel
{
public:
ControlModel(const Path& port_path, float value)
- : m_port_path(port_path),
- m_value(value)
+ : _port_path(port_path),
+ _value(value)
{
- assert(m_port_path.find("//") == string::npos);
+ assert(_port_path.find("//") == string::npos);
}
- const Path& port_path() const { return m_port_path; }
- void port_path(const string& p) { m_port_path = p; }
- float value() const { return m_value; }
- void value(float v) { m_value = v; }
+ const Path& port_path() const { return _port_path; }
+ void port_path(const string& p) { _port_path = p; }
+ float value() const { return _value; }
+ void value(float v) { _value = v; }
private:
- Path m_port_path;
- float m_value;
+ Path _port_path;
+ float _value;
};
diff --git a/src/libs/client/NodeModel.cpp b/src/libs/client/NodeModel.cpp
index 56df1a12..c882645d 100644
--- a/src/libs/client/NodeModel.cpp
+++ b/src/libs/client/NodeModel.cpp
@@ -24,16 +24,16 @@ namespace Client {
NodeModel::NodeModel(SharedPtr plugin, const Path& path, bool polyphonic)
: ObjectModel(path),
- m_polyphonic(polyphonic),
- m_plugin_uri(plugin->uri()),
- m_plugin(plugin)
+ _polyphonic(polyphonic),
+ _plugin_uri(plugin->uri()),
+ _plugin(plugin)
{
}
NodeModel::NodeModel(const string& plugin_uri, const Path& path, bool polyphonic)
: ObjectModel(path),
- m_polyphonic(polyphonic),
- m_plugin_uri(plugin_uri)
+ _polyphonic(polyphonic),
+ _plugin_uri(plugin_uri)
{
}
@@ -47,7 +47,7 @@ NodeModel::~NodeModel()
void
NodeModel::remove_port(SharedPtr port)
{
- m_ports.remove(port);
+ _ports.remove(port);
removed_port_sig.emit(port);
}
@@ -55,9 +55,9 @@ NodeModel::remove_port(SharedPtr port)
void
NodeModel::remove_port(const Path& port_path)
{
- for (PortModelList::iterator i = m_ports.begin(); i != m_ports.end(); ++i) {
+ for (PortModelList::iterator i = _ports.begin(); i != _ports.end(); ++i) {
if ((*i)->path() == port_path) {
- m_ports.erase(i);
+ _ports.erase(i);
break;
}
}
@@ -67,8 +67,8 @@ NodeModel::remove_port(const Path& port_path)
void
NodeModel::clear()
{
- m_ports.clear();
- assert(m_ports.empty());
+ _ports.clear();
+ assert(_ports.empty());
}
@@ -80,10 +80,10 @@ NodeModel::set_path(const Path& p)
ObjectModel::set_path(p);
// FIXME: rename
-// for (PortModelList::iterator i = m_ports.begin(); i != m_ports.end(); ++i)
+// for (PortModelList::iterator i = _ports.begin(); i != _ports.end(); ++i)
// (*i)->set_path(_path + "/" + (*i)->path().name());
- //if (m_parent && old_path.length() > 0)
+ //if (_parent && old_path.length() > 0)
// parent_patch()->rename_node(old_path, p);
}
@@ -118,12 +118,12 @@ NodeModel::add_port(SharedPtr pm)
assert(pm->path().is_child_of(_path));
assert(pm->parent().get() == this);
- PortModelList::iterator existing = find(m_ports.begin(), m_ports.end(), pm);
+ PortModelList::iterator existing = find(_ports.begin(), _ports.end(), pm);
// Store should have handled this by merging the two
- assert(existing == m_ports.end());
+ assert(existing == _ports.end());
- m_ports.push_back(pm);
+ _ports.push_back(pm);
new_port_sig.emit(pm);
}
@@ -132,7 +132,7 @@ SharedPtr
NodeModel::get_port(const string& port_name) const
{
assert(port_name.find("/") == string::npos);
- for (PortModelList::const_iterator i = m_ports.begin(); i != m_ports.end(); ++i)
+ for (PortModelList::const_iterator i = _ports.begin(); i != _ports.end(); ++i)
if ((*i)->path().name() == port_name)
return (*i);
return SharedPtr();
@@ -142,16 +142,16 @@ NodeModel::get_port(const string& port_name) const
void
NodeModel::add_program(int bank, int program, const string& name)
{
- m_banks[bank][program] = name;
+ _banks[bank][program] = name;
}
void
NodeModel::remove_program(int bank, int program)
{
- m_banks[bank].erase(program);
- if (m_banks[bank].size() == 0)
- m_banks.erase(bank);
+ _banks[bank].erase(program);
+ if (_banks[bank].size() == 0)
+ _banks.erase(bank);
}
diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h
index a63932d9..77c9c985 100644
--- a/src/libs/client/NodeModel.h
+++ b/src/libs/client/NodeModel.h
@@ -49,12 +49,12 @@ public:
SharedPtr get_port(const string& port_name) const;
- const map >& get_programs() const { return m_banks; }
- const string& plugin_uri() const { return m_plugin_uri; }
- SharedPtr plugin() const { return m_plugin; }
- int num_ports() const { return m_ports.size(); }
- const PortModelList& ports() const { return m_ports; }
- virtual bool polyphonic() const { return m_polyphonic; }
+ const map >& get_programs() const { return _banks; }
+ const string& plugin_uri() const { return _plugin_uri; }
+ SharedPtr plugin() const { return _plugin; }
+ int num_ports() const { return _ports.size(); }
+ const PortModelList& ports() const { return _ports; }
+ virtual bool polyphonic() const { return _polyphonic; }
// Signals
sigc::signal > new_port_sig;
@@ -80,11 +80,11 @@ protected:
friend class PatchModel;
void set_path(const Path& p);
- bool m_polyphonic;
- PortModelList m_ports; ///< List of ports (not a map to preserve order)
- string m_plugin_uri; ///< Plugin URI (if PluginModel is unknown)
- SharedPtr m_plugin; ///< The plugin this node is an instance of
- map > m_banks; ///< DSSI banks
+ bool _polyphonic;
+ PortModelList _ports; ///< List of ports (not a map to preserve order)
+ string _plugin_uri; ///< Plugin URI (if PluginModel is unknown)
+ SharedPtr _plugin; ///< The plugin this node is an instance of
+ map > _banks; ///< DSSI banks
};
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 5b4d66d9..bdfeaa21 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -166,7 +166,7 @@ OSCClientReceiver::setup_callbacks()
/** Catches errors that aren't a direct result of a client request.
*/
int
-OSCClientReceiver::m_error_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_error_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
cerr << "ERROR: " << argv[0]->s << endl;
// FIXME
@@ -176,7 +176,7 @@ OSCClientReceiver::m_error_cb(const char* path, const char* types, lo_arg** argv
int
-OSCClientReceiver::m_new_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_new_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
new_patch(&argv[0]->s, argv[1]->i); // path, poly
return 0;
@@ -184,7 +184,7 @@ OSCClientReceiver::m_new_patch_cb(const char* path, const char* types, lo_arg**
int
-OSCClientReceiver::m_destroyed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_destroyed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
object_destroyed((const char*)&argv[0]->s);
return 0;
@@ -192,7 +192,7 @@ OSCClientReceiver::m_destroyed_cb(const char* path, const char* types, lo_arg**
int
-OSCClientReceiver::m_patch_enabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_patch_enabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_enabled((const char*)&argv[0]->s);
return 0;
@@ -200,7 +200,7 @@ OSCClientReceiver::m_patch_enabled_cb(const char* path, const char* types, lo_ar
int
-OSCClientReceiver::m_patch_disabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_patch_disabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_disabled((const char*)&argv[0]->s);
return 0;
@@ -208,7 +208,7 @@ OSCClientReceiver::m_patch_disabled_cb(const char* path, const char* types, lo_a
int
-OSCClientReceiver::m_patch_cleared_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_patch_cleared_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_cleared((const char*)&argv[0]->s);
return 0;
@@ -216,7 +216,7 @@ OSCClientReceiver::m_patch_cleared_cb(const char* path, const char* types, lo_ar
int
-OSCClientReceiver::m_object_renamed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_object_renamed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
object_renamed((const char*)&argv[0]->s, (const char*)&argv[1]->s);
return 0;
@@ -224,7 +224,7 @@ OSCClientReceiver::m_object_renamed_cb(const char* path, const char* types, lo_a
int
-OSCClientReceiver::m_connection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_connection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* const src_port_path = &argv[0]->s;
const char* const dst_port_path = &argv[1]->s;
@@ -236,7 +236,7 @@ OSCClientReceiver::m_connection_cb(const char* path, const char* types, lo_arg**
int
-OSCClientReceiver::m_disconnection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_disconnection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* src_port_path = &argv[0]->s;
const char* dst_port_path = &argv[1]->s;
@@ -250,7 +250,7 @@ OSCClientReceiver::m_disconnection_cb(const char* path, const char* types, lo_ar
/** Notification of a new node creation.
*/
int
-OSCClientReceiver::m_new_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_new_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* uri = &argv[0]->s;
const char* node_path = &argv[1]->s;
@@ -276,7 +276,7 @@ OSCClientReceiver::m_new_node_cb(const char* path, const char* types, lo_arg** a
/** Notification of a new port creation.
*/
int
-OSCClientReceiver::m_new_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_new_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[0]->s;
const char* type = &argv[1]->s;
@@ -312,17 +312,17 @@ OSCClientReceiver::m_new_port_cb(const char* path, const char* types, lo_arg** a
PortModel* port_model = new PortModel(port_path, ptype, pdir, phint, default_val, min_val, max_val);
*/
PortModel* port_model = new PortModel(port_path, ptype, pdir);
- if (m_receiving_node) {
- assert(m_receiving_node_model);
- m_receiving_node_model->add_port(port_model);
+ if (_receiving_node) {
+ assert(_receiving_node_model);
+ _receiving_node_model->add_port(port_model);
++m_num_received_ports;
// If transmission is done, send new node to client
- if (m_num_received_ports == m_receiving_node_num_ports) {
- new_node_model(m_receiving_node_model);
- m_receiving_node = false;
- m_receiving_node_model = NULL;
- m_num_received_ports = 0;
+ if (_num_received_ports == _receiving_node_num_ports) {
+ new_node_model(_receiving_node_model);
+ _receiving_node = false;
+ _receiving_node_model = NULL;
+ _num_received_ports = 0;
}
} else {
new_port_model(port_model);
@@ -336,7 +336,7 @@ OSCClientReceiver::m_new_port_cb(const char* path, const char* types, lo_arg** a
/** Notification of a new or updated piece of metadata.
*/
int
-OSCClientReceiver::m_metadata_update_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_metadata_update_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
if (argc != 3 || types[0] != 's' || types[1] != 's')
return 1;
@@ -353,7 +353,7 @@ OSCClientReceiver::m_metadata_update_cb(const char* path, const char* types, lo_
int
-OSCClientReceiver::m_control_change_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_control_change_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* const port_path = &argv[0]->s;
const float value = argv[1]->f;
@@ -365,7 +365,7 @@ OSCClientReceiver::m_control_change_cb(const char* path, const char* types, lo_a
int
-OSCClientReceiver::m_response_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_response_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
assert(!strcmp(types, "iis"));
response(argv[0]->i, argv[1]->i, &argv[2]->s);
@@ -378,7 +378,7 @@ OSCClientReceiver::m_response_cb(const char* path, const char* types, lo_arg** a
* to a /om/send_plugins
*/
int
-OSCClientReceiver::m_num_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_num_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
num_plugins(argv[0]->i);
@@ -389,7 +389,7 @@ OSCClientReceiver::m_num_plugins_cb(const char* path, const char* types, lo_arg*
/** A plugin info response from the server, in response to a /send_plugins
*/
int
-OSCClientReceiver::m_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
assert(argc == 3 && !strcmp(types, "sss"));
new_plugin(&argv[0]->s, &argv[1]->s, &argv[2]->s); // type, uri
@@ -399,7 +399,7 @@ OSCClientReceiver::m_plugin_cb(const char* path, const char* types, lo_arg** arg
int
-OSCClientReceiver::m_program_add_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_program_add_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[0]->s;
int32_t bank = argv[1]->i;
@@ -413,7 +413,7 @@ OSCClientReceiver::m_program_add_cb(const char* path, const char* types, lo_arg*
int
-OSCClientReceiver::m_program_remove_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_program_remove_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[0]->s;
int32_t bank = argv[1]->i;
diff --git a/src/libs/client/OSCClientReceiver.h b/src/libs/client/OSCClientReceiver.h
index 0031441f..a287932d 100644
--- a/src/libs/client/OSCClientReceiver.h
+++ b/src/libs/client/OSCClientReceiver.h
@@ -37,9 +37,9 @@ namespace Client {
* wrapper around a non-static method that does the real work. Makes a whoole
* lot of ugly boiler plate go away */
#define LO_HANDLER(name) \
-int m_##name##_cb (LO_HANDLER_ARGS);\
+int _##name##_cb (LO_HANDLER_ARGS);\
inline static int name##_cb(LO_HANDLER_ARGS, void* osc_listener)\
-{ return ((OSCClientReceiver*)osc_listener)->m_##name##_cb(path, types, argv, argc, msg); }
+{ return ((OSCClientReceiver*)osc_listener)->_##name##_cb(path, types, argv, argc, msg); }
/** Callbacks for "notification band" OSC messages.
@@ -77,12 +77,7 @@ private:
static void error_cb(int num, const char* msg, const char* path);
static int generic_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data);
static int unknown_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* osc_receiver);
- /*
- inline static int om_response_ok_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* comm);
- int m_om_response_ok_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data);
- inline static int om_response_error_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* comm);
- int m_om_response_error_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data);
-*/
+
int _listen_port;
lo_server_thread _st;
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index fce24116..f93e3636 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -58,8 +58,8 @@ OSCEngineSender::attach(int32_t ping_id, bool block)
//start_listen_thread(_client_port);
/*if (engine_url == "") {
- string local_url = m_osc_listener->listen_url().substr(
- 0, m_osc_listener->listen_url().find_last_of(":"));
+ string local_url = _osc_listener->listen_url().substr(
+ 0, _osc_listener->listen_url().find_last_of(":"));
local_url.append(":16180");
_engine_addr = lo_address_new_from_url(local_url.c_str());
} else {
@@ -82,14 +82,14 @@ OSCEngineSender::attach(int32_t ping_id, bool block)
set_wait_response_id(request_id);
while (1) {
- if (m_response_semaphore.try_wait() != 0) {
+ if (_response_semaphore.try_wait() != 0) {
cout << ".";
cout.flush();
ping(request_id);
usleep(100000);
} else {
cout << " connected." << endl;
- m_waiting_for_response = false;
+ _waiting_for_response = false;
break;
}
}
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp
index 61dbe0a0..c05f7217 100644
--- a/src/libs/client/PatchModel.cpp
+++ b/src/libs/client/PatchModel.cpp
@@ -36,13 +36,13 @@ PatchModel::set_path(const Path& new_path)
}
NodeModel::set_path(new_path);
- for (NodeModelMap::iterator i = m_nodes.begin(); i != m_nodes.end(); ++i)
+ for (NodeModelMap::iterator i = _nodes.begin(); i != _nodes.end(); ++i)
(*i).second->set_path(_path +"/"+ (*i).second->path().name());
#ifdef DEBUG
// Be sure connection paths are updated and sane
- for (list >::iterator j = m_connections.begin();
- j != m_connections.end(); ++j) {
+ for (list >::iterator j = _connections.begin();
+ j != _connections.end(); ++j) {
assert((*j)->src_port_path().parent().parent() == new_path);
assert((*j)->src_port_path().parent().parent() == new_path);
}
@@ -93,8 +93,8 @@ SharedPtr
PatchModel::get_node(const string& name) const
{
assert(name.find("/") == string::npos);
- NodeModelMap::const_iterator i = m_nodes.find(name);
- return ((i != m_nodes.end()) ? (*i).second : SharedPtr());
+ NodeModelMap::const_iterator i = _nodes.find(name);
+ return ((i != _nodes.end()) ? (*i).second : SharedPtr());
}
@@ -105,12 +105,12 @@ PatchModel::add_node(SharedPtr nm)
assert(nm->path().is_child_of(_path));
assert(nm->parent().get() == this);
- NodeModelMap::iterator existing = m_nodes.find(nm->path().name());
+ NodeModelMap::iterator existing = _nodes.find(nm->path().name());
// Store should have handled this by merging the two
- assert(existing == m_nodes.end());
+ assert(existing == _nodes.end());
- m_nodes[nm->path().name()] = nm;
+ _nodes[nm->path().name()] = nm;
new_node_sig.emit(nm);
}
@@ -121,20 +121,20 @@ PatchModel::remove_node(SharedPtr nm)
assert(nm->path().is_child_of(_path));
assert(nm->parent().get() == this);
- NodeModelMap::iterator i = m_nodes.find(nm->path().name());
- if (i != m_nodes.end()) {
+ NodeModelMap::iterator i = _nodes.find(nm->path().name());
+ if (i != _nodes.end()) {
assert(i->second == nm);
// Remove any connections which referred to this node,
// since they can't possibly exist anymore
- for (list >::iterator j = m_connections.begin();
- j != m_connections.end() ; ) {
+ for (list >::iterator j = _connections.begin();
+ j != _connections.end() ; ) {
list >::iterator next = j;
++next;
SharedPtr cm = (*j);
if (cm->src_port_path().parent() == nm->path()
|| cm->dst_port_path().parent() == nm->path()) {
- m_connections.erase(j); // cuts our reference
+ _connections.erase(j); // cuts our reference
assert(!get_connection(cm->src_port_path(), cm->dst_port_path())); // no duplicates
removed_connection_sig.emit(cm->src_port_path(), cm->dst_port_path());
}
@@ -142,7 +142,7 @@ PatchModel::remove_node(SharedPtr nm)
}
// Remove the Node itself
- m_nodes.erase(i);
+ _nodes.erase(i);
removed_node_sig.emit(nm);
} else {
@@ -156,10 +156,10 @@ void
PatchModel::remove_node(const string& name)
{
assert(name.find("/") == string::npos);
- NodeModelMap::iterator i = m_nodes.find(name);
- if (i != m_nodes.end()) {
+ NodeModelMap::iterator i = _nodes.find(name);
+ if (i != _nodes.end()) {
//delete i->second;
- m_nodes.erase(i);
+ _nodes.erase(i);
removed_node_sig.emit(name);
i->second->parent().reset();
return;
@@ -172,22 +172,22 @@ PatchModel::remove_node(const string& name)
void
PatchModel::clear()
{
- //for (list >::iterator j = m_connections.begin(); j != m_connections.end(); ++j)
+ //for (list >::iterator j = _connections.begin(); j != _connections.end(); ++j)
// delete (*j);
- for (NodeModelMap::iterator i = m_nodes.begin(); i != m_nodes.end(); ++i) {
+ for (NodeModelMap::iterator i = _nodes.begin(); i != _nodes.end(); ++i) {
(*i).second->clear();
//delete (*i).second;
}
- m_nodes.clear();
- m_connections.clear();
+ _nodes.clear();
+ _connections.clear();
NodeModel::clear();
- assert(m_nodes.empty());
- assert(m_connections.empty());
- assert(m_ports.empty());
+ assert(_nodes.empty());
+ assert(_connections.empty());
+ assert(_ports.empty());
}
@@ -204,19 +204,19 @@ PatchModel::rename_node(const Path& old_path, const Path& new_path)
assert(old_path.parent() == path());
assert(new_path.parent() == path());
- NodeModelMap::iterator i = m_nodes.find(old_path.name());
+ NodeModelMap::iterator i = _nodes.find(old_path.name());
- if (i != m_nodes.end()) {
+ if (i != _nodes.end()) {
SharedPtr nm = (*i).second;
- for (list >::iterator j = m_connections.begin(); j != m_connections.end(); ++j) {
+ for (list >::iterator j = _connections.begin(); j != _connections.end(); ++j) {
if ((*j)->src_port_path().parent() == old_path)
(*j)->src_port_path(new_path.base() + (*j)->src_port_path().name());
if ((*j)->dst_port_path().parent() == old_path)
(*j)->dst_port_path(new_path.base() + (*j)->dst_port_path().name());
}
- m_nodes.erase(i);
+ _nodes.erase(i);
assert(nm->path() == new_path);
- m_nodes[new_path.name()] = nm;
+ _nodes[new_path.name()] = nm;
return;
}
@@ -228,7 +228,7 @@ PatchModel::rename_node(const Path& old_path, const Path& new_path)
SharedPtr
PatchModel::get_connection(const string& src_port_path, const string& dst_port_path) const
{
- for (list >::const_iterator i = m_connections.begin(); i != m_connections.end(); ++i)
+ for (list >::const_iterator i = _connections.begin(); i != _connections.end(); ++i)
if ((*i)->src_port_path() == src_port_path && (*i)->dst_port_path() == dst_port_path)
return (*i);
return SharedPtr();
@@ -263,7 +263,7 @@ PatchModel::add_connection(SharedPtr cm)
assert(cm->src_port() == existing->src_port());
assert(cm->dst_port() == existing->dst_port());
} else {
- m_connections.push_back(cm);
+ _connections.push_back(cm);
new_connection_sig.emit(cm);
}
}
@@ -272,10 +272,10 @@ PatchModel::add_connection(SharedPtr cm)
void
PatchModel::remove_connection(const string& src_port_path, const string& dst_port_path)
{
- for (list >::iterator i = m_connections.begin(); i != m_connections.end(); ++i) {
+ for (list >::iterator i = _connections.begin(); i != _connections.end(); ++i) {
SharedPtr cm = (*i);
if (cm->src_port_path() == src_port_path && cm->dst_port_path() == dst_port_path) {
- m_connections.erase(i); // cuts our reference
+ _connections.erase(i); // cuts our reference
assert(!get_connection(src_port_path, dst_port_path)); // no duplicates
removed_connection_sig.emit(src_port_path, dst_port_path);
return;
@@ -290,8 +290,8 @@ PatchModel::remove_connection(const string& src_port_path, const string& dst_por
void
PatchModel::enable()
{
- if (!m_enabled) {
- m_enabled = true;
+ if (!_enabled) {
+ _enabled = true;
enabled_sig.emit();
}
}
@@ -300,8 +300,8 @@ PatchModel::enable()
void
PatchModel::disable()
{
- if (m_enabled) {
- m_enabled = false;
+ if (_enabled) {
+ _enabled = false;
disabled_sig.emit();
}
}
@@ -311,8 +311,8 @@ bool
PatchModel::polyphonic() const
{
return (_parent)
- ? (m_poly > 1) && m_poly == PtrCast(_parent)->poly() && m_poly > 1
- : (m_poly > 1);
+ ? (_poly > 1) && _poly == PtrCast(_parent)->poly() && _poly > 1
+ : (_poly > 1);
}
diff --git a/src/libs/client/PatchModel.h b/src/libs/client/PatchModel.h
index 402e84c3..715cfe7f 100644
--- a/src/libs/client/PatchModel.h
+++ b/src/libs/client/PatchModel.h
@@ -41,15 +41,15 @@ class Store;
class PatchModel : public NodeModel
{
public:
- const NodeModelMap& nodes() const { return m_nodes; }
- const ConnectionList& connections() const { return m_connections; }
+ const NodeModelMap& nodes() const { return _nodes; }
+ const ConnectionList& connections() const { return _connections; }
SharedPtr get_connection(const string& src_port_path, const string& dst_port_path) const;
SharedPtr get_node(const string& node_name) const;
- size_t poly() const { return m_poly; }
- const string& filename() const { return m_filename; }
- bool enabled() const { return m_enabled; }
+ size_t poly() const { return _poly; }
+ const string& filename() const { return _filename; }
+ bool enabled() const { return _enabled; }
bool polyphonic() const;
// Signals
@@ -65,13 +65,13 @@ private:
PatchModel(const Path& patch_path, size_t internal_poly)
: NodeModel("ingen:patch", patch_path, false), // FIXME
- m_enabled(false),
- m_poly(internal_poly)
+ _enabled(false),
+ _poly(internal_poly)
{
}
- void filename(const string& f) { m_filename = f; }
- void poly(size_t p) { m_poly = p; }
+ void filename(const string& f) { _filename = f; }
+ void poly(size_t p) { _poly = p; }
void enable();
void disable();
void clear();
@@ -87,11 +87,11 @@ private:
void rename_node(const Path& old_path, const Path& new_path);
void rename_node_port(const Path& old_path, const Path& new_path);
- NodeModelMap m_nodes;
- ConnectionList m_connections;
- string m_filename;
- bool m_enabled;
- size_t m_poly;
+ NodeModelMap _nodes;
+ ConnectionList _connections;
+ string _filename;
+ bool _enabled;
+ size_t _poly;
};
typedef map > PatchModelMap;
diff --git a/src/libs/client/PluginModel.h b/src/libs/client/PluginModel.h
index 8bc96558..21266091 100644
--- a/src/libs/client/PluginModel.h
+++ b/src/libs/client/PluginModel.h
@@ -36,44 +36,44 @@ public:
enum Type { LV2, LADSPA, DSSI, Internal, Patch };
PluginModel(const string& uri, const string& type_uri, const string& name)
- : m_uri(uri),
- m_name(name)
+ : _uri(uri),
+ _name(name)
{
set_type_from_uri(type_uri);
}
- Type type() const { return m_type; }
- void type(Type t) { m_type = t; }
- const string& uri() const { return m_uri; }
- void uri(const string& s) { m_uri = s; }
- const string& name() const { return m_name; }
- void name(const string& s) { m_name = s; }
+ Type type() const { return _type; }
+ void type(Type t) { _type = t; }
+ const string& uri() const { return _uri; }
+ void uri(const string& s) { _uri = s; }
+ const string& name() const { return _name; }
+ void name(const string& s) { _name = s; }
/*const char* const type_string() const {
- if (m_type == LV2) return "LV2";
- else if (m_type == LADSPA) return "LADSPA";
- else if (m_type == DSSI) return "DSSI";
- else if (m_type == Internal) return "Internal";
- else if (m_type == Patch) return "Patch";
+ if (_type == LV2) return "LV2";
+ else if (_type == LADSPA) return "LADSPA";
+ else if (_type == DSSI) return "DSSI";
+ else if (_type == Internal) return "Internal";
+ else if (_type == Patch) return "Patch";
else return "";
}*/
const char* const type_uri() const {
- if (m_type == LV2) return "ingen:LV2Plugin";
- else if (m_type == LADSPA) return "ingen:LADSPAPlugin";
- else if (m_type == DSSI) return "ingen:DSSIPlugin";
- else if (m_type == Internal) return "ingen:InternalPlugin";
- else if (m_type == Patch) return "ingen:Patch";
+ if (_type == LV2) return "ingen:LV2Plugin";
+ else if (_type == LADSPA) return "ingen:LADSPAPlugin";
+ else if (_type == DSSI) return "ingen:DSSIPlugin";
+ else if (_type == Internal) return "ingen:InternalPlugin";
+ else if (_type == Patch) return "ingen:Patch";
else return "";
}
/** DEPRECATED */
void set_type(const string& type_string) {
- if (type_string == "LV2") m_type = LV2;
- else if (type_string == "LADSPA") m_type = LADSPA;
- else if (type_string == "DSSI") m_type = DSSI;
- else if (type_string == "Internal") m_type = Internal;
- else if (type_string == "Patch") m_type = Patch;
+ if (type_string == "LV2") _type = LV2;
+ else if (type_string == "LADSPA") _type = LADSPA;
+ else if (type_string == "DSSI") _type = DSSI;
+ else if (type_string == "Internal") _type = Internal;
+ else if (type_string == "Patch") _type = Patch;
}
void set_type_from_uri(const string& type_uri) {
@@ -84,12 +84,12 @@ public:
}
}
- string default_node_name() { return Raul::Path::nameify(m_name); }
+ string default_node_name() { return Raul::Path::nameify(_name); }
private:
- Type m_type;
- string m_uri;
- string m_name;
+ Type _type;
+ string _uri;
+ string _name;
};
diff --git a/src/libs/client/PresetModel.h b/src/libs/client/PresetModel.h
index 9e7f5339..918a6f34 100644
--- a/src/libs/client/PresetModel.h
+++ b/src/libs/client/PresetModel.h
@@ -35,7 +35,7 @@ class PresetModel
{
public:
PresetModel(const string& base_path)
- : m_base_path(base_path)
+ : _base_path(base_path)
{}
/** Add a control value to this preset. An empty string for a node_name
@@ -45,20 +45,20 @@ public:
const string& port_name, float value)
{
if (node_name != "")
- m_controls.push_back(ControlModel(m_base_path + node_name +"/"+ port_name, value));
+ _controls.push_back(ControlModel(_base_path + node_name +"/"+ port_name, value));
else
- m_controls.push_back(ControlModel(m_base_path + port_name, value));
+ _controls.push_back(ControlModel(_base_path + port_name, value));
}
- const string& name() const { return m_name; }
- void name(const string& n) { m_name = n; }
+ const string& name() const { return _name; }
+ void name(const string& n) { _name = n; }
- const list& controls() const { return m_controls; }
+ const list& controls() const { return _controls; }
private:
- string m_name;
- string m_base_path;
- list m_controls;
+ string _name;
+ string _base_path;
+ list _controls;
};
diff --git a/src/libs/engine/Array.h b/src/libs/engine/Array.h
index bef6ef5b..aaad9c5a 100644
--- a/src/libs/engine/Array.h
+++ b/src/libs/engine/Array.h
@@ -31,25 +31,25 @@ template
class Array : public MaidObject
{
public:
- Array(size_t size = 0) : m_size(size), m_top(0), m_elems(NULL) {
+ Array(size_t size = 0) : _size(size), _top(0), _elems(NULL) {
if (size > 0)
- m_elems = new T[size];
+ _elems = new T[size];
}
- Array(size_t size, T initial_value) : m_size(size), m_top(0), m_elems(NULL) {
+ Array(size_t size, T initial_value) : _size(size), _top(0), _elems(NULL) {
if (size > 0) {
- m_elems = new T[size];
+ _elems = new T[size];
for (size_t i=0; i < size; ++i)
- m_elems[i] = initial_value;
+ _elems[i] = initial_value;
}
}
- Array(size_t size, const Array& contents) : m_size(size), m_top(size+1) {
- m_elems = new T[size];
+ Array(size_t size, const Array& contents) : _size(size), _top(size+1) {
+ _elems = new T[size];
if (size <= contents.size())
- memcpy(m_elems, contents.m_elems, size * sizeof(T));
+ memcpy(_elems, contents._elems, size * sizeof(T));
else
- memcpy(m_elems, contents.m_elems, contents.size() * sizeof(T));
+ memcpy(_elems, contents._elems, contents.size() * sizeof(T));
}
~Array() {
@@ -59,46 +59,46 @@ public:
void alloc(size_t num_elems) {
assert(num_elems > 0);
- delete[] m_elems;
- m_size = num_elems;
- m_top = 0;
+ delete[] _elems;
+ _size = num_elems;
+ _top = 0;
- m_elems = new T[num_elems];
+ _elems = new T[num_elems];
}
void alloc(size_t num_elems, T initial_value) {
assert(num_elems > 0);
- delete[] m_elems;
- m_size = num_elems;
- m_top = 0;
+ delete[] _elems;
+ _size = num_elems;
+ _top = 0;
- m_elems = new T[num_elems];
- for (size_t i=0; i < m_size; ++i)
- m_elems[i] = initial_value;
+ _elems = new T[num_elems];
+ for (size_t i=0; i < _size; ++i)
+ _elems[i] = initial_value;
}
void free() {
- delete[] m_elems;
- m_size = 0;
- m_top = 0;
+ delete[] _elems;
+ _size = 0;
+ _top = 0;
}
void push_back(T n) {
- assert(m_top < m_size);
- m_elems[m_top++] = n;
+ assert(_top < _size);
+ _elems[_top++] = n;
}
- inline size_t size() const { return m_size; }
+ inline size_t size() const { return _size; }
- inline T& operator[](size_t i) const { assert(i < m_size); return m_elems[i]; }
+ inline T& operator[](size_t i) const { assert(i < _size); return _elems[i]; }
- inline T& at(size_t i) const { assert(i < m_size); return m_elems[i]; }
+ inline T& at(size_t i) const { assert(i < _size); return _elems[i]; }
private:
- size_t m_size;
- size_t m_top; // points to empty element above "top" element
- T* m_elems;
+ size_t _size;
+ size_t _top; // points to empty element above "top" element
+ T* _elems;
};
diff --git a/src/libs/engine/Connection.cpp b/src/libs/engine/Connection.cpp
index a896913b..6f8b0851 100644
--- a/src/libs/engine/Connection.cpp
+++ b/src/libs/engine/Connection.cpp
@@ -28,9 +28,9 @@ namespace Ingen {
* user (InputPort).
*/
Connection::Connection(Port* const src_port, Port* const dst_port)
-: m_src_port(src_port),
- m_dst_port(dst_port),
- m_pending_disconnection(false)
+: _src_port(src_port),
+ _dst_port(dst_port),
+ _pending_disconnection(false)
{
assert(src_port != NULL);
assert(dst_port != NULL);
diff --git a/src/libs/engine/Connection.h b/src/libs/engine/Connection.h
index 3fe86f94..d619d50e 100644
--- a/src/libs/engine/Connection.h
+++ b/src/libs/engine/Connection.h
@@ -42,21 +42,21 @@ class Connection : public MaidObject
public:
virtual ~Connection() {}
- Port* src_port() const { return m_src_port; }
- Port* dst_port() const { return m_dst_port; }
+ Port* src_port() const { return _src_port; }
+ Port* dst_port() const { return _dst_port; }
/** Used by some (recursive) events to prevent double disconnections */
- bool pending_disconnection() { return m_pending_disconnection; }
- void pending_disconnection(bool b) { m_pending_disconnection = b; }
+ bool pending_disconnection() { return _pending_disconnection; }
+ void pending_disconnection(bool b) { _pending_disconnection = b; }
virtual void set_buffer_size(size_t size) {}
protected:
Connection(Port* const src_port, Port* const dst_port);
- Port* const m_src_port;
- Port* const m_dst_port;
- bool m_pending_disconnection;
+ Port* const _src_port;
+ Port* const _dst_port;
+ bool _pending_disconnection;
};
diff --git a/src/libs/engine/Engine.cpp b/src/libs/engine/Engine.cpp
index c7c5f80a..090e42fd 100644
--- a/src/libs/engine/Engine.cpp
+++ b/src/libs/engine/Engine.cpp
@@ -49,19 +49,19 @@ namespace Ingen {
Engine::Engine()
-: m_midi_driver(NULL),
- m_maid(new Maid(maid_queue_size)),
- m_post_processor(new PostProcessor(*m_maid, post_processor_queue_size)),
- m_broadcaster(new ClientBroadcaster()),
- m_object_store(new ObjectStore()),
- m_node_factory(new NodeFactory()),
+: _midi_driver(NULL),
+ _maid(new Maid(maid_queue_size)),
+ _post_processor(new PostProcessor(*_maid, post_processor_queue_size)),
+ _broadcaster(new ClientBroadcaster()),
+ _object_store(new ObjectStore()),
+ _node_factory(new NodeFactory()),
#ifdef HAVE_LASH
- m_lash_driver(new LashDriver()),
+ _lash_driver(new LashDriver()),
#else
- m_lash_driver(NULL),
+ _lash_driver(NULL),
#endif
- m_quit_flag(false),
- m_activated(false)
+ _quit_flag(false),
+ _activated(false)
{
}
@@ -70,18 +70,18 @@ Engine::~Engine()
{
deactivate();
- for (Tree::iterator i = m_object_store->objects().begin();
- i != m_object_store->objects().end(); ++i) {
+ for (Tree::iterator i = _object_store->objects().begin();
+ i != _object_store->objects().end(); ++i) {
if ((*i)->parent() == NULL)
delete (*i);
}
- delete m_object_store;
- delete m_broadcaster;
- delete m_node_factory;
- delete m_midi_driver;
+ delete _object_store;
+ delete _broadcaster;
+ delete _node_factory;
+ delete _midi_driver;
- delete m_maid;
+ delete _maid;
munlockall();
}
@@ -94,22 +94,22 @@ Engine::~Engine()
* more elegant and extensible, but this is faster and simpler - for now.
*/
template<>
-Driver* Engine::driver() { return m_midi_driver; }
+Driver* Engine::driver() { return _midi_driver; }
template<>
-Driver* Engine::driver() { return m_audio_driver.get(); }
+Driver* Engine::driver() { return _audio_driver.get(); }
int
Engine::main()
{
// Loop until quit flag is set (by OSCReceiver)
- while ( ! m_quit_flag) {
+ while ( ! _quit_flag) {
nanosleep(&main_rate, NULL);
main_iteration();
}
cout << "[Main] Done main loop." << endl;
- if (m_activated)
+ if (_activated)
deactivate();
sleep(1);
@@ -132,53 +132,53 @@ Engine::main_iteration()
lash_driver->process_events();
#endif
// Run the maid (garbage collector)
- m_maid->cleanup();
+ _maid->cleanup();
- return !m_quit_flag;
+ return !_quit_flag;
}
bool
Engine::activate(SharedPtr ad, SharedPtr es)
{
- if (m_activated)
+ if (_activated)
return false;
// Setup drivers
- m_audio_driver = ad;
+ _audio_driver = ad;
#ifdef HAVE_JACK_MIDI
- m_midi_driver = new JackMidiDriver(((JackAudioDriver*)m_audio_driver.get())->jack_client());
+ _midi_driver = new JackMidiDriver(((JackAudioDriver*)_audio_driver.get())->jack_client());
#elif HAVE_ALSA_MIDI
- m_midi_driver = new AlsaMidiDriver(m_audio_driver.get());
+ _midi_driver = new AlsaMidiDriver(_audio_driver.get());
#else
- m_midi_driver = new DummyMidiDriver();
+ _midi_driver = new DummyMidiDriver();
#endif
// Set event source (FIXME: handle multiple sources)
- m_event_source = es;
+ _event_source = es;
- m_event_source->activate();
+ _event_source->activate();
// Create root patch
Patch* root_patch = new Patch("", 1, NULL,
- m_audio_driver->sample_rate(), m_audio_driver->buffer_size(), 1);
+ _audio_driver->sample_rate(), _audio_driver->buffer_size(), 1);
root_patch->activate();
- root_patch->add_to_store(m_object_store);
+ root_patch->add_to_store(_object_store);
root_patch->process_order(root_patch->build_process_order());
root_patch->enable();
- assert(m_audio_driver->root_patch() == NULL);
- m_audio_driver->set_root_patch(root_patch);
+ assert(_audio_driver->root_patch() == NULL);
+ _audio_driver->set_root_patch(root_patch);
- m_audio_driver->activate();
+ _audio_driver->activate();
#ifdef HAVE_ALSA_MIDI
- m_midi_driver->activate();
+ _midi_driver->activate();
#endif
- m_post_processor->start();
+ _post_processor->start();
- m_activated = true;
+ _activated = true;
return true;
}
@@ -187,31 +187,31 @@ Engine::activate(SharedPtr ad, SharedPtr es)
void
Engine::deactivate()
{
- if (!m_activated)
+ if (!_activated)
return;
- m_audio_driver->root_patch()->disable();
- m_audio_driver->root_patch()->deactivate();
+ _audio_driver->root_patch()->disable();
+ _audio_driver->root_patch()->deactivate();
- /*for (Tree::iterator i = m_object_store->objects().begin();
- i != m_object_store->objects().end(); ++i)
+ /*for (Tree::iterator i = _object_store->objects().begin();
+ i != _object_store->objects().end(); ++i)
if ((*i)->as_node() != NULL && (*i)->as_node()->parent() == NULL)
(*i)->as_node()->deactivate();*/
- if (m_midi_driver != NULL)
- m_midi_driver->deactivate();
+ if (_midi_driver != NULL)
+ _midi_driver->deactivate();
- m_audio_driver->deactivate();
+ _audio_driver->deactivate();
// Finalize any lingering events (unlikely)
- m_post_processor->whip();
- m_post_processor->stop();
+ _post_processor->whip();
+ _post_processor->stop();
- m_audio_driver.reset();
+ _audio_driver.reset();
- m_event_source.reset();
+ _event_source.reset();
- m_activated = false;
+ _activated = false;
}
diff --git a/src/libs/engine/Engine.h b/src/libs/engine/Engine.h
index 01aaa3a1..bcff871b 100644
--- a/src/libs/engine/Engine.h
+++ b/src/libs/engine/Engine.h
@@ -58,39 +58,39 @@ public:
/** Set the quit flag that should kill all threads and exit cleanly.
* Note that it will take some time. */
- void quit() { m_quit_flag = true; }
+ void quit() { _quit_flag = true; }
bool activate(SharedPtr ad, SharedPtr es);
void deactivate();
- bool activated() { return m_activated; }
+ bool activated() { return _activated; }
- EventSource* event_source() const { return m_event_source.get(); }
- AudioDriver* audio_driver() const { return m_audio_driver.get(); }
- MidiDriver* midi_driver() const { return m_midi_driver; }
- Maid* maid() const { return m_maid; }
- PostProcessor* post_processor() const { return m_post_processor; }
- ClientBroadcaster* broadcaster() const { return m_broadcaster; }
- ObjectStore* object_store() const { return m_object_store; }
- NodeFactory* node_factory() const { return m_node_factory; }
- LashDriver* lash_driver() const { return m_lash_driver; }
+ EventSource* event_source() const { return _event_source.get(); }
+ AudioDriver* audio_driver() const { return _audio_driver.get(); }
+ MidiDriver* midi_driver() const { return _midi_driver; }
+ Maid* maid() const { return _maid; }
+ PostProcessor* post_processor() const { return _post_processor; }
+ ClientBroadcaster* broadcaster() const { return _broadcaster; }
+ ObjectStore* object_store() const { return _object_store; }
+ NodeFactory* node_factory() const { return _node_factory; }
+ LashDriver* lash_driver() const { return _lash_driver; }
/** Return the active driver for the given (template parameter) type */
template Driver* driver();
private:
- SharedPtr m_event_source;
- SharedPtr m_audio_driver;
- MidiDriver* m_midi_driver;
- Maid* m_maid;
- PostProcessor* m_post_processor;
- ClientBroadcaster* m_broadcaster;
- ObjectStore* m_object_store;
- NodeFactory* m_node_factory;
- LashDriver* m_lash_driver;
+ SharedPtr _event_source;
+ SharedPtr _audio_driver;
+ MidiDriver* _midi_driver;
+ Maid* _maid;
+ PostProcessor* _post_processor;
+ ClientBroadcaster* _broadcaster;
+ ObjectStore* _object_store;
+ NodeFactory* _node_factory;
+ LashDriver* _lash_driver;
- bool m_quit_flag;
- bool m_activated;
+ bool _quit_flag;
+ bool _activated;
};
diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp
index 6fbd500f..2a369521 100644
--- a/src/libs/engine/InputPort.cpp
+++ b/src/libs/engine/InputPort.cpp
@@ -47,35 +47,35 @@ template
void
InputPort::add_connection(ListNode*>* const c)
{
- m_connections.push_back(c);
+ _connections.push_back(c);
- bool modify_buffers = !m_fixed_buffers;
- //if (modify_buffers && m_is_tied)
- // modify_buffers = !m_tied_port->fixed_buffers();
+ bool modify_buffers = !_fixed_buffers;
+ //if (modify_buffers && _is_tied)
+ // modify_buffers = !_tied_port->fixed_buffers();
if (modify_buffers) {
- if (m_connections.size() == 1) {
+ if (_connections.size() == 1) {
// Use buffer directly to avoid copying
for (size_t i=0; i < _poly; ++i) {
- m_buffers.at(i)->join(c->elem()->buffer(i));
- //if (m_is_tied)
- // m_tied_port->buffer(i)->join(m_buffers.at(i));
- assert(m_buffers.at(i)->data() == c->elem()->buffer(i)->data());
+ _buffers.at(i)->join(c->elem()->buffer(i));
+ //if (_is_tied)
+ // _tied_port->buffer(i)->join(_buffers.at(i));
+ assert(_buffers.at(i)->data() == c->elem()->buffer(i)->data());
}
- } else if (m_connections.size() == 2) {
+ } else if (_connections.size() == 2) {
// Used to directly use single connection buffer, now there's two
// so have to use local ones again and mix down
for (size_t i=0; i < _poly; ++i) {
- m_buffers.at(i)->unjoin();
- //if (m_is_tied)
- // m_tied_port->buffer(i)->join(m_buffers.at(i));
+ _buffers.at(i)->unjoin();
+ //if (_is_tied)
+ // _tied_port->buffer(i)->join(_buffers.at(i));
}
}
TypedPort::connect_buffers();
}
- //assert( ! m_is_tied || m_tied_port != NULL);
- //assert( ! m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
+ //assert( ! _is_tied || _tied_port != NULL);
+ //assert( ! _is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
}
template void InputPort::add_connection(ListNode*>* const c);
template void InputPort::add_connection(ListNode*>* const c);
@@ -87,16 +87,16 @@ template
ListNode*>*
InputPort::remove_connection(const OutputPort* const src_port)
{
- bool modify_buffers = !m_fixed_buffers;
- //if (modify_buffers && m_is_tied)
- // modify_buffers = !m_tied_port->fixed_buffers();
+ bool modify_buffers = !_fixed_buffers;
+ //if (modify_buffers && _is_tied)
+ // modify_buffers = !_tied_port->fixed_buffers();
typedef typename List*>::iterator TypedConnectionListIterator;
bool found = false;
ListNode*>* connection = NULL;
- for (TypedConnectionListIterator i = m_connections.begin(); i != m_connections.end(); ++i) {
+ for (TypedConnectionListIterator i = _connections.begin(); i != _connections.end(); ++i) {
if ((*i)->src_port()->path() == src_port->path()) {
- connection = m_connections.remove(i);
+ connection = _connections.remove(i);
found = true;
}
}
@@ -105,21 +105,21 @@ InputPort::remove_connection(const OutputPort* const src_port)
cerr << "WARNING: [InputPort::remove_connection] Connection not found !" << endl;
exit(EXIT_FAILURE);
} else {
- if (m_connections.size() == 0) {
+ if (_connections.size() == 0) {
for (size_t i=0; i < _poly; ++i) {
// Use a local buffer
- if (modify_buffers && m_buffers.at(i)->is_joined())
- m_buffers.at(i)->unjoin();
- m_buffers.at(i)->clear(); // Write silence
- //if (m_is_tied)
- //m_tied_port->buffer(i)->join(m_buffers.at(i));
+ if (modify_buffers && _buffers.at(i)->is_joined())
+ _buffers.at(i)->unjoin();
+ _buffers.at(i)->clear(); // Write silence
+ //if (_is_tied)
+ //m_tied_port->buffer(i)->join(_buffers.at(i));
}
- } else if (modify_buffers && m_connections.size() == 1) {
+ } else if (modify_buffers && _connections.size() == 1) {
// Share a buffer
for (size_t i=0; i < _poly; ++i) {
- m_buffers.at(i)->join((*m_connections.begin())->buffer(i));
- //if (m_is_tied)
- // m_tied_port->buffer(i)->join(m_buffers.at(i));
+ _buffers.at(i)->join((*_connections.begin())->buffer(i));
+ //if (_is_tied)
+ // _tied_port->buffer(i)->join(_buffers.at(i));
}
}
}
@@ -127,8 +127,8 @@ InputPort::remove_connection(const OutputPort* const src_port)
if (modify_buffers)
TypedPort::connect_buffers();
- //assert( ! m_is_tied || m_tied_port != NULL);
- //assert( ! m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
+ //assert( ! _is_tied || _tied_port != NULL);
+ //assert( ! _is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
return connection;
}
@@ -145,7 +145,7 @@ bool
InputPort::is_connected_to(const OutputPort* const port) const
{
typedef typename List*>::const_iterator TypedConnectionListIterator;
- for (TypedConnectionListIterator i = m_connections.begin(); i != m_connections.end(); ++i)
+ for (TypedConnectionListIterator i = _connections.begin(); i != _connections.end(); ++i)
if ((*i)->src_port() == port)
return true;
@@ -162,27 +162,27 @@ template<>
void
InputPort::process(SampleCount nframes, FrameTime start, FrameTime end)
{
- //assert(!m_is_tied || m_tied_port != NULL);
+ //assert(!_is_tied || _tied_port != NULL);
typedef List*>::iterator TypedConnectionListIterator;
bool do_mixdown = true;
- if (m_connections.size() == 0) return;
+ if (_connections.size() == 0) return;
- for (TypedConnectionListIterator c = m_connections.begin(); c != m_connections.end(); ++c)
+ for (TypedConnectionListIterator c = _connections.begin(); c != _connections.end(); ++c)
(*c)->process(nframes, start, end);
// If only one connection, buffer is (maybe) used directly (no copying)
- if (m_connections.size() == 1) {
+ if (_connections.size() == 1) {
// Buffer changed since connection
- if (m_buffers.at(0)->data() != (*m_connections.begin())->buffer(0)->data()) {
- if (m_fixed_buffers) { // || (m_is_tied && m_tied_port->fixed_buffers())) {
+ if (_buffers.at(0)->data() != (*_connections.begin())->buffer(0)->data()) {
+ if (_fixed_buffers) { // || (_is_tied && _tied_port->fixed_buffers())) {
// can't change buffer, must copy
do_mixdown = true;
} else {
// zero-copy
- assert(m_buffers.at(0)->is_joined());
- m_buffers.at(0)->join((*m_connections.begin())->buffer(0));
+ assert(_buffers.at(0)->is_joined());
+ _buffers.at(0)->join((*_connections.begin())->buffer(0));
do_mixdown = false;
}
connect_buffers();
@@ -194,24 +194,24 @@ InputPort::process(SampleCount nframes, FrameTime start, FrameTime end)
//cerr << path() << " mixing: " << do_mixdown << endl;
if (!do_mixdown) {
- assert(m_buffers.at(0)->data() == (*m_connections.begin())->buffer(0)->data());
+ assert(_buffers.at(0)->data() == (*_connections.begin())->buffer(0)->data());
return;
}
- /*assert(!m_is_tied || m_tied_port != NULL);
- assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());*/
+ /*assert(!_is_tied || _tied_port != NULL);
+ assert(!_is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());*/
for (size_t voice=0; voice < _poly; ++voice) {
// Copy first connection
- m_buffers.at(voice)->copy((*m_connections.begin())->buffer(voice), 0, _buffer_size-1);
+ _buffers.at(voice)->copy((*_connections.begin())->buffer(voice), 0, _buffer_size-1);
// Accumulate the rest
- if (m_connections.size() > 1) {
+ if (_connections.size() > 1) {
- TypedConnectionListIterator c = m_connections.begin();
+ TypedConnectionListIterator c = _connections.begin();
- for (++c; c != m_connections.end(); ++c)
- m_buffers.at(voice)->accumulate((*c)->buffer(voice), 0, _buffer_size-1);
+ for (++c; c != _connections.end(); ++c)
+ _buffers.at(voice)->accumulate((*c)->buffer(voice), 0, _buffer_size-1);
}
}
}
@@ -225,9 +225,9 @@ template <>
void
InputPort::process(SampleCount nframes, FrameTime start, FrameTime end)
{
- //assert(!m_is_tied || m_tied_port != NULL);
+ //assert(!_is_tied || _tied_port != NULL);
- const size_t num_ins = m_connections.size();
+ const size_t num_ins = _connections.size();
bool do_mixdown = true;
assert(num_ins == 0 || num_ins == 1);
@@ -235,67 +235,67 @@ InputPort::process(SampleCount nframes, FrameTime start, FrameTime
typedef List*>::iterator TypedConnectionListIterator;
assert(_poly == 1);
- for (TypedConnectionListIterator c = m_connections.begin(); c != m_connections.end(); ++c)
+ for (TypedConnectionListIterator c = _connections.begin(); c != _connections.end(); ++c)
(*c)->process(nframes, start, end);
// If only one connection, buffer is used directly (no copying)
if (num_ins == 1) {
// Buffer changed since connection
- if (m_buffers.at(0) != (*m_connections.begin())->buffer(0)) {
- if (m_fixed_buffers) { // || (m_is_tied && m_tied_port->fixed_buffers())) {
+ if (_buffers.at(0) != (*_connections.begin())->buffer(0)) {
+ if (_fixed_buffers) { // || (_is_tied && _tied_port->fixed_buffers())) {
// can't change buffer, must copy
do_mixdown = true;
} else {
// zero-copy
- m_buffers.at(0)->join((*m_connections.begin())->buffer(0));
- //if (m_is_tied)
- // m_tied_port->buffer(0)->join(m_buffers.at(0));
+ _buffers.at(0)->join((*_connections.begin())->buffer(0));
+ //if (_is_tied)
+ // _tied_port->buffer(0)->join(_buffers.at(0));
do_mixdown = false;
}
connect_buffers();
} else {
do_mixdown = false;
}
- //assert(!m_is_tied || m_tied_port != NULL);
- //assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
- //assert(!m_is_tied || m_buffers.at(0)->filled_size() == m_tied_port->buffer(0)->filled_size());
- assert(do_mixdown || m_buffers.at(0)->filled_size() ==
- (*m_connections.begin())->src_port()->buffer(0)->filled_size());
+ //assert(!_is_tied || _tied_port != NULL);
+ //assert(!_is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
+ //assert(!_is_tied || _buffers.at(0)->filled_size() == _tied_port->buffer(0)->filled_size());
+ assert(do_mixdown || _buffers.at(0)->filled_size() ==
+ (*_connections.begin())->src_port()->buffer(0)->filled_size());
}
// Get valid buffer size from inbound connections, unless a port on a top-level
// patch (which will be fed by the MidiDriver)
if (_parent->parent() != NULL) {
if (num_ins == 1) {
- m_buffers.at(0)->filled_size(
- (*m_connections.begin())->src_port()->buffer(0)->filled_size());
+ _buffers.at(0)->filled_size(
+ (*_connections.begin())->src_port()->buffer(0)->filled_size());
- //if (m_is_tied)
- // m_tied_port->buffer(0)->filled_size(m_buffers.at(0)->filled_size());
+ //if (_is_tied)
+ // _tied_port->buffer(0)->filled_size(_buffers.at(0)->filled_size());
- assert(m_buffers.at(0)->filled_size() ==
- (*m_connections.begin())->src_port()->buffer(0)->filled_size());
+ assert(_buffers.at(0)->filled_size() ==
+ (*_connections.begin())->src_port()->buffer(0)->filled_size());
} else {
// Mixing not implemented
- m_buffers.at(0)->clear();
+ _buffers.at(0)->clear();
}
}
- //assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
+ //assert(!_is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
- if (!do_mixdown || m_buffers.at(0)->filled_size() == 0 || num_ins == 0)
+ if (!do_mixdown || _buffers.at(0)->filled_size() == 0 || num_ins == 0)
return;
//cerr << path() << " - Copying MIDI buffer" << endl;
// Be sure buffers are the same as tied port's, if joined
- //assert(!m_is_tied || m_tied_port != NULL);
- //assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
+ //assert(!_is_tied || _tied_port != NULL);
+ //assert(!_is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
if (num_ins > 0)
- for (size_t i=0; i < m_buffers.at(0)->filled_size(); ++i)
- m_buffers.at(0)[i] = (*m_connections.begin())->buffer(0)[i];
+ for (size_t i=0; i < _buffers.at(0)->filled_size(); ++i)
+ _buffers.at(0)[i] = (*_connections.begin())->buffer(0)[i];
}
@@ -306,7 +306,7 @@ InputPort::set_buffer_size(size_t size)
TypedPort::set_buffer_size(size);
assert(_buffer_size = size);
- for (typename List*>::iterator c = m_connections.begin(); c != m_connections.end(); ++c)
+ for (typename List*>::iterator c = _connections.begin(); c != _connections.end(); ++c)
(*c)->set_buffer_size(size);
}
diff --git a/src/libs/engine/InputPort.h b/src/libs/engine/InputPort.h
index 1fc90246..bb6f0560 100644
--- a/src/libs/engine/InputPort.h
+++ b/src/libs/engine/InputPort.h
@@ -53,11 +53,11 @@ public:
void add_connection(ListNode*>* const c);
ListNode*>* remove_connection(const OutputPort* const src_port);
- const List*>& connections() { return m_connections; }
+ const List*>& connections() { return _connections; }
void process(SampleCount nframes, FrameTime start, FrameTime end);
- bool is_connected() const { return (m_connections.size() > 0); }
+ bool is_connected() const { return (_connections.size() > 0); }
bool is_connected_to(const OutputPort* const port) const;
bool is_input() const { return true; }
@@ -67,14 +67,14 @@ public:
private:
- List*> m_connections;
+ List*> _connections;
// This is just stupid...
- using TypedPort::m_buffers;
+ using TypedPort::_buffers;
using TypedPort::_poly;
using TypedPort::_index;
using TypedPort::_buffer_size;
- using TypedPort::m_fixed_buffers;
+ using TypedPort::_fixed_buffers;
};
diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp
index d148a549..ab71ea25 100644
--- a/src/libs/engine/JackAudioDriver.cpp
+++ b/src/libs/engine/JackAudioDriver.cpp
@@ -75,10 +75,10 @@ void
JackAudioPort::prepare_buffer(jack_nframes_t nframes)
{
// FIXME: Technically this doesn't need to be done every time for output ports
- /*m_jack_buffer->set_data((jack_default_audio_sample_t*)
- jack_port_get_buffer(m_jack_port, nframes));
+ /*_jack_buffer->set_data((jack_default_audio_sample_t*)
+ jack_port_get_buffer(_jack_port, nframes));
- m_patch_port->buffer(0)->join(m_jack_buffer);
+ _patch_port->buffer(0)->join(_jack_buffer);
*/
jack_sample_t* jack_buf = (jack_sample_t*)jack_port_get_buffer(_jack_port, nframes);
@@ -88,17 +88,17 @@ JackAudioPort::prepare_buffer(jack_nframes_t nframes)
_jack_buffer = jack_buf;
}
- //assert(m_patch_port->tied_port() != NULL);
+ //assert(_patch_port->tied_port() != NULL);
// FIXME: fixed_buffers switch on/off thing can be removed once this
// gets figured out and assertions can go away
//m_patch_port->fixed_buffers(false);
- //m_patch_port->buffer(0)->join(m_jack_buffer);
- //m_patch_port->tied_port()->buffer(0)->join(m_jack_buffer);
+ //m_patch_port->buffer(0)->join(_jack_buffer);
+ //m_patch_port->tied_port()->buffer(0)->join(_jack_buffer);
//m_patch_port->fixed_buffers(true);
- //assert(m_patch_port->buffer(0)->data() == _patch_port->tied_port()->buffer(0)->data());
+ //assert(_patch_port->buffer(0)->data() == _patch_port->tied_port()->buffer(0)->data());
assert(_patch_port->buffer(0)->data() == jack_buf);
}
diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp
index 1f195dbe..a2bdd932 100644
--- a/src/libs/engine/LV2Node.cpp
+++ b/src/libs/engine/LV2Node.cpp
@@ -80,14 +80,16 @@ LV2Node::instantiate()
Port* port = NULL;
for (size_t j=0; j < num_ports; ++j) {
+ SLV2PortID id = slv2_port_by_index(j);
+
// LV2 shortnames are guaranteed to be unique, valid C identifiers
- port_name = (char*)slv2_port_get_symbol(_lv2_plugin, j);
+ port_name = (char*)slv2_port_get_symbol(_lv2_plugin, id);
assert(port_name.find("/") == string::npos);
port_path = path() + "/" + port_name;
- SLV2PortClass port_class = slv2_port_get_class(_lv2_plugin, j);
+ SLV2PortClass port_class = slv2_port_get_class(_lv2_plugin, id);
const bool is_control = (port_class == SLV2_CONTROL_RATE_INPUT
|| port_class == SLV2_CONTROL_RATE_OUTPUT);
const bool is_input = (port_class == SLV2_CONTROL_RATE_INPUT
@@ -98,7 +100,7 @@ LV2Node::instantiate()
else
port_buffer_size = _buffer_size;
- char* const data_type = slv2_port_get_data_type(_lv2_plugin, j);
+ char* const data_type = slv2_port_get_data_type(_lv2_plugin, id);
if (!strcmp(data_type, SLV2_DATA_TYPE_FLOAT)) {
if (is_input) {
diff --git a/src/libs/engine/LashDriver.cpp b/src/libs/engine/LashDriver.cpp
index 79b839bc..706d49c8 100644
--- a/src/libs/engine/LashDriver.cpp
+++ b/src/libs/engine/LashDriver.cpp
@@ -27,19 +27,19 @@ namespace Ingen {
LashDriver::LashDriver(Ingen* app, lash_args_t* args)
-: m_app(app),
- m_client(NULL),
- m_alsa_client_id(0) // FIXME: appropriate sentinel?
+: _app(app),
+ _client(NULL),
+ _alsa_client_id(0) // FIXME: appropriate sentinel?
{
- m_client = lash_init(args, PACKAGE_NAME,
+ _client = lash_init(args, PACKAGE_NAME,
/*LASH_Config_Data_Set|LASH_Config_File*/0, LASH_PROTOCOL(2, 0));
- if (m_client == NULL) {
+ if (_client == NULL) {
cerr << "[LashDriver] Failed to connect to LASH. Session management will not function." << endl;
} else {
cout << "[LashDriver] Lash initialised" << endl;
lash_event_t* event = lash_event_new_with_type(LASH_Client_Name);
lash_event_set_string(event, "Ingen");
- lash_send_event(m_client, event);
+ lash_send_event(_client, event);
}
}
@@ -50,8 +50,8 @@ LashDriver::LashDriver(Ingen* app, lash_args_t* args)
void
LashDriver::set_jack_client_name(const char* name)
{
- m_jack_client_name = name;
- lash_jack_client_name(m_client, m_jack_client_name.c_str());
+ _jack_client_name = name;
+ lash_jack_client_name(_client, _jack_client_name.c_str());
}
@@ -61,8 +61,8 @@ LashDriver::set_jack_client_name(const char* name)
void
LashDriver::set_alsa_client_id(int id)
{
- m_alsa_client_id = id;
- lash_alsa_client_id(m_client, m_alsa_client_id);
+ _alsa_client_id = id;
+ lash_alsa_client_id(_client, _alsa_client_id);
}
@@ -73,32 +73,32 @@ LashDriver::set_alsa_client_id(int id)
void
LashDriver::restore_finished()
{
- assert(m_jack_client_name != "");
- assert(m_alsa_client_id != 0);
+ assert(_jack_client_name != "");
+ assert(_alsa_client_id != 0);
- cerr << "LASH RESTORE FINISHED " << m_jack_client_name << " - " << m_alsa_client_id << endl;
+ cerr << "LASH RESTORE FINISHED " << _jack_client_name << " - " << _alsa_client_id << endl;
- lash_jack_client_name(m_client, m_jack_client_name.c_str());
- lash_alsa_client_id(m_client, m_alsa_client_id);
+ lash_jack_client_name(_client, _jack_client_name.c_str());
+ lash_alsa_client_id(_client, _alsa_client_id);
}
void
LashDriver::process_events()
{
- assert(m_client != NULL);
+ assert(_client != NULL);
lash_event_t* ev = NULL;
lash_config_t* conf = NULL;
// Process events
- while ((ev = lash_get_event(m_client)) != NULL) {
+ while ((ev = lash_get_event(_client)) != NULL) {
handle_event(ev);
lash_event_destroy(ev);
}
// Process configs
- while ((conf = lash_get_config(m_client)) != NULL) {
+ while ((conf = lash_get_config(_client)) != NULL) {
handle_config(conf);
lash_config_destroy(conf);
}
@@ -116,24 +116,24 @@ LashDriver::handle_event(lash_event_t* ev)
/*if (type == LASH_Save_File) {
//cout << "[LashDriver] LASH Save File - " << str << endl;
- m_app->store_window_location();
- m_app->state_manager()->save(str.append("/locations"));
- lash_send_event(m_client, lash_event_new_with_type(LASH_Save_File));
+ _app->store_window_location();
+ _app->state_manager()->save(str.append("/locations"));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Save_File));
} else if (type == LASH_Restore_File) {
//cout << "[LashDriver] LASH Restore File - " << str << endl;
- m_app->state_manager()->load(str.append("/locations"));
- m_app->update_state();
- lash_send_event(m_client, lash_event_new_with_type(LASH_Restore_File));
+ _app->state_manager()->load(str.append("/locations"));
+ _app->update_state();
+ lash_send_event(_client, lash_event_new_with_type(LASH_Restore_File));
} else if (type == LASH_Save_Data_Set) {
//cout << "[LashDriver] LASH Save Data Set - " << endl;
// Tell LASH we're done
- lash_send_event(m_client, lash_event_new_with_type(LASH_Save_Data_Set));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Save_Data_Set));
} else*/
if (type == LASH_Quit) {
//stop_thread();
- m_client = NULL;
- m_app->quit();
+ _client = NULL;
+ _app->quit();
} else {
cerr << "[LashDriver] WARNING: Unhandled lash event, type " << static_cast(type) << endl;
}
diff --git a/src/libs/engine/LashDriver.h b/src/libs/engine/LashDriver.h
index 568e4709..d3dcbf72 100644
--- a/src/libs/engine/LashDriver.h
+++ b/src/libs/engine/LashDriver.h
@@ -34,18 +34,18 @@ class LashDriver
public:
LashDriver(Ingen* app, lash_args_t* args);
- bool enabled() { return (m_client != NULL && lash_enabled(m_client)); }
+ bool enabled() { return (_client != NULL && lash_enabled(_client)); }
void process_events();
void set_jack_client_name(const char* name);
void set_alsa_client_id(int id);
void restore_finished();
private:
- Ingen* m_app;
- lash_client_t* m_client;
+ Ingen* _app;
+ lash_client_t* _client;
- int m_alsa_client_id;
- string m_jack_client_name;
+ int _alsa_client_id;
+ string _jack_client_name;
void handle_event(lash_event_t* conf);
void handle_config(lash_config_t* conf);
diff --git a/src/libs/engine/List.h b/src/libs/engine/List.h
index 7997a6c5..1baf55ac 100644
--- a/src/libs/engine/List.h
+++ b/src/libs/engine/List.h
@@ -32,20 +32,20 @@ template
class ListNode : public MaidObject
{
public:
- ListNode(T elem) : m_elem(elem), m_next(NULL), m_prev(NULL) {}
+ ListNode(T elem) : _elem(elem), _next(NULL), _prev(NULL) {}
virtual ~ListNode() {}
- ListNode* next() const { return m_next; }
- void next(ListNode* ln) { m_next = ln; }
- ListNode* prev() const { return m_prev; }
- void prev(ListNode* ln) { m_prev = ln; }
- T& elem() { return m_elem;}
- const T& elem() const { return m_elem; }
+ ListNode* next() const { return _next; }
+ void next(ListNode* ln) { _next = ln; }
+ ListNode* prev() const { return _prev; }
+ void prev(ListNode* ln) { _prev = ln; }
+ T& elem() { return _elem;}
+ const T& elem() const { return _elem; }
private:
- T m_elem;
- ListNode* m_next;
- ListNode* m_prev;
+ T _elem;
+ ListNode* _next;
+ ListNode* _prev;
};
@@ -59,12 +59,12 @@ template
class List : public MaidObject
{
public:
- List() : m_head(NULL), m_tail(NULL), m_size(0), m_end_iter(this), m_const_end_iter(this)
+ List() : _head(NULL), _tail(NULL), _size(0), _end_iter(this), _const_end_iter(this)
{
- m_end_iter.m_listnode = NULL;
- m_end_iter.m_next = NULL;
- m_const_end_iter.m_listnode = NULL;
- m_const_end_iter.m_next = NULL;
+ _end_iter._listnode = NULL;
+ _end_iter._next = NULL;
+ _const_end_iter._listnode = NULL;
+ _const_end_iter._next = NULL;
}
~List();
@@ -72,7 +72,7 @@ public:
ListNode* remove(const T elem);
void clear();
- size_t size() const { return m_size; }
+ size_t size() const { return _size; }
class iterator;
@@ -82,7 +82,7 @@ public:
public:
const_iterator(const List* const list);
const_iterator(const iterator& i)
- : m_list(i.m_list), m_listnode(i.m_listnode), m_next(i.m_next) {}
+ : _list(i._list), _listnode(i._listnode), _next(i._next) {}
inline const T& operator*();
inline const_iterator& operator++();
@@ -92,9 +92,9 @@ public:
friend class List;
private:
- const List* const m_list;
- const ListNode* m_listnode;
- const ListNode* m_next; // use this instead of m_listnode->next() to allow deleting
+ const List* const _list;
+ const ListNode* _listnode;
+ const ListNode* _next; // use this instead of _listnode->next() to allow deleting
};
@@ -113,9 +113,9 @@ public:
friend class List::const_iterator;
private:
- const List* m_list;
- ListNode* m_listnode;
- ListNode* m_next; // use this instead of m_listnode->next() to allow deleting
+ const List* _list;
+ ListNode* _listnode;
+ ListNode* _next; // use this instead of _listnode->next() to allow deleting
};
@@ -128,11 +128,11 @@ public:
//const_iterator end() const;
private:
- ListNode* m_head;
- ListNode* m_tail;
- size_t m_size;
- iterator m_end_iter;
- const_iterator m_const_end_iter;
+ ListNode* _head;
+ ListNode* _tail;
+ size_t _size;
+ iterator _end_iter;
+ const_iterator _const_end_iter;
};
@@ -153,9 +153,9 @@ template
void
List::clear()
{
- if (m_head == NULL) return;
+ if (_head == NULL) return;
- ListNode* node = m_head;
+ ListNode* node = _head;
ListNode* next = NULL;
while (node != NULL) {
@@ -163,8 +163,8 @@ List::clear()
delete node;
node = next;
}
- m_tail = m_head = NULL;
- m_size = 0;
+ _tail = _head = NULL;
+ _size = 0;
}
@@ -181,15 +181,15 @@ List::push_back(ListNode* const ln)
ln->next(NULL);
// FIXME: atomicity? relevant?
- if (m_head == NULL) {
+ if (_head == NULL) {
ln->prev(NULL);
- m_head = m_tail = ln;
+ _head = _tail = ln;
} else {
- ln->prev(m_tail);
- m_tail->next(ln);
- m_tail = ln;
+ ln->prev(_tail);
+ _tail->next(ln);
+ _tail = ln;
}
- ++m_size;
+ ++_size;
}
@@ -203,21 +203,21 @@ ListNode*
List::remove(const T elem)
{
// FIXME: atomicity?
- ListNode* n = m_head;
+ ListNode* n = _head;
while (n != NULL) {
if (n->elem() == elem)
break;
n = n->next();
}
if (n != NULL) {
- if (n == m_head) m_head = m_head->next();
- if (n == m_tail) m_tail = m_tail->prev();
+ if (n == _head) _head = _head->next();
+ if (n == _tail) _tail = _tail->prev();
if (n->prev() != NULL)
n->prev()->next(n->next());
if (n->next() != NULL)
n->next()->prev(n->prev());
- --m_size;
- if (m_size == 0) m_head = m_tail = NULL; // FIXME: Shouldn't be necessary
+ --_size;
+ if (_size == 0) _head = _tail = NULL; // FIXME: Shouldn't be necessary
return n;
}
return NULL;
@@ -233,16 +233,16 @@ template
ListNode*
List::remove(const iterator iter)
{
- ListNode* n = iter.m_listnode;
+ ListNode* n = iter._listnode;
if (n != NULL) {
- if (n == m_head) m_head = m_head->next();
- if (n == m_tail) m_tail = m_tail->prev();
+ if (n == _head) _head = _head->next();
+ if (n == _tail) _tail = _tail->prev();
if (n->prev() != NULL)
n->prev()->next(n->next());
if (n->next() != NULL)
n->next()->prev(n->prev());
- --m_size;
- if (m_size == 0) m_head = m_tail = NULL; // FIXME: Shouldn't be necessary
+ --_size;
+ if (_size == 0) _head = _tail = NULL; // FIXME: Shouldn't be necessary
return n;
}
return NULL;
@@ -253,9 +253,9 @@ List::remove(const iterator iter)
template
List::iterator::iterator(List* list)
-: m_list(list),
- m_listnode(NULL),
- m_next(NULL)
+: _list(list),
+ _listnode(NULL),
+ _next(NULL)
{
}
@@ -264,8 +264,8 @@ template
T&
List::iterator::operator*()
{
- assert(m_listnode != NULL);
- return m_listnode->elem();
+ assert(_listnode != NULL);
+ return _listnode->elem();
}
@@ -273,12 +273,12 @@ template
inline typename List::iterator&
List::iterator::operator++()
{
- assert(m_listnode != NULL);
- m_listnode = m_next;
- if (m_next != NULL)
- m_next = m_next->next();
+ assert(_listnode != NULL);
+ _listnode = _next;
+ if (_next != NULL)
+ _next = _next->next();
else
- m_next = NULL;
+ _next = NULL;
return *this;
}
@@ -288,7 +288,7 @@ template
inline bool
List::iterator::operator!=(const iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -296,7 +296,7 @@ template
inline bool
List::iterator::operator!=(const const_iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -305,11 +305,11 @@ inline typename List::iterator
List::begin()
{
typename List::iterator iter(this);
- iter.m_listnode = m_head;
- if (m_head != NULL)
- iter.m_next = m_head->next();
+ iter._listnode = _head;
+ if (_head != NULL)
+ iter._next = _head->next();
else
- iter.m_next = NULL;
+ iter._next = NULL;
return iter;
}
@@ -319,10 +319,10 @@ inline const typename List::iterator
List::end() const
{
/*typename List::iterator iter(this);
- iter.m_listnode = NULL;
- iter.m_next = NULL;
+ iter._listnode = NULL;
+ iter._next = NULL;
return iter;*/
- return m_end_iter;
+ return _end_iter;
}
@@ -332,9 +332,9 @@ List::end() const
template
List::const_iterator::const_iterator(const List* const list)
-: m_list(list),
- m_listnode(NULL),
- m_next(NULL)
+: _list(list),
+ _listnode(NULL),
+ _next(NULL)
{
}
@@ -343,8 +343,8 @@ template
const T&
List::const_iterator::operator*()
{
- assert(m_listnode != NULL);
- return m_listnode->elem();
+ assert(_listnode != NULL);
+ return _listnode->elem();
}
@@ -352,12 +352,12 @@ template
inline typename List::const_iterator&
List::const_iterator::operator++()
{
- assert(m_listnode != NULL);
- m_listnode = m_next;
- if (m_next != NULL)
- m_next = m_next->next();
+ assert(_listnode != NULL);
+ _listnode = _next;
+ if (_next != NULL)
+ _next = _next->next();
else
- m_next = NULL;
+ _next = NULL;
return *this;
}
@@ -367,7 +367,7 @@ template
inline bool
List::const_iterator::operator!=(const const_iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -375,7 +375,7 @@ template
inline bool
List::const_iterator::operator!=(const iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -384,11 +384,11 @@ inline typename List::const_iterator
List::begin() const
{
typename List::const_iterator iter(this);
- iter.m_listnode = m_head;
- if (m_head != NULL)
- iter.m_next = m_head->next();
+ iter._listnode = _head;
+ if (_head != NULL)
+ iter._next = _head->next();
else
- iter.m_next = NULL;
+ iter._next = NULL;
return iter;
}
@@ -398,10 +398,10 @@ inline typename List::const_iterator
List::end() const
{
/*typename List::const_iterator iter(this);
- iter.m_listnode = NULL;
- iter.m_next = NULL;
+ iter._listnode = NULL;
+ iter._next = NULL;
return iter;*/
- return m_const_end_iter;
+ return _const_end_iter;
}
#endif
diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp
index 73711ab4..69febce8 100644
--- a/src/libs/engine/OSCEngineReceiver.cpp
+++ b/src/libs/engine/OSCEngineReceiver.cpp
@@ -277,7 +277,7 @@ OSCEngineReceiver::error_cb(int num, const char* msg, const char* path)
* \arg \b response-id (integer)
\n \n
*/
int
-OSCEngineReceiver::m_ping_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_ping_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
_responder->respond_ok();
return 0;
@@ -294,7 +294,7 @@ OSCEngineReceiver::m_ping_cb(const char* path, const char* types, lo_arg** argv,
* finished processing. \n \n
*/
int
-OSCEngineReceiver::m_ping_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_ping_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
ping();
return 0;
@@ -310,7 +310,7 @@ OSCEngineReceiver::m_ping_slow_cb(const char* path, const char* types, lo_arg**
* 10 messages would never get executed. \n \n
*/
int
-OSCEngineReceiver::m_quit_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_quit_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
quit();
@@ -325,7 +325,7 @@ OSCEngineReceiver::m_quit_cb(const char* path, const char* types, lo_arg** argv,
* want to register a different specific address, use the URL version.
*/
int
-OSCEngineReceiver::m_register_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_register_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
lo_address addr = lo_message_get_source(msg);
@@ -343,7 +343,7 @@ OSCEngineReceiver::m_register_client_cb(const char* path, const char* types, lo_
* \arg \b response-id (integer) \n \n
*/
int
-OSCEngineReceiver::m_unregister_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_unregister_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
lo_address addr = lo_message_get_source(msg);
@@ -360,7 +360,7 @@ OSCEngineReceiver::m_unregister_client_cb(const char* path, const char* types, l
* \arg \b response-id (integer) \n \n
*/
int
-OSCEngineReceiver::m_load_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_load_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
load_plugins();
return 0;
@@ -375,7 +375,7 @@ OSCEngineReceiver::m_load_plugins_cb(const char* path, const char* types, lo_arg
* anything at all - including respond to your messages! \n \n
*/
int
-OSCEngineReceiver::m_engine_activate_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_engine_activate_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
QueuedEngineInterface::activate();
return 0;
@@ -387,7 +387,7 @@ OSCEngineReceiver::m_engine_activate_cb(const char* path, const char* types, lo_
* \arg \b response-id (integer) \n \n
*/
int
-OSCEngineReceiver::m_engine_deactivate_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_engine_deactivate_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
QueuedEngineInterface::deactivate();
return 0;
@@ -401,7 +401,7 @@ OSCEngineReceiver::m_engine_deactivate_cb(const char* path, const char* types, l
* \arg \b poly (integer) - Patch's (internal) polyphony \n \n
*/
int
-OSCEngineReceiver::m_create_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_create_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
const int poly = argv[2]->i;
@@ -418,7 +418,7 @@ OSCEngineReceiver::m_create_patch_cb(const char* path, const char* types, lo_arg
* \arg \b name - New name for object \n \n
*/
int
-OSCEngineReceiver::m_rename_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_rename_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* object_path = &argv[1]->s;
const char* name = &argv[2]->s;
@@ -434,7 +434,7 @@ OSCEngineReceiver::m_rename_cb(const char* path, const char* types, lo_arg** arg
* \arg \b patch-path - Patch's path
*/
int
-OSCEngineReceiver::m_enable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_enable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
@@ -449,7 +449,7 @@ OSCEngineReceiver::m_enable_patch_cb(const char* path, const char* types, lo_arg
* \arg \b patch-path - Patch's path
*/
int
-OSCEngineReceiver::m_disable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_disable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
@@ -464,7 +464,7 @@ OSCEngineReceiver::m_disable_patch_cb(const char* path, const char* types, lo_ar
* \arg \b patch-path - Patch's path
*/
int
-OSCEngineReceiver::m_clear_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_clear_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
@@ -481,7 +481,7 @@ OSCEngineReceiver::m_clear_patch_cb(const char* path, const char* types, lo_arg*
* \arg \b direction ("is-output") (integer) - Direction of data flow (Input = 0, Output = 1) \n \n
*/
int
-OSCEngineReceiver::m_create_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_create_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
const char* data_type = &argv[2]->s;
@@ -499,7 +499,7 @@ OSCEngineReceiver::m_create_port_cb(const char* path, const char* types, lo_arg*
* \arg \b poly (integer-boolean) - Whether node is polyphonic (0 = false, 1 = true) \n \n
*/
int
-OSCEngineReceiver::m_create_node_by_uri_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_create_node_by_uri_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
const char* plug_uri = &argv[2]->s;
@@ -526,7 +526,7 @@ OSCEngineReceiver::m_create_node_by_uri_cb(const char* path, const char* types,
* \n \n
*/
int
-OSCEngineReceiver::m_create_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_create_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
const char* type = &argv[2]->s;
@@ -545,7 +545,7 @@ OSCEngineReceiver::m_create_node_cb(const char* path, const char* types, lo_arg*
* \arg \b node-path (string) - Full path of the object \n \n
*/
int
-OSCEngineReceiver::m_destroy_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_destroy_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
@@ -561,7 +561,7 @@ OSCEngineReceiver::m_destroy_cb(const char* path, const char* types, lo_arg** ar
* \arg \b dst-port-path (string) - Full path of destination port \n \n
*/
int
-OSCEngineReceiver::m_connect_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_connect_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* src_port_path = &argv[1]->s;
const char* dst_port_path = &argv[2]->s;
@@ -578,7 +578,7 @@ OSCEngineReceiver::m_connect_cb(const char* path, const char* types, lo_arg** ar
* \arg \b dst-port-path (string) - Full path of destination port \n \n
*/
int
-OSCEngineReceiver::m_disconnect_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_disconnect_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* src_port_path = &argv[1]->s;
const char* dst_port_path = &argv[2]->s;
@@ -594,7 +594,7 @@ OSCEngineReceiver::m_disconnect_cb(const char* path, const char* types, lo_arg**
* \arg \b node-path (string) - Full path of node. \n \n
*/
int
-OSCEngineReceiver::m_disconnect_all_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_disconnect_all_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
@@ -610,7 +610,7 @@ OSCEngineReceiver::m_disconnect_all_cb(const char* path, const char* types, lo_a
* \arg \b value (float) - Value to set port to
*/
int
-OSCEngineReceiver::m_set_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_set_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
const float value = argv[2]->f;
@@ -628,7 +628,7 @@ OSCEngineReceiver::m_set_port_value_cb(const char* path, const char* types, lo_a
* \arg \b value (float) - Value to set port to
*/
int
-OSCEngineReceiver::m_set_port_value_voice_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_set_port_value_voice_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
const int voice = argv[2]->i;
@@ -650,7 +650,7 @@ OSCEngineReceiver::m_set_port_value_voice_cb(const char* path, const char* types
* slow event and arrive out of order). \n \n
*/
int
-OSCEngineReceiver::m_set_port_value_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_set_port_value_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
const float value = argv[2]->f;
@@ -668,7 +668,7 @@ OSCEngineReceiver::m_set_port_value_slow_cb(const char* path, const char* types,
* \arg \b velocity (int) - MIDI style velocity (0-127) \n \n
*/
int
-OSCEngineReceiver::m_note_on_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_note_on_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/*
@@ -689,7 +689,7 @@ OSCEngineReceiver::m_note_on_cb(const char* path, const char* types, lo_arg** ar
* \arg \b note-num (int) - MIDI style note number (0-127) \n \n
*/
int
-OSCEngineReceiver::m_note_off_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_note_off_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/*
@@ -708,7 +708,7 @@ OSCEngineReceiver::m_note_off_cb(const char* path, const char* types, lo_arg** a
* \arg \b patch-path (string) - Patch of patch to send event to \n \n
*/
int
-OSCEngineReceiver::m_all_notes_off_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_all_notes_off_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/*
@@ -731,7 +731,7 @@ OSCEngineReceiver::m_all_notes_off_cb(const char* path, const char* types, lo_ar
* method will go away completely. \n \n
*/
int
-OSCEngineReceiver::m_midi_learn_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_midi_learn_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
@@ -747,7 +747,7 @@ OSCEngineReceiver::m_midi_learn_cb(const char* path, const char* types, lo_arg**
* \arg \b response-id (integer)
*/
int
-OSCEngineReceiver::m_lash_restore_done_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_lash_restore_done_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
lash_restore_done();
return 0;
@@ -763,7 +763,7 @@ OSCEngineReceiver::m_lash_restore_done_cb(const char* path, const char* types, l
* \arg \b value (string) - Value of new piece of metadata
*/
int
-OSCEngineReceiver::m_metadata_set_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_metadata_set_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
if (argc != 4 || types[0] != 'i' || types[1] != 's' || types[2] != 's')
return 1;
@@ -788,7 +788,7 @@ OSCEngineReceiver::m_metadata_set_cb(const char* path, const char* types, lo_arg
* \li Reply will be sent to client registered with the source address of this message. \n \n
*/
int
-OSCEngineReceiver::m_metadata_get_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_metadata_get_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/*
const char* node_path = &argv[1]->s;
@@ -814,7 +814,7 @@ OSCEngineReceiver::m_metadata_get_cb(const char* path, const char* types, lo_arg
* \li Reply will be sent to client registered with the source address of this message. \n \n
*/
int
-OSCEngineReceiver::m_request_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* uri = &argv[1]->s;
@@ -832,7 +832,7 @@ OSCEngineReceiver::m_request_plugin_cb(const char* path, const char* types, lo_a
* \li Reply will be sent to client registered with the source address of this message. \n \n
*/
int
-OSCEngineReceiver::m_request_object_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_object_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* object_path = &argv[1]->s;
@@ -850,7 +850,7 @@ OSCEngineReceiver::m_request_object_cb(const char* path, const char* types, lo_a
* \li Reply will be sent to client registered with the source address of this message. \n \n
*/
int
-OSCEngineReceiver::m_request_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
@@ -866,7 +866,7 @@ OSCEngineReceiver::m_request_port_value_cb(const char* path, const char* types,
* \li Reply will be sent to client registered with the source address of this message. \n \n
*/
int
-OSCEngineReceiver::m_request_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
request_plugins();
return 0;
@@ -880,7 +880,7 @@ OSCEngineReceiver::m_request_plugins_cb(const char* path, const char* types, lo_
* \li Reply will be sent to client registered with the source address of this message. \n \n
*/
int
-OSCEngineReceiver::m_request_all_objects_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_all_objects_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
request_all_objects();
return 0;
@@ -889,7 +889,7 @@ OSCEngineReceiver::m_request_all_objects_cb(const char* path, const char* types,
#ifdef HAVE_DSSI
int
-OSCEngineReceiver::m_dssi_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_dssi_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
#if 0
string node_path(path);
diff --git a/src/libs/engine/OSCEngineReceiver.h b/src/libs/engine/OSCEngineReceiver.h
index b15ffe78..1df4c7b6 100644
--- a/src/libs/engine/OSCEngineReceiver.h
+++ b/src/libs/engine/OSCEngineReceiver.h
@@ -39,9 +39,9 @@ class Patch;
* wrapper around a non-static method that does the real work. Makes a whoole
* lot of ugly boiler plate go away */
#define LO_HANDLER(name) \
-int m_##name##_cb (LO_HANDLER_ARGS);\
+int _##name##_cb (LO_HANDLER_ARGS);\
inline static int name##_cb(LO_HANDLER_ARGS, void* myself)\
-{ return ((OSCEngineReceiver*)myself)->m_##name##_cb(path, types, argv, argc, msg); }
+{ return ((OSCEngineReceiver*)myself)->_##name##_cb(path, types, argv, argc, msg); }
/* FIXME: Make this receive and preprocess in the same thread? */
diff --git a/src/libs/engine/ObjectStore.cpp b/src/libs/engine/ObjectStore.cpp
index 87005d1f..48864bf7 100644
--- a/src/libs/engine/ObjectStore.cpp
+++ b/src/libs/engine/ObjectStore.cpp
@@ -60,7 +60,7 @@ ObjectStore::find_port(const Path& path)
GraphObject*
ObjectStore::find(const Path& path)
{
- return m_objects.find(path);
+ return _objects.find(path);
}
@@ -70,7 +70,7 @@ void
ObjectStore::add(GraphObject* o)
{
cerr << "[ObjectStore] Adding " << o->path() << endl;
- m_objects.insert(new TreeNode(o->path(), o));
+ _objects.insert(new TreeNode(o->path(), o));
}
@@ -80,7 +80,7 @@ void
ObjectStore::add(TreeNode* tn)
{
cerr << "[ObjectStore] Adding " << tn->key() << endl;
- m_objects.insert(tn);
+ _objects.insert(tn);
}
@@ -93,7 +93,7 @@ ObjectStore::add(TreeNode* tn)
TreeNode*
ObjectStore::remove(const string& path)
{
- TreeNode* const removed = m_objects.remove(path);
+ TreeNode* const removed = _objects.remove(path);
if (removed == NULL)
cerr << "[ObjectStore] WARNING: Removing " << path << " failed." << endl;
diff --git a/src/libs/engine/ObjectStore.h b/src/libs/engine/ObjectStore.h
index 014d156c..2d3c225c 100644
--- a/src/libs/engine/ObjectStore.h
+++ b/src/libs/engine/ObjectStore.h
@@ -51,10 +51,10 @@ public:
void add(TreeNode* o);
TreeNode* remove(const string& key);
- const Tree& objects() { return m_objects; }
+ const Tree& objects() { return _objects; }
private:
- Tree m_objects;
+ Tree _objects;
};
diff --git a/src/libs/engine/PluginLibrary.h b/src/libs/engine/PluginLibrary.h
index 6f79ee57..dc4cbfeb 100644
--- a/src/libs/engine/PluginLibrary.h
+++ b/src/libs/engine/PluginLibrary.h
@@ -43,7 +43,7 @@ public:
* successfully dlopen'ed.
*/
PluginLibrary(const string& path)
- : m_path(path), m_handle(NULL)
+ : _path(path), _handle(NULL)
{}
~PluginLibrary()
@@ -59,12 +59,12 @@ public:
*/
void open()
{
- if (m_handle == NULL) {
+ if (_handle == NULL) {
dlerror();
- m_handle = dlopen(m_path.c_str(), RTLD_NOW);
- if (m_handle == NULL)
+ _handle = dlopen(_path.c_str(), RTLD_NOW);
+ if (_handle == NULL)
cerr << "[PluginLibrary] Warning: Error opening shared library "
- << m_path << "(" << dlerror() << ")" << endl;
+ << _path << "(" << dlerror() << ")" << endl;
}
}
@@ -74,20 +74,20 @@ public:
*/
void close()
{
- if (m_handle != NULL) {
+ if (_handle != NULL) {
dlerror();
- if (dlclose(m_handle))
- cerr << "[PluginLibrary] Error closing shared library " << m_path
+ if (dlclose(_handle))
+ cerr << "[PluginLibrary] Error closing shared library " << _path
<< "(" << dlerror() << ")" << endl;
}
- m_handle = NULL;
+ _handle = NULL;
}
- void* handle() const { return m_handle; }
+ void* handle() const { return _handle; }
private:
- string m_path;
- void* m_handle;
+ string _path;
+ void* _handle;
};
diff --git a/src/libs/engine/TransportNode.cpp b/src/libs/engine/TransportNode.cpp
index caab50d2..e0e89f6d 100644
--- a/src/libs/engine/TransportNode.cpp
+++ b/src/libs/engine/TransportNode.cpp
@@ -121,12 +121,12 @@ TransportNode::process(SampleCount nframes, FrameTime start, FrameTime end)
}
- ((OutputPort*)m_ports.at(0))->buffer(0)->set(spb, 0, 0);
- ((OutputPort*)m_ports.at(1))->buffer(0)->set(bpb, 0, 0);
+ ((OutputPort*)_ports.at(0))->buffer(0)->set(spb, 0, 0);
+ ((OutputPort*)_ports.at(1))->buffer(0)->set(bpb, 0, 0);
// fill the trigger buffers with zeros
- ((OutputPort*)m_ports.at(2))->buffer(0)->set(0.0f, 0, nframes - 1);
- ((OutputPort*)m_ports.at(3))->buffer(0)->set(0.0f, 0, nframes - 1);
+ ((OutputPort*)_ports.at(2))->buffer(0)->set(0.0f, 0, nframes - 1);
+ ((OutputPort*)_ports.at(3))->buffer(0)->set(0.0f, 0, nframes - 1);
// if the transport is rolling, add triggers at the right frame positions
if ((position->valid & JackTransportBBT) && (state == JackTransportRolling)) {
@@ -138,9 +138,9 @@ TransportNode::process(SampleCount nframes, FrameTime start, FrameTime end)
--first_beat_no;
}
for ( ; first_beat < nframes; first_beat += frames_per_beat) {
- ((OutputPort*)m_ports.at(2))->buffer(0)->set(1.0f, size_t(first_beat));
+ ((OutputPort*)_ports.at(2))->buffer(0)->set(1.0f, size_t(first_beat));
if (first_beat_no % int(bpb) == 0) {
- ((OutputPort*)m_ports.at(3))->buffer(0)->set(1.0f, size_t(first_beat));
+ ((OutputPort*)_ports.at(3))->buffer(0)->set(1.0f, size_t(first_beat));
++first_beat_no;
}
}
diff --git a/src/libs/engine/Tree.h b/src/libs/engine/Tree.h
index 8750b717..605e6b3d 100644
--- a/src/libs/engine/Tree.h
+++ b/src/libs/engine/Tree.h
@@ -33,44 +33,44 @@ class TreeNode : public MaidObject
{
public:
TreeNode(const string& key)
- : m_parent(NULL), m_left_child(NULL), m_right_child(NULL),
- m_key(key), m_node(NULL) {}
+ : _parent(NULL), _left_child(NULL), _right_child(NULL),
+ _key(key), _node(NULL) {}
TreeNode(const string& key, T n)
- : m_parent(NULL), m_left_child(NULL), m_right_child(NULL),
- m_key(key), m_node(n) {}
+ : _parent(NULL), _left_child(NULL), _right_child(NULL),
+ _key(key), _node(n) {}
~TreeNode() {
- assert(m_parent == NULL || m_parent->left_child() != this);
- assert(m_parent == NULL || m_parent->right_child() != this);
- assert(m_left_child == NULL || m_left_child->parent() != this);
- assert(m_right_child == NULL || m_right_child->parent() != this);
- m_parent = m_left_child = m_right_child = NULL;
+ assert(_parent == NULL || _parent->left_child() != this);
+ assert(_parent == NULL || _parent->right_child() != this);
+ assert(_left_child == NULL || _left_child->parent() != this);
+ assert(_right_child == NULL || _right_child->parent() != this);
+ _parent = _left_child = _right_child = NULL;
}
- string key() const { return m_key; }
- void key(const string& key) { m_key = key; }
- TreeNode* parent() const { return m_parent; }
- void parent(TreeNode* n) { m_parent = n; }
- TreeNode* left_child() const { return m_left_child; }
- void left_child(TreeNode* n) { m_left_child = n; }
- TreeNode* right_child() const { return m_right_child; }
- void right_child(TreeNode* n) { m_right_child = n; }
+ string key() const { return _key; }
+ void key(const string& key) { _key = key; }
+ TreeNode* parent() const { return _parent; }
+ void parent(TreeNode* n) { _parent = n; }
+ TreeNode* left_child() const { return _left_child; }
+ void left_child(TreeNode* n) { _left_child = n; }
+ TreeNode* right_child() const { return _right_child; }
+ void right_child(TreeNode* n) { _right_child = n; }
- bool is_leaf() { return (m_left_child == NULL && m_right_child == NULL); }
- bool is_left_child() { return (m_parent != NULL && m_parent->left_child() == this); }
- bool is_right_child() { return (m_parent != NULL && m_parent->right_child() == this); }
+ bool is_leaf() { return (_left_child == NULL && _right_child == NULL); }
+ bool is_left_child() { return (_parent != NULL && _parent->left_child() == this); }
+ bool is_right_child() { return (_parent != NULL && _parent->right_child() == this); }
- T node() { return m_node; }
+ T node() { return _node; }
friend class Tree;
protected:
- TreeNode* m_parent;
- TreeNode* m_left_child;
- TreeNode* m_right_child;
- string m_key;
- T m_node;
+ TreeNode* _parent;
+ TreeNode* _left_child;
+ TreeNode* _right_child;
+ string _key;
+ T _node;
};
@@ -92,7 +92,7 @@ template
class Tree : boost::noncopyable
{
public:
- Tree() : m_root(0), m_size(0) {}
+ Tree() : _root(0), _size(0) {}
~Tree();
void insert(TreeNode* const n);
@@ -100,7 +100,7 @@ public:
T find(const string& key) const;
TreeNode* find_treenode(const string& key) const;
- size_t size() const { return m_size; }
+ size_t size() const { return _size; }
/** NON realtime safe iterator for a Tree. */
class iterator
@@ -119,23 +119,23 @@ public:
iterator& operator=(const iterator& copy);
private:
- int m_depth;
- size_t m_size;
- TreeNode** m_stack;
- const Tree* m_tree;
+ int _depth;
+ size_t _size;
+ TreeNode** _stack;
+ const Tree* _tree;
};
iterator begin() const;
iterator end() const;
private:
- void m_set_all_traversed_recursive(TreeNode* root, bool b);
+ void _set_all_traversed_recursive(TreeNode* root, bool b);
- TreeNode* m_find_smallest(TreeNode* root);
- TreeNode* m_find_largest(TreeNode* root);
+ TreeNode* _find_smallest(TreeNode* root);
+ TreeNode* _find_largest(TreeNode* root);
- TreeNode* m_root;
- size_t m_size;
+ TreeNode* _root;
+ size_t _size;
};
diff --git a/src/libs/engine/TreeImplementation.h b/src/libs/engine/TreeImplementation.h
index b00da7f2..1e30e5f7 100644
--- a/src/libs/engine/TreeImplementation.h
+++ b/src/libs/engine/TreeImplementation.h
@@ -51,12 +51,12 @@ Tree::insert(TreeNode* const n)
assert(n->key().length() > 0);
assert(find_treenode(n->key()) == NULL);
- if (m_root == NULL) {
- m_root = n;
+ if (_root == NULL) {
+ _root = n;
} else {
bool left = false; // which child to insert at
bool right = false;
- TreeNode* i = m_root;
+ TreeNode* i = _root;
while (true) {
assert(i != NULL);
if (n->key() <= i->key()) {
@@ -89,7 +89,7 @@ Tree::insert(TreeNode* const n)
}
n->parent(i);
}
- ++m_size;
+ ++_size;
}
@@ -113,7 +113,7 @@ Tree::remove(const string& key)
return NULL;
// Node is not even in tree
- if (node->parent() == NULL && m_root != node)
+ if (node->parent() == NULL && _root != node)
return NULL;
// FIXME: What if the node is in a different tree? Check for this?
@@ -124,19 +124,19 @@ Tree::remove(const string& key)
// n has two children
if (n->left_child() != NULL && n->right_child() != NULL) {
if (rand()%2)
- swap = m_find_largest(n->left_child());
+ swap = _find_largest(n->left_child());
else
- swap = m_find_smallest(n->right_child());
+ swap = _find_smallest(n->right_child());
// Swap node's elements
- temp_node = swap->m_node;
- swap->m_node = n->m_node;
- n->m_node = temp_node;
+ temp_node = swap->_node;
+ swap->_node = n->_node;
+ n->_node = temp_node;
// Swap node's keys
- temp_key = swap->m_key;
- swap->m_key = n->m_key;
- n->m_key = temp_key;
+ temp_key = swap->_key;
+ swap->_key = n->_key;
+ n->_key = temp_key;
n = swap;
assert(n != NULL);
@@ -154,7 +154,7 @@ Tree::remove(const string& key)
else if (n->is_right_child())
n->parent()->right_child(NULL);
- if (m_root == n) m_root = NULL;
+ if (_root == n) _root = NULL;
} else { // has a single child
TreeNode* child = NULL;
if (n->left_child() != NULL)
@@ -179,7 +179,7 @@ Tree::remove(const string& key)
} else {
child->parent(NULL);
}
- if (m_root == n) m_root = child;
+ if (_root == n) _root = child;
}
// Be sure node is cut off completely
@@ -188,15 +188,15 @@ Tree::remove(const string& key)
assert(n->parent() == NULL || n->parent()->right_child() != n);
assert(n->left_child() == NULL || n->left_child()->parent() != n);
assert(n->right_child() == NULL || n->right_child()->parent() != n);
- assert(m_root != n);
+ assert(_root != n);
n->parent(NULL);
n->left_child(NULL);
n->right_child(NULL);
- --m_size;
+ --_size;
- if (m_size == 0) m_root = NULL;
+ if (_size == 0) _root = NULL;
// Be sure right node is being removed
assert(n->node() == remove_node);
@@ -219,7 +219,7 @@ template
TreeNode*
Tree::find_treenode(const string& name) const
{
- TreeNode* i = m_root;
+ TreeNode* i = _root;
int cmp = 0;
while (i != NULL) {
@@ -239,16 +239,16 @@ Tree::find_treenode(const string& name) const
/// Private ///
template
void
-Tree::m_set_all_traversed_recursive(TreeNode* root, bool b)
+Tree::_set_all_traversed_recursive(TreeNode* root, bool b)
{
assert(root != NULL);
// Preorder traversal
root->node()->traversed(b);
if (root->left_child() != NULL)
- m_set_all_traversed_recursive(root->left_child(), b);
+ _set_all_traversed_recursive(root->left_child(), b);
if (root->right_child() != NULL)
- m_set_all_traversed_recursive(root->right_child(), b);
+ _set_all_traversed_recursive(root->right_child(), b);
}
@@ -256,7 +256,7 @@ Tree::m_set_all_traversed_recursive(TreeNode* root, bool b)
*/
template
TreeNode*
-Tree::m_find_smallest(TreeNode* root)
+Tree::_find_smallest(TreeNode* root)
{
TreeNode* r = root;
@@ -271,7 +271,7 @@ Tree::m_find_smallest(TreeNode* root)
*/
template
TreeNode*
-Tree::m_find_largest(TreeNode* root)
+Tree::_find_largest(TreeNode* root)
{
TreeNode* r = root;
@@ -290,20 +290,20 @@ Tree::m_find_largest(TreeNode* root)
template
Tree::iterator::iterator(const Tree *tree, size_t size)
-: m_depth(-1),
- m_size(size),
- m_stack(NULL),
- m_tree(tree)
+: _depth(-1),
+ _size(size),
+ _stack(NULL),
+ _tree(tree)
{
if (size > 0)
- m_stack = new TreeNode*[size];
+ _stack = new TreeNode*[size];
}
template
Tree::iterator::~iterator()
{
- delete[] m_stack;
+ delete[] _stack;
}
@@ -314,13 +314,13 @@ Tree::iterator::~iterator()
// Copy constructor (for the typical for loop usage)
template
Tree::iterator::iterator(const Tree::iterator& copy)
-: m_depth(copy.m_depth),
- m_size(copy.m_size),
- m_tree(copy.m_tree)
+: _depth(copy._depth),
+ _size(copy._size),
+ _tree(copy._tree)
{
- if (m_size > 0) {
- m_stack = new TreeNode*[m_size];
- memcpy(m_stack, copy.m_stack, m_size * sizeof(TreeNode*));
+ if (_size > 0) {
+ _stack = new TreeNode*[_size];
+ memcpy(_stack, copy._stack, _size * sizeof(TreeNode*));
}
}
@@ -329,13 +329,13 @@ Tree::iterator::iterator(const Tree::iterator& copy)
template
typename Tree::iterator&
Tree::iterator::operator=(const Tree::iterator& copy) {
- m_depth = copy.m_depth;
- m_size = copy.m_size;
- m_tree = copy.m_tree;
+ _depth = copy._depth;
+ _size = copy._size;
+ _tree = copy._tree;
- if (m_size > 0) {
- m_stack = new TreeNode*[m_size];
- memcpy(m_stack, copy.m_stack, m_size * sizeof(TreeNode*));
+ if (_size > 0) {
+ _stack = new TreeNode*[_size];
+ memcpy(_stack, copy._stack, _size * sizeof(TreeNode*));
}
return *this;
}
@@ -345,8 +345,8 @@ template
T
Tree::iterator::operator*() const
{
- assert(m_depth >= 0);
- return m_stack[m_depth]->node();
+ assert(_depth >= 0);
+ return _stack[_depth]->node();
}
@@ -354,15 +354,15 @@ template
typename Tree::iterator&
Tree::iterator::operator++()
{
- assert(m_depth >= 0);
+ assert(_depth >= 0);
- TreeNode* tn = m_stack[m_depth];
- --m_depth;
+ TreeNode* tn = _stack[_depth];
+ --_depth;
tn = tn->right_child();
while (tn != NULL) {
- ++m_depth;
- m_stack[m_depth] = tn;
+ ++_depth;
+ _stack[_depth] = tn;
tn = tn->left_child();
}
@@ -375,7 +375,7 @@ bool
Tree::iterator::operator!=(const Tree::iterator& iter) const
{
// (DeMorgan's Law)
- return (m_tree != iter.m_tree || m_depth != iter.m_depth);
+ return (_tree != iter._tree || _depth != iter._depth);
}
@@ -383,13 +383,13 @@ template
typename Tree::iterator
Tree::begin() const
{
- typename Tree::iterator iter(this, m_size);
- iter.m_depth = -1;
+ typename Tree::iterator iter(this, _size);
+ iter._depth = -1;
- TreeNode *ptr = m_root;
+ TreeNode *ptr = _root;
while (ptr != NULL) {
- iter.m_depth++;
- iter.m_stack[iter.m_depth] = ptr;
+ iter._depth++;
+ iter._stack[iter._depth] = ptr;
ptr = ptr->left_child();
}
@@ -402,7 +402,7 @@ typename Tree::iterator
Tree::end() const
{
typename Tree::iterator iter(this, 0);
- iter.m_depth = -1;
+ iter._depth = -1;
return iter;
}
diff --git a/src/libs/engine/TypedConnection.cpp b/src/libs/engine/TypedConnection.cpp
index d4391fab..e85e3cf3 100644
--- a/src/libs/engine/TypedConnection.cpp
+++ b/src/libs/engine/TypedConnection.cpp
@@ -32,21 +32,21 @@ namespace Ingen {
template
TypedConnection::TypedConnection(OutputPort* const src_port, InputPort* const dst_port)
: Connection(src_port, dst_port),
- m_local_buffer(NULL),
- m_must_mix(true),
- m_buffer_size(src_port->buffer_size()),
- m_pending_disconnection(false)
+ _local_buffer(NULL),
+ _must_mix(true),
+ _buffer_size(src_port->buffer_size()),
+ _pending_disconnection(false)
{
assert((src_port->parent_node()->poly() == dst_port->parent_node()->poly())
|| (src_port->parent_node()->poly() == 1 || dst_port->parent_node()->poly() == 1));
if (src_port->poly() == dst_port->poly())
- m_must_mix = false;
+ _must_mix = false;
else // Poly -> Mono connection, need a buffer to mix into
- m_local_buffer = new Buffer(m_buffer_size);
+ _local_buffer = new Buffer(_buffer_size);
//cerr << "Connection " << src_port->path() << " -> " << dst_port->path()
- // << "\t mixing: " << m_must_mix << endl;
+ // << "\t mixing: " << _must_mix << endl;
}
template TypedConnection::TypedConnection(OutputPort* const src_port, InputPort* const dst_port);
template TypedConnection::TypedConnection(OutputPort* const src_port, InputPort* const dst_port);
@@ -55,7 +55,7 @@ template TypedConnection::TypedConnection(OutputPort*
template
TypedConnection::~TypedConnection()
{
- delete m_local_buffer;
+ delete _local_buffer;
}
template TypedConnection::~TypedConnection();
template TypedConnection::~TypedConnection();
@@ -66,14 +66,14 @@ template
void
TypedConnection::set_buffer_size(size_t size)
{
- if (m_must_mix) {
- assert(m_local_buffer);
- delete m_local_buffer;
+ if (_must_mix) {
+ assert(_local_buffer);
+ delete _local_buffer;
- m_local_buffer = new Buffer(size);
+ _local_buffer = new Buffer(size);
}
- m_buffer_size = size;
+ _buffer_size = size;
}
@@ -82,7 +82,7 @@ void
TypedConnection::process(SampleCount nframes, FrameTime start, FrameTime end)
{
// FIXME: nframes parameter not used
- assert(m_buffer_size == 1 || m_buffer_size == nframes);
+ assert(_buffer_size == 1 || _buffer_size == nframes);
/* Thought: A poly output port can be connected to multiple mono input
* ports, which means this mix down would have to happen many times.
@@ -91,20 +91,20 @@ TypedConnection::process(SampleCount nframes, FrameTime start, FrameTime
* would avoid having to mix multiple times. Probably not a very common
* case, but it would be faster anyway. */
- if (m_must_mix) {
+ if (_must_mix) {
//cerr << "Mixing " << src_port()->buffer(0)->data()
- // << " -> " << m_local_buffer->data() << endl;
+ // << " -> " << _local_buffer->data() << endl;
- m_local_buffer->copy(src_port()->buffer(0), 0, m_buffer_size-1);
+ _local_buffer->copy(src_port()->buffer(0), 0, _buffer_size-1);
// Mix all the source's voices down into local buffer starting at the second
// voice (buffer is already set to first voice above)
for (size_t j=1; j < src_port()->poly(); ++j)
- m_local_buffer->accumulate(src_port()->buffer(j), 0, m_buffer_size-1);
+ _local_buffer->accumulate(src_port()->buffer(j), 0, _buffer_size-1);
// Scale the buffer down.
if (src_port()->poly() > 1)
- m_local_buffer->scale(1.0f/(float)src_port()->poly(), 0, m_buffer_size-1);
+ _local_buffer->scale(1.0f/(float)src_port()->poly(), 0, _buffer_size-1);
}
}
template void TypedConnection::process(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/TypedConnection.h b/src/libs/engine/TypedConnection.h
index c6b0b0cf..7e28697d 100644
--- a/src/libs/engine/TypedConnection.h
+++ b/src/libs/engine/TypedConnection.h
@@ -41,12 +41,12 @@ public:
void process(SampleCount nframes, FrameTime start, FrameTime end);
- inline OutputPort* src_port() const { return dynamic_cast*>(m_src_port); }
- inline InputPort* dst_port() const { return dynamic_cast*>(m_dst_port); }
+ inline OutputPort* src_port() const { return dynamic_cast*>(_src_port); }
+ inline InputPort* dst_port() const { return dynamic_cast*>(_dst_port); }
/** Used by some (recursive) events to prevent double disconnections */
- bool pending_disconnection() { return m_pending_disconnection; }
- void pending_disconnection(bool b) { m_pending_disconnection = b; }
+ bool pending_disconnection() { return _pending_disconnection; }
+ void pending_disconnection(bool b) { _pending_disconnection = b; }
/** Get the buffer for a particular voice.
* A TypedConnection is smart - it knows the destination port respondering the
@@ -58,10 +58,10 @@ public:
void set_buffer_size(size_t size);
private:
- Buffer* m_local_buffer; ///< Only used for poly->mono connections
- bool m_must_mix;
- size_t m_buffer_size;
- bool m_pending_disconnection;
+ Buffer* _local_buffer; ///< Only used for poly->mono connections
+ bool _must_mix;
+ size_t _buffer_size;
+ bool _pending_disconnection;
};
@@ -69,10 +69,10 @@ template <>
inline Buffer*
TypedConnection::buffer(size_t voice) const
{
- TypedPort* const src_port = (TypedPort*)m_src_port;
+ TypedPort* const src_port = (TypedPort*)_src_port;
- if (m_must_mix) {
- return m_local_buffer;
+ if (_must_mix) {
+ return _local_buffer;
} else {
if (src_port->poly() == 1)
return src_port->buffer(0);
@@ -87,10 +87,10 @@ inline Buffer*
TypedConnection::buffer(size_t voice) const
{
// No such thing as polyphonic MIDI ports
- assert(m_src_port->poly() == 1);
- assert(m_dst_port->poly() == 1);
+ assert(_src_port->poly() == 1);
+ assert(_dst_port->poly() == 1);
- TypedPort* const src_port = (TypedPort*)m_src_port;
+ TypedPort* const src_port = (TypedPort*)_src_port;
return src_port->buffer(0);
}
diff --git a/src/libs/engine/TypedPort.cpp b/src/libs/engine/TypedPort.cpp
index d2825b17..895bb525 100644
--- a/src/libs/engine/TypedPort.cpp
+++ b/src/libs/engine/TypedPort.cpp
@@ -32,12 +32,12 @@ namespace Ingen {
template
TypedPort::TypedPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size)
: Port(parent, name, index, poly, type, buffer_size)
-, m_fixed_buffers(false)
+, _fixed_buffers(false)
{
allocate_buffers();
clear_buffers();
- assert(m_buffers.size() > 0);
+ assert(_buffers.size() > 0);
}
template
TypedPort::TypedPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size);
@@ -49,7 +49,7 @@ template
TypedPort::~TypedPort()
{
for (size_t i=0; i < _poly; ++i)
- delete m_buffers.at(i);
+ delete _buffers.at(i);
}
template TypedPort::~TypedPort();
template TypedPort::~TypedPort();
@@ -66,7 +66,7 @@ TypedPort::set_value(Sample val, size_t offset)
assert(offset < _buffer_size);
for (size_t v=0; v < _poly; ++v)
- m_buffers.at(v)->set(val, offset);
+ _buffers.at(v)->set(val, offset);
}
/** Set the port's value for a specific voice.
@@ -81,7 +81,7 @@ TypedPort::set_value(size_t voice, Sample val, size_t offset)
cerr << path() << " setting voice value " << val << endl;
- m_buffers.at(voice)->set(val, offset);
+ _buffers.at(voice)->set(val, offset);
}
@@ -89,10 +89,10 @@ template
void
TypedPort::allocate_buffers()
{
- m_buffers.alloc(_poly);
+ _buffers.alloc(_poly);
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i) = new Buffer(_buffer_size);
+ _buffers.at(i) = new Buffer(_buffer_size);
}
template void TypedPort::allocate_buffers();
template void TypedPort::allocate_buffers();
@@ -105,7 +105,7 @@ TypedPort::set_buffer_size(size_t size)
_buffer_size = size;
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i)->resize(size);
+ _buffers.at(i)->resize(size);
connect_buffers();
}
@@ -123,7 +123,7 @@ void
TypedPort::connect_buffers()
{
for (size_t i=0; i < _poly; ++i)
- TypedPort::parent_node()->set_port_buffer(i, _index, m_buffers.at(i)->data());
+ TypedPort::parent_node()->set_port_buffer(i, _index, _buffers.at(i)->data());
}
template void TypedPort::connect_buffers();
template void TypedPort::connect_buffers();
@@ -134,7 +134,7 @@ void
TypedPort::clear_buffers()
{
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i)->clear();
+ _buffers.at(i)->clear();
}
template void TypedPort::clear_buffers();
template void TypedPort::clear_buffers();
@@ -145,7 +145,7 @@ void
TypedPort::process(SampleCount nframes, FrameTime start, FrameTime end)
{
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i)->prepare(nframes);
+ _buffers.at(i)->prepare(nframes);
}
diff --git a/src/libs/engine/TypedPort.h b/src/libs/engine/TypedPort.h
index 56d6fc51..69daa8e7 100644
--- a/src/libs/engine/TypedPort.h
+++ b/src/libs/engine/TypedPort.h
@@ -47,14 +47,14 @@ public:
void set_value(size_t voice, T val, size_t offset);
void set_value(T val, size_t offset);
- Buffer* buffer(size_t voice) const { return m_buffers.at(voice); }
+ Buffer* buffer(size_t voice) const { return _buffers.at(voice); }
virtual void process(SampleCount nframes, FrameTime start, FrameTime end);
virtual void clear_buffers();
/** Used by drivers to prevent port from changing buffers */
- void fixed_buffers(bool b) { m_fixed_buffers = b; }
- bool fixed_buffers() { return m_fixed_buffers; }
+ void fixed_buffers(bool b) { _fixed_buffers = b; }
+ bool fixed_buffers() { return _fixed_buffers; }
virtual void set_buffer_size(size_t size);
@@ -64,9 +64,9 @@ protected:
void allocate_buffers();
void connect_buffers();
- bool m_fixed_buffers;
+ bool _fixed_buffers;
- Array*> m_buffers;
+ Array*> _buffers;
};
diff --git a/src/libs/engine/events/AddNodeEvent.cpp b/src/libs/engine/events/AddNodeEvent.cpp
index 92214009..b7bc8a66 100644
--- a/src/libs/engine/events/AddNodeEvent.cpp
+++ b/src/libs/engine/events/AddNodeEvent.cpp
@@ -36,13 +36,13 @@ namespace Ingen {
AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path,
const string& plugin_uri, bool poly)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_plugin_uri(plugin_uri),
- m_poly(poly),
- m_patch(NULL),
- m_node(NULL),
- m_process_order(NULL),
- m_node_already_exists(false)
+ _path(path),
+ _plugin_uri(plugin_uri),
+ _poly(poly),
+ _patch(NULL),
+ _node(NULL),
+ _process_order(NULL),
+ _node_already_exists(false)
{
}
@@ -54,15 +54,15 @@ AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr responder, Sampl
AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path,
const string& plugin_type, const string& plugin_lib, const string& plugin_label, bool poly)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_plugin_type(plugin_type),
- m_plugin_lib(plugin_lib),
- m_plugin_label(plugin_label),
- m_poly(poly),
- m_patch(NULL),
- m_node(NULL),
- m_process_order(NULL),
- m_node_already_exists(false)
+ _path(path),
+ _plugin_type(plugin_type),
+ _plugin_lib(plugin_lib),
+ _plugin_label(plugin_label),
+ _poly(poly),
+ _patch(NULL),
+ _node(NULL),
+ _process_order(NULL),
+ _node_already_exists(false)
{
}
@@ -70,36 +70,36 @@ AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr responder, Sampl
void
AddNodeEvent::pre_process()
{
- if (_engine.object_store()->find(m_path) != NULL) {
- m_node_already_exists = true;
+ if (_engine.object_store()->find(_path) != NULL) {
+ _node_already_exists = true;
QueuedEvent::pre_process();
return;
}
- m_patch = _engine.object_store()->find_patch(m_path.parent());
+ _patch = _engine.object_store()->find_patch(_path.parent());
- const Plugin* plugin = (m_plugin_uri != "")
- ? _engine.node_factory()->plugin(m_plugin_uri)
- : _engine.node_factory()->plugin(m_plugin_type, m_plugin_lib, m_plugin_label);
+ const Plugin* plugin = (_plugin_uri != "")
+ ? _engine.node_factory()->plugin(_plugin_uri)
+ : _engine.node_factory()->plugin(_plugin_type, _plugin_lib, _plugin_label);
- if (m_patch && plugin) {
- if (m_poly)
- m_node = _engine.node_factory()->load_plugin(plugin, m_path.name(), m_patch->internal_poly(), m_patch);
+ if (_patch && plugin) {
+ if (_poly)
+ _node = _engine.node_factory()->load_plugin(plugin, _path.name(), _patch->internal_poly(), _patch);
else
- m_node = _engine.node_factory()->load_plugin(plugin, m_path.name(), 1, m_patch);
+ _node = _engine.node_factory()->load_plugin(plugin, _path.name(), 1, _patch);
- if (m_node != NULL) {
- m_node->activate();
+ if (_node != NULL) {
+ _node->activate();
// This can be done here because the audio thread doesn't touch the
// node tree - just the process order array
- m_patch->add_node(new ListNode(m_node));
- m_node->add_to_store(_engine.object_store());
+ _patch->add_node(new ListNode(_node));
+ _node->add_to_store(_engine.object_store());
// FIXME: not really necessary to build process order since it's not connected,
// just append to the list
- if (m_patch->enabled())
- m_process_order = m_patch->build_process_order();
+ if (_patch->enabled())
+ _process_order = _patch->build_process_order();
}
}
QueuedEvent::pre_process();
@@ -111,10 +111,10 @@ AddNodeEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_node != NULL) {
- if (m_patch->process_order() != NULL)
- _engine.maid()->push(m_patch->process_order());
- m_patch->process_order(m_process_order);
+ if (_node != NULL) {
+ if (_patch->process_order() != NULL)
+ _engine.maid()->push(_patch->process_order());
+ _patch->process_order(_process_order);
}
}
@@ -123,20 +123,20 @@ void
AddNodeEvent::post_process()
{
string msg;
- if (m_node_already_exists) {
- msg = string("Could not create node - ").append(m_path);// + " already exists.";
+ if (_node_already_exists) {
+ msg = string("Could not create node - ").append(_path);// + " already exists.";
_responder->respond_error(msg);
- } else if (m_patch == NULL) {
- msg = "Could not find patch '" + m_path.parent() +"' for add_node.";
+ } else if (_patch == NULL) {
+ msg = "Could not find patch '" + _path.parent() +"' for add_node.";
_responder->respond_error(msg);
- } else if (m_node == NULL) {
+ } else if (_node == NULL) {
msg = "Unable to load node ";
- msg.append(m_path).append(" (you're missing the plugin \"").append(
- m_plugin_uri);
+ msg.append(_path).append(" (you're missing the plugin \"").append(
+ _plugin_uri);
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- _engine.broadcaster()->send_node(m_node, true); // yes, send ports
+ _engine.broadcaster()->send_node(_node, true); // yes, send ports
}
}
diff --git a/src/libs/engine/events/AddNodeEvent.h b/src/libs/engine/events/AddNodeEvent.h
index b4d7b0ba..23274a23 100644
--- a/src/libs/engine/events/AddNodeEvent.h
+++ b/src/libs/engine/events/AddNodeEvent.h
@@ -61,17 +61,17 @@ public:
void post_process();
private:
- string m_patch_name;
- Path m_path;
- string m_plugin_uri; ///< If nonempty then type, library, label, are ignored
- string m_plugin_type;
- string m_plugin_lib;
- string m_plugin_label;
- bool m_poly;
- Patch* m_patch;
- Node* m_node;
- Array* m_process_order; ///< Patch's new process order
- bool m_node_already_exists;
+ string _patch_name;
+ Path _path;
+ string _plugin_uri; ///< If nonempty then type, library, label, are ignored
+ string _plugin_type;
+ string _plugin_lib;
+ string _plugin_label;
+ bool _poly;
+ Patch* _patch;
+ Node* _node;
+ Array* _process_order; ///< Patch's new process order
+ bool _node_already_exists;
};
diff --git a/src/libs/engine/events/AllNotesOffEvent.cpp b/src/libs/engine/events/AllNotesOffEvent.cpp
index c90b1e45..25e647c9 100644
--- a/src/libs/engine/events/AllNotesOffEvent.cpp
+++ b/src/libs/engine/events/AllNotesOffEvent.cpp
@@ -26,7 +26,7 @@ namespace Ingen {
*/
AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Patch* patch)
: Event(engine, responder, timestamp),
- m_patch(patch)
+ _patch(patch)
{
}
@@ -35,8 +35,8 @@ AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr responde
*/
AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& patch_path)
: Event(engine, responder, timestamp),
- m_patch(NULL),
- m_patch_path(patch_path)
+ _patch(NULL),
+ _patch_path(patch_path)
{
}
@@ -46,11 +46,11 @@ AllNotesOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
Event::execute(nframes, start, end);
- if (m_patch == NULL && m_patch_path != "")
- m_patch = _engine.object_store()->find_patch(m_patch_path);
+ if (_patch == NULL && _patch_path != "")
+ _patch = _engine.object_store()->find_patch(_patch_path);
- //if (m_patch != NULL)
- // for (List::iterator j = m_patch->midi_in_nodes().begin(); j != m_patch->midi_in_nodes().end(); ++j)
+ //if (_patch != NULL)
+ // for (List::iterator j = _patch->midi_in_nodes().begin(); j != _patch->midi_in_nodes().end(); ++j)
// (*j)->all_notes_off(offset);
}
@@ -58,7 +58,7 @@ AllNotesOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
AllNotesOffEvent::post_process()
{
- if (m_patch != NULL)
+ if (_patch != NULL)
_responder->respond_ok();
}
diff --git a/src/libs/engine/events/AllNotesOffEvent.h b/src/libs/engine/events/AllNotesOffEvent.h
index 53b8f158..a5264a6f 100644
--- a/src/libs/engine/events/AllNotesOffEvent.h
+++ b/src/libs/engine/events/AllNotesOffEvent.h
@@ -40,8 +40,8 @@ public:
void post_process();
private:
- Patch* m_patch;
- string m_patch_path;
+ Patch* _patch;
+ string _patch_path;
};
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index db2ea54b..2e59ab5a 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -32,9 +32,9 @@ namespace Ingen {
ClearPatchEvent::ClearPatchEvent(Engine& engine, SharedPtr responder, FrameTime time, QueuedEventSource* source, const string& patch_path)
: QueuedEvent(engine, responder, time, true, source),
- m_patch_path(patch_path),
- m_patch(NULL),
- m_process(false)
+ _patch_path(patch_path),
+ _patch(NULL),
+ _process(false)
{
}
@@ -42,13 +42,13 @@ ClearPatchEvent::ClearPatchEvent(Engine& engine, SharedPtr responder,
void
ClearPatchEvent::pre_process()
{
- m_patch = _engine.object_store()->find_patch(m_patch_path);
+ _patch = _engine.object_store()->find_patch(_patch_path);
- if (m_patch != NULL) {
+ if (_patch != NULL) {
- m_process = m_patch->enabled();
+ _process = _patch->enabled();
- for (List::const_iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i)
+ for (List::const_iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i)
(*i)->remove_from_store();
}
@@ -61,16 +61,16 @@ ClearPatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_patch != NULL) {
- m_patch->disable();
+ if (_patch != NULL) {
+ _patch->disable();
cerr << "FIXME: CLEAR PATCH\n";
- //for (List::const_iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i)
+ //for (List::const_iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i)
// (*i)->remove_from_patch();
- if (m_patch->process_order() != NULL) {
- _engine.maid()->push(m_patch->process_order());
- m_patch->process_order(NULL);
+ if (_patch->process_order() != NULL) {
+ _engine.maid()->push(_patch->process_order());
+ _patch->process_order(NULL);
}
}
}
@@ -79,34 +79,34 @@ ClearPatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
ClearPatchEvent::post_process()
{
- if (m_patch != NULL) {
+ if (_patch != NULL) {
// Delete all nodes
- for (List::iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i) {
+ for (List::iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i) {
(*i)->deactivate();
delete *i;
}
- m_patch->nodes().clear();
+ _patch->nodes().clear();
// Delete all connections
- for (List::iterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i)
+ for (List::iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i)
delete *i;
- m_patch->connections().clear();
+ _patch->connections().clear();
// Restore patch's run state
- if (m_process)
- m_patch->enable();
+ if (_process)
+ _patch->enable();
else
- m_patch->disable();
+ _patch->disable();
// Make sure everything's sane
- assert(m_patch->nodes().size() == 0);
- assert(m_patch->connections().size() == 0);
+ assert(_patch->nodes().size() == 0);
+ assert(_patch->connections().size() == 0);
// Reply
_responder->respond_ok();
- _engine.broadcaster()->send_patch_cleared(m_patch_path);
+ _engine.broadcaster()->send_patch_cleared(_patch_path);
} else {
- _responder->respond_error(string("Patch ") + m_patch_path + " not found");
+ _responder->respond_error(string("Patch ") + _patch_path + " not found");
}
_source->unblock();
diff --git a/src/libs/engine/events/ClearPatchEvent.h b/src/libs/engine/events/ClearPatchEvent.h
index 0ed9294b..37f1ab11 100644
--- a/src/libs/engine/events/ClearPatchEvent.h
+++ b/src/libs/engine/events/ClearPatchEvent.h
@@ -42,9 +42,9 @@ public:
void post_process();
private:
- string m_patch_path;
- Patch* m_patch;
- bool m_process;
+ string _patch_path;
+ Patch* _patch;
+ bool _process;
};
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index c54e440f..40e8a660 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -38,86 +38,86 @@ namespace Ingen {
ConnectionEvent::ConnectionEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
: QueuedEvent(engine, responder, timestamp),
- m_src_port_path(src_port_path),
- m_dst_port_path(dst_port_path),
- m_patch(NULL),
- m_src_port(NULL),
- m_dst_port(NULL),
- m_typed_event(NULL),
- m_error(NO_ERROR)
+ _src_port_path(src_port_path),
+ _dst_port_path(dst_port_path),
+ _patch(NULL),
+ _src_port(NULL),
+ _dst_port(NULL),
+ _typed_event(NULL),
+ _error(NO_ERROR)
{
}
ConnectionEvent::~ConnectionEvent()
{
- delete m_typed_event;
+ delete _typed_event;
}
void
ConnectionEvent::pre_process()
{
- if (m_src_port_path.parent().parent() != m_dst_port_path.parent().parent()
- && m_src_port_path.parent() != m_dst_port_path.parent().parent()
- && m_src_port_path.parent().parent() != m_dst_port_path.parent()) {
- m_error = PARENT_PATCH_DIFFERENT;
+ if (_src_port_path.parent().parent() != _dst_port_path.parent().parent()
+ && _src_port_path.parent() != _dst_port_path.parent().parent()
+ && _src_port_path.parent().parent() != _dst_port_path.parent()) {
+ _error = PARENT_PATCH_DIFFERENT;
QueuedEvent::pre_process();
return;
}
- /*m_patch = _engine.object_store()->find_patch(m_src_port_path.parent().parent());
+ /*_patch = _engine.object_store()->find_patch(_src_port_path.parent().parent());
- if (m_patch == NULL) {
- m_error = PORT_NOT_FOUND;
+ if (_patch == NULL) {
+ _error = PORT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}*/
- m_src_port = _engine.object_store()->find_port(m_src_port_path);
- m_dst_port = _engine.object_store()->find_port(m_dst_port_path);
+ _src_port = _engine.object_store()->find_port(_src_port_path);
+ _dst_port = _engine.object_store()->find_port(_dst_port_path);
- if (m_src_port == NULL || m_dst_port == NULL) {
- m_error = PORT_NOT_FOUND;
+ if (_src_port == NULL || _dst_port == NULL) {
+ _error = PORT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
- if (m_src_port->type() != m_dst_port->type() || m_src_port->buffer_size() != m_dst_port->buffer_size()) {
- m_error = TYPE_MISMATCH;
+ if (_src_port->type() != _dst_port->type() || _src_port->buffer_size() != _dst_port->buffer_size()) {
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}
/*if (port1->is_output() && port2->is_input()) {
- m_src_port = port1;
- m_dst_port = port2;
+ _src_port = port1;
+ _dst_port = port2;
} else if (port2->is_output() && port1->is_input()) {
- m_src_port = port2;
- m_dst_port = port1;
+ _src_port = port2;
+ _dst_port = port1;
} else {
- m_error = TYPE_MISMATCH;
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}*/
// Create the typed event to actually do the work
- const DataType type = m_src_port->type();
+ const DataType type = _src_port->type();
if (type == DataType::FLOAT) {
- m_typed_event = new TypedConnectionEvent(_engine, _responder, _time,
- dynamic_cast*>(m_src_port), dynamic_cast*>(m_dst_port));
+ _typed_event = new TypedConnectionEvent