summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/Array.h60
-rw-r--r--src/libs/engine/Connection.cpp6
-rw-r--r--src/libs/engine/Connection.h14
-rw-r--r--src/libs/engine/Engine.cpp102
-rw-r--r--src/libs/engine/Engine.h44
-rw-r--r--src/libs/engine/InputPort.cpp152
-rw-r--r--src/libs/engine/InputPort.h10
-rw-r--r--src/libs/engine/JackAudioDriver.cpp14
-rw-r--r--src/libs/engine/LV2Node.cpp8
-rw-r--r--src/libs/engine/LashDriver.cpp54
-rw-r--r--src/libs/engine/LashDriver.h10
-rw-r--r--src/libs/engine/List.h172
-rw-r--r--src/libs/engine/OSCEngineReceiver.cpp72
-rw-r--r--src/libs/engine/OSCEngineReceiver.h4
-rw-r--r--src/libs/engine/ObjectStore.cpp8
-rw-r--r--src/libs/engine/ObjectStore.h4
-rw-r--r--src/libs/engine/PluginLibrary.h24
-rw-r--r--src/libs/engine/TransportNode.cpp12
-rw-r--r--src/libs/engine/Tree.h74
-rw-r--r--src/libs/engine/TreeImplementation.h112
-rw-r--r--src/libs/engine/TypedConnection.cpp38
-rw-r--r--src/libs/engine/TypedConnection.h28
-rw-r--r--src/libs/engine/TypedPort.cpp22
-rw-r--r--src/libs/engine/TypedPort.h10
-rw-r--r--src/libs/engine/events/AddNodeEvent.cpp88
-rw-r--r--src/libs/engine/events/AddNodeEvent.h22
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.cpp16
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.h4
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp50
-rw-r--r--src/libs/engine/events/ClearPatchEvent.h6
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp148
-rw-r--r--src/libs/engine/events/ConnectionEvent.h32
-rw-r--r--src/libs/engine/events/CreatePatchEvent.cpp80
-rw-r--r--src/libs/engine/events/CreatePatchEvent.h14
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.cpp22
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.h8
-rw-r--r--src/libs/engine/events/DSSIControlEvent.cpp22
-rw-r--r--src/libs/engine/events/DSSIControlEvent.h8
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.cpp24
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.h8
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.cpp22
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.h6
-rw-r--r--src/libs/engine/events/DisablePatchEvent.cpp16
-rw-r--r--src/libs/engine/events/DisablePatchEvent.h4
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.cpp52
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.h14
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.cpp60
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.h14
-rw-r--r--src/libs/engine/events/DisconnectionEvent.cpp144
-rw-r--r--src/libs/engine/events/DisconnectionEvent.h26
-rw-r--r--src/libs/engine/events/EnablePatchEvent.cpp28
-rw-r--r--src/libs/engine/events/EnablePatchEvent.h6
-rw-r--r--src/libs/engine/events/MidiLearnEvent.cpp22
-rw-r--r--src/libs/engine/events/MidiLearnEvent.h16
-rw-r--r--src/libs/engine/events/NoteOffEvent.cpp26
-rw-r--r--src/libs/engine/events/NoteOffEvent.h6
-rw-r--r--src/libs/engine/events/NoteOnEvent.cpp36
-rw-r--r--src/libs/engine/events/NoteOnEvent.h10
-rw-r--r--src/libs/engine/events/RenameEvent.cpp56
-rw-r--r--src/libs/engine/events/RenameEvent.h12
-rw-r--r--src/libs/engine/events/RequestAllObjectsEvent.cpp6
-rw-r--r--src/libs/engine/events/RequestAllObjectsEvent.h2
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.cpp26
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.h10
-rw-r--r--src/libs/engine/events/RequestObjectEvent.cpp24
-rw-r--r--src/libs/engine/events/RequestObjectEvent.h6
-rw-r--r--src/libs/engine/events/RequestPluginEvent.cpp16
-rw-r--r--src/libs/engine/events/RequestPluginEvent.h6
-rw-r--r--src/libs/engine/events/RequestPluginsEvent.cpp8
-rw-r--r--src/libs/engine/events/RequestPluginsEvent.h4
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.cpp22
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.h8
-rw-r--r--src/libs/engine/events/SetMetadataEvent.cpp20
-rw-r--r--src/libs/engine/events/SetMetadataEvent.h8
-rw-r--r--src/libs/engine/events/SetPortValueEvent.cpp54
-rw-r--r--src/libs/engine/events/SetPortValueEvent.h10
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.cpp60
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.h10
78 files changed, 1242 insertions, 1240 deletions
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 T>
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<T>& contents) : m_size(size), m_top(size+1) {
- m_elems = new T[size];
+ Array(size_t size, const Array<T>& 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<GraphObject*>::iterator i = m_object_store->objects().begin();
- i != m_object_store->objects().end(); ++i) {
+ for (Tree<GraphObject*>::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<MidiMessage>* Engine::driver<MidiMessage>() { return m_midi_driver; }
+Driver<MidiMessage>* Engine::driver<MidiMessage>() { return _midi_driver; }
template<>
-Driver<Sample>* Engine::driver<Sample>() { return m_audio_driver.get(); }
+Driver<Sample>* Engine::driver<Sample>() { 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<AudioDriver> ad, SharedPtr<EventSource> 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<AudioDriver> ad, SharedPtr<EventSource> 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<GraphObject*>::iterator i = m_object_store->objects().begin();
- i != m_object_store->objects().end(); ++i)
+ /*for (Tree<GraphObject*>::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<AudioDriver> ad, SharedPtr<EventSource> 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<typename T> Driver<T>* driver();
private:
- SharedPtr<EventSource> m_event_source;
- SharedPtr<AudioDriver> 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<EventSource> _event_source;
+ SharedPtr<AudioDriver> _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<typename T>
void
InputPort<T>::add_connection(ListNode<TypedConnection<T>*>* 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<T>::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<Sample>::add_connection(ListNode<TypedConnection<Sample>*>* const c);
template void InputPort<MidiMessage>::add_connection(ListNode<TypedConnection<MidiMessage>*>* const c);
@@ -87,16 +87,16 @@ template <typename T>
ListNode<TypedConnection<T>*>*
InputPort<T>::remove_connection(const OutputPort<T>* 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<TypedConnection<T>*>::iterator TypedConnectionListIterator;
bool found = false;
ListNode<TypedConnection<T>*>* 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<T>::remove_connection(const OutputPort<T>* const src_port)
cerr << "WARNING: [InputPort<T>::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<T>::remove_connection(const OutputPort<T>* const src_port)
if (modify_buffers)
TypedPort<T>::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<T>::is_connected_to(const OutputPort<T>* const port) const
{
typedef typename List<TypedConnection<T>*>::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<Sample>::process(SampleCount nframes, FrameTime start, FrameTime end)
{
- //assert(!m_is_tied || m_tied_port != NULL);
+ //assert(!_is_tied || _tied_port != NULL);
typedef List<TypedConnection<Sample>*>::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<Sample>::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<MidiMessage>::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<MidiMessage>::process(SampleCount nframes, FrameTime start, FrameTime
typedef List<TypedConnection<MidiMessage>*>::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<T>::set_buffer_size(size_t size)
TypedPort<T>::set_buffer_size(size);
assert(_buffer_size = size);
- for (typename List<TypedConnection<T>*>::iterator c = m_connections.begin(); c != m_connections.end(); ++c)
+ for (typename List<TypedConnection<T>*>::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<TypedConnection<T>*>* const c);
ListNode<TypedConnection<T>*>* remove_connection(const OutputPort<T>* const src_port);
- const List<TypedConnection<T>*>& connections() { return m_connections; }
+ const List<TypedConnection<T>*>& 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<T>* const port) const;
bool is_input() const { return true; }
@@ -67,14 +67,14 @@ public:
private:
- List<TypedConnection<T>*> m_connections;
+ List<TypedConnection<T>*> _connections;
// This is just stupid...
- using TypedPort<T>::m_buffers;
+ using TypedPort<T>::_buffers;
using TypedPort<T>::_poly;
using TypedPort<T>::_index;
using TypedPort<T>::_buffer_size;
- using TypedPort<T>::m_fixed_buffers;
+ using TypedPort<T>::_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<int>(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 <typename T>
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 <typename T>
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<T>* 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<T>* 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<T>;
private:
- const List<T>* const m_list;
- const ListNode<T>* m_listnode;
- const ListNode<T>* m_next; // use this instead of m_listnode->next() to allow deleting
+ const List<T>* const _list;
+ const ListNode<T>* _listnode;
+ const ListNode<T>* _next; // use this instead of _listnode->next() to allow deleting
};
@@ -113,9 +113,9 @@ public:
friend class List<T>::const_iterator;
private:
- const List<T>* m_list;
- ListNode<T>* m_listnode;
- ListNode<T>* m_next; // use this instead of m_listnode->next() to allow deleting
+ const List<T>* _list;
+ ListNode<T>* _listnode;
+ ListNode<T>* _next; // use this instead of _listnode->next() to allow deleting
};
@@ -128,11 +128,11 @@ public:
//const_iterator end() const;
private:
- ListNode<T>* m_head;
- ListNode<T>* m_tail;
- size_t m_size;
- iterator m_end_iter;
- const_iterator m_const_end_iter;
+ ListNode<T>* _head;
+ ListNode<T>* _tail;
+ size_t _size;
+ iterator _end_iter;
+ const_iterator _const_end_iter;
};
@@ -153,9 +153,9 @@ template <typename T>
void
List<T>::clear()
{
- if (m_head == NULL) return;
+ if (_head == NULL) return;
- ListNode<T>* node = m_head;
+ ListNode<T>* node = _head;
ListNode<T>* next = NULL;
while (node != NULL) {
@@ -163,8 +163,8 @@ List<T>::clear()
delete node;
node = next;
}
- m_tail = m_head = NULL;
- m_size = 0;
+ _tail = _head = NULL;
+ _size = 0;
}
@@ -181,15 +181,15 @@ List<T>::push_back(ListNode<T>* 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<T>*
List<T>::remove(const T elem)
{
// FIXME: atomicity?
- ListNode<T>* n = m_head;
+ ListNode<T>* 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 <typename T>
ListNode<T>*
List<T>::remove(const iterator iter)
{
- ListNode<T>* n = iter.m_listnode;
+ ListNode<T>* 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<T>::remove(const iterator iter)
template <typename T>
List<T>::iterator::iterator(List<T>* list)
-: m_list(list),
- m_listnode(NULL),
- m_next(NULL)
+: _list(list),
+ _listnode(NULL),
+ _next(NULL)
{
}
@@ -264,8 +264,8 @@ template <typename T>
T&
List<T>::iterator::operator*()
{
- assert(m_listnode != NULL);
- return m_listnode->elem();
+ assert(_listnode != NULL);
+ return _listnode->elem();
}
@@ -273,12 +273,12 @@ template <typename T>
inline typename List<T>::iterator&
List<T>::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 <typename T>
inline bool
List<T>::iterator::operator!=(const iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -296,7 +296,7 @@ template <typename T>
inline bool
List<T>::iterator::operator!=(const const_iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -305,11 +305,11 @@ inline typename List<T>::iterator
List<T>::begin()
{
typename List<T>::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<T>::iterator
List<T>::end() const
{
/*typename List<T>::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<T>::end() const
template <typename T>
List<T>::const_iterator::const_iterator(const List<T>* const list)
-: m_list(list),
- m_listnode(NULL),
- m_next(NULL)
+: _list(list),
+ _listnode(NULL),
+ _next(NULL)
{
}
@@ -343,8 +343,8 @@ template <typename T>
const T&
List<T>::const_iterator::operator*()
{
- assert(m_listnode != NULL);
- return m_listnode->elem();
+ assert(_listnode != NULL);
+ return _listnode->elem();
}
@@ -352,12 +352,12 @@ template <typename T>
inline typename List<T>::const_iterator&
List<T>::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 <typename T>
inline bool
List<T>::const_iterator::operator!=(const const_iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -375,7 +375,7 @@ template <typename T>
inline bool
List<T>::const_iterator::operator!=(const iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -384,11 +384,11 @@ inline typename List<T>::const_iterator
List<T>::begin() const
{
typename List<T>::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<T>::const_iterator
List<T>::end() const
{
/*typename List<T>::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) </p> \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.</p> \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. </p> \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) </p> \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) </p> \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 - <em>including respond to your messages!</em> \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) </p> \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 </p> \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 </p> \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) </p> \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) </p> \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,
* </p> \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 </p> \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 </p> \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 </p> \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. </p> \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). </p> \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)</p> \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)</p> \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 </p> \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. </p> \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.</p> \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.</p> \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.</p> \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.</p> \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.</p> \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.</p> \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<GraphObject*>(o->path(), o));
+ _objects.insert(new TreeNode<GraphObject*>(o->path(), o));
}
@@ -80,7 +80,7 @@ void
ObjectStore::add(TreeNode<GraphObject*>* tn)
{
cerr << "[ObjectStore] Adding " << tn->key() << endl;
- m_objects.insert(tn);
+ _objects.insert(tn);
}
@@ -93,7 +93,7 @@ ObjectStore::add(TreeNode<GraphObject*>* tn)
TreeNode<GraphObject*>*
ObjectStore::remove(const string& path)
{
- TreeNode<GraphObject*>* const removed = m_objects.remove(path);
+ TreeNode<GraphObject*>* 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<GraphObject*>* o);
TreeNode<GraphObject*>* remove(const string& key);
- const Tree<GraphObject*>& objects() { return m_objects; }
+ const Tree<GraphObject*>& objects() { return _objects; }
private:
- Tree<GraphObject*> m_objects;
+ Tree<GraphObject*> _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<Sample>*)m_ports.at(0))->buffer(0)->set(spb, 0, 0);
- ((OutputPort<Sample>*)m_ports.at(1))->buffer(0)->set(bpb, 0, 0);
+ ((OutputPort<Sample>*)_ports.at(0))->buffer(0)->set(spb, 0, 0);
+ ((OutputPort<Sample>*)_ports.at(1))->buffer(0)->set(bpb, 0, 0);
// fill the trigger buffers with zeros
- ((OutputPort<Sample>*)m_ports.at(2))->buffer(0)->set(0.0f, 0, nframes - 1);
- ((OutputPort<Sample>*)m_ports.at(3))->buffer(0)->set(0.0f, 0, nframes - 1);
+ ((OutputPort<Sample>*)_ports.at(2))->buffer(0)->set(0.0f, 0, nframes - 1);
+ ((OutputPort<Sample>*)_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<Sample>*)m_ports.at(2))->buffer(0)->set(1.0f, size_t(first_beat));
+ ((OutputPort<Sample>*)_ports.at(2))->buffer(0)->set(1.0f, size_t(first_beat));
if (first_beat_no % int(bpb) == 0) {
- ((OutputPort<Sample>*)m_ports.at(3))->buffer(0)->set(1.0f, size_t(first_beat));
+ ((OutputPort<Sample>*)_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<T>* parent() const { return m_parent; }
- void parent(TreeNode<T>* n) { m_parent = n; }
- TreeNode<T>* left_child() const { return m_left_child; }
- void left_child(TreeNode<T>* n) { m_left_child = n; }
- TreeNode<T>* right_child() const { return m_right_child; }
- void right_child(TreeNode<T>* n) { m_right_child = n; }
+ string key() const { return _key; }
+ void key(const string& key) { _key = key; }
+ TreeNode<T>* parent() const { return _parent; }
+ void parent(TreeNode<T>* n) { _parent = n; }
+ TreeNode<T>* left_child() const { return _left_child; }
+ void left_child(TreeNode<T>* n) { _left_child = n; }
+ TreeNode<T>* right_child() const { return _right_child; }
+ void right_child(TreeNode<T>* 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<T>;
protected:
- TreeNode<T>* m_parent;
- TreeNode<T>* m_left_child;
- TreeNode<T>* m_right_child;
- string m_key;
- T m_node;
+ TreeNode<T>* _parent;
+ TreeNode<T>* _left_child;
+ TreeNode<T>* _right_child;
+ string _key;
+ T _node;
};
@@ -92,7 +92,7 @@ template <typename T>
class Tree : boost::noncopyable
{
public:
- Tree() : m_root(0), m_size(0) {}
+ Tree() : _root(0), _size(0) {}
~Tree();
void insert(TreeNode<T>* const n);
@@ -100,7 +100,7 @@ public:
T find(const string& key) const;
TreeNode<T>* 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<T>. */
class iterator
@@ -119,23 +119,23 @@ public:
iterator& operator=(const iterator& copy);
private:
- int m_depth;
- size_t m_size;
- TreeNode<T>** m_stack;
- const Tree<T>* m_tree;
+ int _depth;
+ size_t _size;
+ TreeNode<T>** _stack;
+ const Tree<T>* _tree;
};
iterator begin() const;
iterator end() const;
private:
- void m_set_all_traversed_recursive(TreeNode<T>* root, bool b);
+ void _set_all_traversed_recursive(TreeNode<T>* root, bool b);
- TreeNode<T>* m_find_smallest(TreeNode<T>* root);
- TreeNode<T>* m_find_largest(TreeNode<T>* root);
+ TreeNode<T>* _find_smallest(TreeNode<T>* root);
+ TreeNode<T>* _find_largest(TreeNode<T>* root);
- TreeNode<T>* m_root;
- size_t m_size;
+ TreeNode<T>* _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<T>::insert(TreeNode<T>* 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<T>* i = m_root;
+ TreeNode<T>* i = _root;
while (true) {
assert(i != NULL);
if (n->key() <= i->key()) {
@@ -89,7 +89,7 @@ Tree<T>::insert(TreeNode<T>* const n)
}
n->parent(i);
}
- ++m_size;
+ ++_size;
}
@@ -113,7 +113,7 @@ Tree<T>::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<T>::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<T>::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<T>* child = NULL;
if (n->left_child() != NULL)
@@ -179,7 +179,7 @@ Tree<T>::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<T>::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<typename T>
TreeNode<T>*
Tree<T>::find_treenode(const string& name) const
{
- TreeNode<T>* i = m_root;
+ TreeNode<T>* i = _root;
int cmp = 0;
while (i != NULL) {
@@ -239,16 +239,16 @@ Tree<T>::find_treenode(const string& name) const
/// Private ///
template<typename T>
void
-Tree<T>::m_set_all_traversed_recursive(TreeNode<T>* root, bool b)
+Tree<T>::_set_all_traversed_recursive(TreeNode<T>* 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<T>::m_set_all_traversed_recursive(TreeNode<T>* root, bool b)
*/
template<typename T>
TreeNode<T>*
-Tree<T>::m_find_smallest(TreeNode<T>* root)
+Tree<T>::_find_smallest(TreeNode<T>* root)
{
TreeNode<T>* r = root;
@@ -271,7 +271,7 @@ Tree<T>::m_find_smallest(TreeNode<T>* root)
*/
template<typename T>
TreeNode<T>*
-Tree<T>::m_find_largest(TreeNode<T>* root)
+Tree<T>::_find_largest(TreeNode<T>* root)
{
TreeNode<T>* r = root;
@@ -290,20 +290,20 @@ Tree<T>::m_find_largest(TreeNode<T>* root)
template<typename T>
Tree<T>::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<T>*[size];
+ _stack = new TreeNode<T>*[size];
}
template<typename T>
Tree<T>::iterator::~iterator()
{
- delete[] m_stack;
+ delete[] _stack;
}
@@ -314,13 +314,13 @@ Tree<T>::iterator::~iterator()
// Copy constructor (for the typical for loop usage)
template<typename T>
Tree<T>::iterator::iterator(const Tree<T>::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<T>*[m_size];
- memcpy(m_stack, copy.m_stack, m_size * sizeof(TreeNode<T>*));
+ if (_size > 0) {
+ _stack = new TreeNode<T>*[_size];
+ memcpy(_stack, copy._stack, _size * sizeof(TreeNode<T>*));
}
}
@@ -329,13 +329,13 @@ Tree<T>::iterator::iterator(const Tree<T>::iterator& copy)
template<typename T>
typename Tree<T>::iterator&
Tree<T>::iterator::operator=(const Tree<T>::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<T>*[m_size];
- memcpy(m_stack, copy.m_stack, m_size * sizeof(TreeNode<T>*));
+ if (_size > 0) {
+ _stack = new TreeNode<T>*[_size];
+ memcpy(_stack, copy._stack, _size * sizeof(TreeNode<T>*));
}
return *this;
}
@@ -345,8 +345,8 @@ template<typename T>
T
Tree<T>::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 T>
typename Tree<T>::iterator&
Tree<T>::iterator::operator++()
{
- assert(m_depth >= 0);
+ assert(_depth >= 0);
- TreeNode<T>* tn = m_stack[m_depth];
- --m_depth;
+ TreeNode<T>* 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<T>::iterator::operator!=(const Tree<T>::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 T>
typename Tree<T>::iterator
Tree<T>::begin() const
{
- typename Tree<T>::iterator iter(this, m_size);
- iter.m_depth = -1;
+ typename Tree<T>::iterator iter(this, _size);
+ iter._depth = -1;
- TreeNode<T> *ptr = m_root;
+ TreeNode<T> *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<T>::iterator
Tree<T>::end() const
{
typename Tree<T>::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 <typename T>
TypedConnection<T>::TypedConnection(OutputPort<T>* const src_port, InputPort<T>* 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<T>(m_buffer_size);
+ _local_buffer = new Buffer<T>(_buffer_size);
//cerr << "Connection " << src_port->path() << " -> " << dst_port->path()
- // << "\t mixing: " << m_must_mix << endl;
+ // << "\t mixing: " << _must_mix << endl;
}
template TypedConnection<Sample>::TypedConnection(OutputPort<Sample>* const src_port, InputPort<Sample>* const dst_port);
template TypedConnection<MidiMessage>::TypedConnection(OutputPort<MidiMessage>* const src_port, InputPort<MidiMessage>* const dst_port);
@@ -55,7 +55,7 @@ template TypedConnection<MidiMessage>::TypedConnection(OutputPort<MidiMessage>*
template <typename T>
TypedConnection<T>::~TypedConnection()
{
- delete m_local_buffer;
+ delete _local_buffer;
}
template TypedConnection<Sample>::~TypedConnection();
template TypedConnection<MidiMessage>::~TypedConnection();
@@ -66,14 +66,14 @@ template <typename T>
void
TypedConnection<T>::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<T>(size);
+ _local_buffer = new Buffer<T>(size);
}
- m_buffer_size = size;
+ _buffer_size = size;
}
@@ -82,7 +82,7 @@ void
TypedConnection<Sample>::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<Sample>::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<Sample>::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<T>* src_port() const { return dynamic_cast<OutputPort<T>*>(m_src_port); }
- inline InputPort<T>* dst_port() const { return dynamic_cast<InputPort<T>*>(m_dst_port); }
+ inline OutputPort<T>* src_port() const { return dynamic_cast<OutputPort<T>*>(_src_port); }
+ inline InputPort<T>* dst_port() const { return dynamic_cast<InputPort<T>*>(_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<T>* m_local_buffer; ///< Only used for poly->mono connections
- bool m_must_mix;
- size_t m_buffer_size;
- bool m_pending_disconnection;
+ Buffer<T>* _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<Sample>*
TypedConnection<Sample>::buffer(size_t voice) const
{
- TypedPort<Sample>* const src_port = (TypedPort<Sample>*)m_src_port;
+ TypedPort<Sample>* const src_port = (TypedPort<Sample>*)_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<MidiMessage>*
TypedConnection<MidiMessage>::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<MidiMessage>* const src_port = (TypedPort<MidiMessage>*)m_src_port;
+ TypedPort<MidiMessage>* const src_port = (TypedPort<MidiMessage>*)_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 <typename T>
TypedPort<T>::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<Sample>::TypedPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size);
@@ -49,7 +49,7 @@ template <typename T>
TypedPort<T>::~TypedPort()
{
for (size_t i=0; i < _poly; ++i)
- delete m_buffers.at(i);
+ delete _buffers.at(i);
}
template TypedPort<Sample>::~TypedPort();
template TypedPort<MidiMessage>::~TypedPort();
@@ -66,7 +66,7 @@ TypedPort<Sample>::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<Sample>::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 <typename T>
void
TypedPort<T>::allocate_buffers()
{
- m_buffers.alloc(_poly);
+ _buffers.alloc(_poly);
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i) = new Buffer<T>(_buffer_size);
+ _buffers.at(i) = new Buffer<T>(_buffer_size);
}
template void TypedPort<Sample>::allocate_buffers();
template void TypedPort<MidiMessage>::allocate_buffers();
@@ -105,7 +105,7 @@ TypedPort<T>::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<T>::connect_buffers()
{
for (size_t i=0; i < _poly; ++i)
- TypedPort<T>::parent_node()->set_port_buffer(i, _index, m_buffers.at(i)->data());
+ TypedPort<T>::parent_node()->set_port_buffer(i, _index, _buffers.at(i)->data());
}
template void TypedPort<Sample>::connect_buffers();
template void TypedPort<MidiMessage>::connect_buffers();
@@ -134,7 +134,7 @@ void
TypedPort<T>::clear_buffers()
{
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i)->clear();
+ _buffers.at(i)->clear();
}
template void TypedPort<Sample>::clear_buffers();
template void TypedPort<MidiMessage>::clear_buffers();
@@ -145,7 +145,7 @@ void
TypedPort<T>::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<T>* buffer(size_t voice) const { return m_buffers.at(voice); }
+ Buffer<T>* 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<Buffer<T>*> m_buffers;
+ Array<Buffer<T>*> _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> 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> responder, Sampl
AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> 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> 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<Node*>(m_node));
- m_node->add_to_store(_engine.object_store());
+ _patch->add_node(new ListNode<Node*>(_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<Node*>* 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<Node*>* _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> responder, SampleCount timestamp, Patch* patch)
: Event(engine, responder, timestamp),
- m_patch(patch)
+ _patch(patch)
{
}
@@ -35,8 +35,8 @@ AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responde
*/
AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> 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<MidiInNode*>::iterator j = m_patch->midi_in_nodes().begin(); j != m_patch->midi_in_nodes().end(); ++j)
+ //if (_patch != NULL)
+ // for (List<MidiInNode*>::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> 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> 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<Node*>::const_iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i)
+ for (List<Node*>::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<Node*>::const_iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i)
+ //for (List<Node*>::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<Node*>::iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i) {
+ for (List<Node*>::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<Connection*>::iterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i)
+ for (List<Connection*>::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> 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<Sample>(_engine, _responder, _time,
- dynamic_cast<OutputPort<Sample>*>(m_src_port), dynamic_cast<InputPort<Sample>*>(m_dst_port));
+ _typed_event = new TypedConnectionEvent<Sample>(_engine, _responder, _time,
+ dynamic_cast<OutputPort<Sample>*>(_src_port), dynamic_cast<InputPort<Sample>*>(_dst_port));
} else if (type == DataType::MIDI) {
- m_typed_event = new TypedConnectionEvent<MidiMessage>(_engine, _responder, _time,
- dynamic_cast<OutputPort<MidiMessage>*>(m_src_port), dynamic_cast<InputPort<MidiMessage>*>(m_dst_port));
+ _typed_event = new TypedConnectionEvent<MidiMessage>(_engine, _responder, _time,
+ dynamic_cast<OutputPort<MidiMessage>*>(_src_port), dynamic_cast<InputPort<MidiMessage>*>(_dst_port));
} else {
- m_error = TYPE_MISMATCH;
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}
- assert(m_typed_event);
- m_typed_event->pre_process();
- assert(m_typed_event->is_prepared());
+ assert(_typed_event);
+ _typed_event->pre_process();
+ assert(_typed_event->is_prepared());
QueuedEvent::pre_process();
}
@@ -128,20 +128,20 @@ ConnectionEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_error == NO_ERROR)
- m_typed_event->execute(nframes, start, end);
+ if (_error == NO_ERROR)
+ _typed_event->execute(nframes, start, end);
}
void
ConnectionEvent::post_process()
{
- if (m_error == NO_ERROR) {
- m_typed_event->post_process();
+ if (_error == NO_ERROR) {
+ _typed_event->post_process();
} else {
// FIXME: better error messages
string msg = "Unable to make connection ";
- msg.append(m_src_port_path + " -> " + m_dst_port_path);
+ msg.append(_src_port_path + " -> " + _dst_port_path);
_responder->respond_error(msg);
}
}
@@ -154,13 +154,13 @@ ConnectionEvent::post_process()
template <typename T>
TypedConnectionEvent<T>::TypedConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(engine, responder, timestamp),
- m_src_port(src_port),
- m_dst_port(dst_port),
- m_patch(NULL),
- m_process_order(NULL),
- m_connection(NULL),
- m_port_listnode(NULL),
- m_succeeded(true)
+ _src_port(src_port),
+ _dst_port(dst_port),
+ _patch(NULL),
+ _process_order(NULL),
+ _connection(NULL),
+ _port_listnode(NULL),
+ _succeeded(true)
{
assert(src_port != NULL);
assert(dst_port != NULL);
@@ -171,50 +171,50 @@ template <typename T>
void
TypedConnectionEvent<T>::pre_process()
{
- if (m_dst_port->is_connected_to(m_src_port)) {
- m_succeeded = false;
+ if (_dst_port->is_connected_to(_src_port)) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- Node* const src_node = m_src_port->parent_node();
- Node* const dst_node = m_dst_port->parent_node();
+ Node* const src_node = _src_port->parent_node();
+ Node* const dst_node = _dst_port->parent_node();
// Connection to a patch port from inside the patch
if (src_node->parent_patch() != dst_node->parent_patch()) {
assert(src_node->parent() == dst_node || dst_node->parent() == src_node);
if (src_node->parent() == dst_node)
- m_patch = dynamic_cast<Patch*>(dst_node);
+ _patch = dynamic_cast<Patch*>(dst_node);
else
- m_patch = dynamic_cast<Patch*>(src_node);
+ _patch = dynamic_cast<Patch*>(src_node);
// Connection from a patch input to a patch output (pass through)
} else if (src_node == dst_node && dynamic_cast<Patch*>(src_node)) {
- m_patch = dynamic_cast<Patch*>(src_node);
+ _patch = dynamic_cast<Patch*>(src_node);
// Normal connection between nodes with the same parent
} else {
- m_patch = src_node->parent_patch();
+ _patch = src_node->parent_patch();
}
- assert(m_patch);
+ assert(_patch);
if (src_node == NULL || dst_node == NULL) {
- m_succeeded = false;
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- if (m_patch != src_node && src_node->parent() != m_patch && dst_node->parent() != m_patch) {
- m_succeeded = false;
+ if (_patch != src_node && src_node->parent() != _patch && dst_node->parent() != _patch) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- m_connection = new TypedConnection<T>(m_src_port, m_dst_port);
- m_port_listnode = new ListNode<TypedConnection<T>*>(m_connection);
- m_patch_listnode = new ListNode<Connection*>(m_connection);
+ _connection = new TypedConnection<T>(_src_port, _dst_port);
+ _port_listnode = new ListNode<TypedConnection<T>*>(_connection);
+ _patch_listnode = new ListNode<Connection*>(_connection);
// Need to be careful about patch port connections here and adding a node's
// parent as a dependant/provider, or adding a patch as it's own provider...
@@ -223,10 +223,10 @@ TypedConnectionEvent<T>::pre_process()
src_node->dependants()->push_back(new ListNode<Node*>(dst_node));
}
- if (m_patch->enabled())
- m_process_order = m_patch->build_process_order();
+ if (_patch->enabled())
+ _process_order = _patch->build_process_order();
- m_succeeded = true;
+ _succeeded = true;
QueuedEvent::pre_process();
}
@@ -237,13 +237,13 @@ TypedConnectionEvent<T>::execute(SampleCount nframes, FrameTime start, FrameTime
{
QueuedEvent::execute(nframes, start, end);
- if (m_succeeded) {
+ if (_succeeded) {
// These must be inserted here, since they're actually used by the audio thread
- m_dst_port->add_connection(m_port_listnode);
- m_patch->add_connection(m_patch_listnode);
- if (m_patch->process_order() != NULL)
- _engine.maid()->push(m_patch->process_order());
- m_patch->process_order(m_process_order);
+ _dst_port->add_connection(_port_listnode);
+ _patch->add_connection(_patch_listnode);
+ if (_patch->process_order() != NULL)
+ _engine.maid()->push(_patch->process_order());
+ _patch->process_order(_process_order);
}
}
@@ -252,12 +252,12 @@ template <typename T>
void
TypedConnectionEvent<T>::post_process()
{
- if (m_succeeded) {
- assert(m_connection != NULL);
+ if (_succeeded) {
+ assert(_connection != NULL);
_responder->respond_ok();
- _engine.broadcaster()->send_connection(m_connection);
+ _engine.broadcaster()->send_connection(_connection);
} else {
_responder->respond_error("Unable to make connection.");
}
diff --git a/src/libs/engine/events/ConnectionEvent.h b/src/libs/engine/events/ConnectionEvent.h
index 6e4f11b4..0b55994b 100644
--- a/src/libs/engine/events/ConnectionEvent.h
+++ b/src/libs/engine/events/ConnectionEvent.h
@@ -57,16 +57,16 @@ private:
enum ErrorType { NO_ERROR, PARENT_PATCH_DIFFERENT, PORT_NOT_FOUND, TYPE_MISMATCH };
- Raul::Path m_src_port_path;
- Raul::Path m_dst_port_path;
+ Raul::Path _src_port_path;
+ Raul::Path _dst_port_path;
- Patch* m_patch;
- Port* m_src_port;
- Port* m_dst_port;
+ Patch* _patch;
+ Port* _src_port;
+ Port* _dst_port;
- QueuedEvent* m_typed_event;
+ QueuedEvent* _typed_event;
- ErrorType m_error;
+ ErrorType _error;
};
@@ -87,16 +87,16 @@ public:
void post_process();
private:
- OutputPort<T>* m_src_port;
- InputPort<T>* m_dst_port;
-
- Patch* m_patch;
- Array<Node*>* m_process_order; ///< New process order for Patch
- TypedConnection<T>* m_connection;
- ListNode<Connection*>* m_patch_listnode;
- ListNode<TypedConnection<T>*>* m_port_listnode;
+ OutputPort<T>* _src_port;
+ InputPort<T>* _dst_port;
+
+ Patch* _patch;
+ Array<Node*>* _process_order; ///< New process order for Patch
+ TypedConnection<T>* _connection;
+ ListNode<Connection*>* _patch_listnode;
+ ListNode<TypedConnection<T>*>* _port_listnode;
- bool m_succeeded;
+ bool _succeeded;
};
diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp
index 73813dbb..14fb6693 100644
--- a/src/libs/engine/events/CreatePatchEvent.cpp
+++ b/src/libs/engine/events/CreatePatchEvent.cpp
@@ -32,12 +32,12 @@ namespace Ingen {
CreatePatchEvent::CreatePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_patch(NULL),
- m_parent(NULL),
- m_process_order(NULL),
- m_poly(poly),
- m_error(NO_ERROR)
+ _path(path),
+ _patch(NULL),
+ _parent(NULL),
+ _process_order(NULL),
+ _poly(poly),
+ _error(NO_ERROR)
{
}
@@ -45,42 +45,42 @@ CreatePatchEvent::CreatePatchEvent(Engine& engine, SharedPtr<Responder> responde
void
CreatePatchEvent::pre_process()
{
- if (m_path == "/" || _engine.object_store()->find(m_path) != NULL) {
- m_error = OBJECT_EXISTS;
+ if (_path == "/" || _engine.object_store()->find(_path) != NULL) {
+ _error = OBJECT_EXISTS;
QueuedEvent::pre_process();
return;
}
- if (m_poly < 1) {
- m_error = INVALID_POLY;
+ if (_poly < 1) {
+ _error = INVALID_POLY;
QueuedEvent::pre_process();
return;
}
- m_parent = _engine.object_store()->find_patch(m_path.parent());
- if (m_parent == NULL) {
- m_error = PARENT_NOT_FOUND;
+ _parent = _engine.object_store()->find_patch(_path.parent());
+ if (_parent == NULL) {
+ _error = PARENT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
size_t poly = 1;
- if (m_parent != NULL && m_poly > 1 && m_poly == static_cast<int>(m_parent->internal_poly()))
- poly = m_poly;
+ if (_parent != NULL && _poly > 1 && _poly == static_cast<int>(_parent->internal_poly()))
+ poly = _poly;
- m_patch = new Patch(m_path.name(), poly, m_parent, _engine.audio_driver()->sample_rate(), _engine.audio_driver()->buffer_size(), m_poly);
+ _patch = new Patch(_path.name(), poly, _parent, _engine.audio_driver()->sample_rate(), _engine.audio_driver()->buffer_size(), _poly);
- if (m_parent != NULL) {
- m_parent->add_node(new ListNode<Node*>(m_patch));
+ if (_parent != NULL) {
+ _parent->add_node(new ListNode<Node*>(_patch));
- if (m_parent->enabled())
- m_process_order = m_parent->build_process_order();
+ if (_parent->enabled())
+ _process_order = _parent->build_process_order();
}
- m_patch->activate();
+ _patch->activate();
// Insert into ObjectStore
- m_patch->add_to_store(_engine.object_store());
+ _patch->add_to_store(_engine.object_store());
QueuedEvent::pre_process();
}
@@ -91,18 +91,18 @@ CreatePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_patch != NULL) {
- if (m_parent == NULL) {
- assert(m_path == "/");
- assert(m_patch->parent_patch() == NULL);
- _engine.audio_driver()->set_root_patch(m_patch);
+ if (_patch != NULL) {
+ if (_parent == NULL) {
+ assert(_path == "/");
+ assert(_patch->parent_patch() == NULL);
+ _engine.audio_driver()->set_root_patch(_patch);
} else {
- assert(m_parent != NULL);
- assert(m_path != "/");
+ assert(_parent != NULL);
+ assert(_path != "/");
- if (m_parent->process_order() != NULL)
- _engine.maid()->push(m_parent->process_order());
- m_parent->process_order(m_process_order);
+ if (_parent->process_order() != NULL)
+ _engine.maid()->push(_parent->process_order());
+ _parent->process_order(_process_order);
}
}
}
@@ -112,25 +112,25 @@ void
CreatePatchEvent::post_process()
{
if (_responder.get()) {
- if (m_error == NO_ERROR) {
+ if (_error == NO_ERROR) {
_responder->respond_ok();
// Don't send ports/nodes that have been added since prepare()
// (otherwise they would be sent twice)
- _engine.broadcaster()->send_patch(m_patch, false);
+ _engine.broadcaster()->send_patch(_patch, false);
- } else if (m_error == OBJECT_EXISTS) {
+ } else if (_error == OBJECT_EXISTS) {
string msg = "Unable to create patch: ";
- msg += m_path += " already exists.";
+ msg += _path += " already exists.";
_responder->respond_error(msg);
- } else if (m_error == PARENT_NOT_FOUND) {
+ } else if (_error == PARENT_NOT_FOUND) {
string msg = "Unable to create patch: Parent ";
- msg += m_path.parent() += " not found.";
+ msg += _path.parent() += " not found.";
_responder->respond_error(msg);
- } else if (m_error == INVALID_POLY) {
+ } else if (_error == INVALID_POLY) {
string msg = "Unable to create patch ";
- msg.append(m_path).append(": ").append("Invalid polyphony respondered.");
+ msg.append(_path).append(": ").append("Invalid polyphony respondered.");
_responder->respond_error(msg);
} else {
_responder->respond_error("Unable to load patch.");
diff --git a/src/libs/engine/events/CreatePatchEvent.h b/src/libs/engine/events/CreatePatchEvent.h
index f62b3ee5..069eb52a 100644
--- a/src/libs/engine/events/CreatePatchEvent.h
+++ b/src/libs/engine/events/CreatePatchEvent.h
@@ -48,13 +48,13 @@ public:
private:
enum ErrorType { NO_ERROR, OBJECT_EXISTS, PARENT_NOT_FOUND, INVALID_POLY };
- Path m_path;
- Patch* m_patch;
- Patch* m_parent;
- Array<Node*>* m_process_order;
- TreeNode<Node*>* m_patch_treenode;
- int m_poly;
- ErrorType m_error;
+ Path _path;
+ Patch* _patch;
+ Patch* _parent;
+ Array<Node*>* _process_order;
+ TreeNode<Node*>* _patch_treenode;
+ int _poly;
+ ErrorType _error;
};
diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp
index 91225cb0..e19e6d24 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.cpp
+++ b/src/libs/engine/events/DSSIConfigureEvent.cpp
@@ -26,10 +26,10 @@ namespace Ingen {
DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_key(key),
- m_val(val),
- m_node(NULL)
+ _node_path(node_path),
+ _key(key),
+ _val(val),
+ _node(NULL)
{
}
@@ -37,11 +37,11 @@ DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> resp
void
DSSIConfigureEvent::pre_process()
{
- Node* node = _engine.object_store()->find_node(m_node_path);
+ Node* node = _engine.object_store()->find_node(_node_path);
if (node != NULL && node->plugin()->type() == Plugin::DSSI) {
- m_node = (DSSINode*)node;
- m_node->configure(m_key, m_val);
+ _node = (DSSINode*)node;
+ _node->configure(_key, _val);
}
QueuedEvent::pre_process();
@@ -59,12 +59,12 @@ DSSIConfigureEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
DSSIConfigureEvent::post_process()
{
- if (m_node == NULL) {
- cerr << "Unable to find DSSI node " << m_node_path << endl;
+ if (_node == NULL) {
+ cerr << "Unable to find DSSI node " << _node_path << endl;
} else {
string key = "dssi-configure--";
- key += m_key;
- _engine.broadcaster()->send_metadata_update(m_node_path, key, Atom(m_val.c_str()));
+ key += _key;
+ _engine.broadcaster()->send_metadata_update(_node_path, key, Atom(_val.c_str()));
}
}
diff --git a/src/libs/engine/events/DSSIConfigureEvent.h b/src/libs/engine/events/DSSIConfigureEvent.h
index 24472480..0e97702b 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.h
+++ b/src/libs/engine/events/DSSIConfigureEvent.h
@@ -37,10 +37,10 @@ public:
void post_process();
private:
- string m_node_path;
- string m_key;
- string m_val;
- DSSINode* m_node;
+ string _node_path;
+ string _key;
+ string _val;
+ DSSINode* _node;
};
diff --git a/src/libs/engine/events/DSSIControlEvent.cpp b/src/libs/engine/events/DSSIControlEvent.cpp
index 6c12611c..7867658b 100644
--- a/src/libs/engine/events/DSSIControlEvent.cpp
+++ b/src/libs/engine/events/DSSIControlEvent.cpp
@@ -25,10 +25,10 @@ namespace Ingen {
DSSIControlEvent::DSSIControlEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_port_num(port_num),
- m_val(val),
- m_node(NULL)
+ _node_path(node_path),
+ _port_num(port_num),
+ _val(val),
+ _node(NULL)
{
}
@@ -36,12 +36,12 @@ DSSIControlEvent::DSSIControlEvent(Engine& engine, SharedPtr<Responder> responde
void
DSSIControlEvent::pre_process()
{
- Node* node = _engine.object_store()->find_node(m_node_path);
+ Node* node = _engine.object_store()->find_node(_node_path);
if (node->plugin()->type() != Plugin::DSSI)
- m_node = NULL;
+ _node = NULL;
else
- m_node = (DSSINode*)node;
+ _node = (DSSINode*)node;
QueuedEvent::pre_process();
}
@@ -52,16 +52,16 @@ DSSIControlEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_node != NULL)
- m_node->set_control(m_port_num, m_val);
+ if (_node != NULL)
+ _node->set_control(_port_num, _val);
}
void
DSSIControlEvent::post_process()
{
- if (m_node == NULL)
- std::cerr << "Unable to find DSSI node " << m_node_path << std::endl;
+ if (_node == NULL)
+ std::cerr << "Unable to find DSSI node " << _node_path << std::endl;
}
diff --git a/src/libs/engine/events/DSSIControlEvent.h b/src/libs/engine/events/DSSIControlEvent.h
index 38114c4e..fa76e61f 100644
--- a/src/libs/engine/events/DSSIControlEvent.h
+++ b/src/libs/engine/events/DSSIControlEvent.h
@@ -39,10 +39,10 @@ public:
void post_process();
private:
- string m_node_path;
- int m_port_num;
- float m_val;
- DSSINode* m_node;
+ string _node_path;
+ int _port_num;
+ float _val;
+ DSSINode* _node;
};
diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp
index 5e992cbf..20debca2 100644
--- a/src/libs/engine/events/DSSIProgramEvent.cpp
+++ b/src/libs/engine/events/DSSIProgramEvent.cpp
@@ -30,10 +30,10 @@ namespace Ingen {
DSSIProgramEvent::DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_bank(bank),
- m_program(program),
- m_node(NULL)
+ _node_path(node_path),
+ _bank(bank),
+ _program(program),
+ _node(NULL)
{
}
@@ -41,10 +41,10 @@ DSSIProgramEvent::DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responde
void
DSSIProgramEvent::pre_process()
{
- Node* node = _engine.object_store()->find_node(m_node_path);
+ Node* node = _engine.object_store()->find_node(_node_path);
if (node != NULL && node->plugin()->type() == Plugin::DSSI)
- m_node = (DSSINode*)node;
+ _node = (DSSINode*)node;
QueuedEvent::pre_process();
}
@@ -55,21 +55,21 @@ DSSIProgramEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_node != NULL)
- m_node->program(m_bank, m_program);
+ if (_node != NULL)
+ _node->program(_bank, _program);
}
void
DSSIProgramEvent::post_process()
{
- if (m_node == NULL) {
- cerr << "Unable to find DSSI node " << m_node_path << endl;
+ if (_node == NULL) {
+ cerr << "Unable to find DSSI node " << _node_path << endl;
} else {
// sends program as metadata in the form bank/program
char* temp_buf = new char[16];
- snprintf(temp_buf, 16, "%d/%d", m_bank, m_program);
- _engine.broadcaster()->send_metadata_update(m_node_path, "dssi-program", temp_buf);
+ snprintf(temp_buf, 16, "%d/%d", _bank, _program);
+ _engine.broadcaster()->send_metadata_update(_node_path, "dssi-program", temp_buf);
}
}
diff --git a/src/libs/engine/events/DSSIProgramEvent.h b/src/libs/engine/events/DSSIProgramEvent.h
index e01a2cbf..f9babac7 100644
--- a/src/libs/engine/events/DSSIProgramEvent.h
+++ b/src/libs/engine/events/DSSIProgramEvent.h
@@ -37,10 +37,10 @@ public:
void post_process();
private:
- string m_node_path;
- int m_bank;
- int m_program;
- DSSINode* m_node;
+ string _node_path;
+ int _bank;
+ int _program;
+ DSSINode* _node;
};
diff --git a/src/libs/engine/events/DSSIUpdateEvent.cpp b/src/libs/engine/events/DSSIUpdateEvent.cpp
index 158d7875..4a5a832d 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.cpp
+++ b/src/libs/engine/events/DSSIUpdateEvent.cpp
@@ -29,9 +29,9 @@ namespace Ingen {
DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_url(url),
- m_node(NULL)
+ _path(path),
+ _url(url),
+ _node(NULL)
{
}
@@ -39,14 +39,14 @@ DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder,
void
DSSIUpdateEvent::pre_process()
{
- Node* node = _engine.object_store()->find_node(m_path);
+ Node* node = _engine.object_store()->find_node(_path);
if (node == NULL || node->plugin()->type() != Plugin::DSSI) {
- m_node = NULL;
+ _node = NULL;
QueuedEvent::pre_process();
return;
} else {
- m_node = (DSSINode*)node;
+ _node = (DSSINode*)node;
}
QueuedEvent::pre_process();
@@ -58,8 +58,8 @@ DSSIUpdateEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_node != NULL) {
- m_node->set_ui_url(m_url);
+ if (_node != NULL) {
+ _node->set_ui_url(_url);
}
}
@@ -67,10 +67,10 @@ DSSIUpdateEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
DSSIUpdateEvent::post_process()
{
- cerr << "DSSI update event: " << m_url << endl;
+ cerr << "DSSI update event: " << _url << endl;
- if (m_node != NULL) {
- m_node->send_update();
+ if (_node != NULL) {
+ _node->send_update();
}
}
diff --git a/src/libs/engine/events/DSSIUpdateEvent.h b/src/libs/engine/events/DSSIUpdateEvent.h
index 752ec5e8..5097ae89 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.h
+++ b/src/libs/engine/events/DSSIUpdateEvent.h
@@ -43,9 +43,9 @@ public:
void post_process();
private:
- string m_path;
- string m_url;
- DSSINode* m_node;
+ string _path;
+ string _url;
+ DSSINode* _node;
};
diff --git a/src/libs/engine/events/DisablePatchEvent.cpp b/src/libs/engine/events/DisablePatchEvent.cpp
index ed0234f7..f347b9b3 100644
--- a/src/libs/engine/events/DisablePatchEvent.cpp
+++ b/src/libs/engine/events/DisablePatchEvent.cpp
@@ -28,8 +28,8 @@ namespace Ingen {
DisablePatchEvent::DisablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(engine, responder, timestamp),
- m_patch_path(patch_path),
- m_patch(NULL)
+ _patch_path(patch_path),
+ _patch(NULL)
{
}
@@ -37,7 +37,7 @@ DisablePatchEvent::DisablePatchEvent(Engine& engine, SharedPtr<Responder> respon
void
DisablePatchEvent::pre_process()
{
- m_patch = _engine.object_store()->find_patch(m_patch_path);
+ _patch = _engine.object_store()->find_patch(_patch_path);
QueuedEvent::pre_process();
}
@@ -48,19 +48,19 @@ DisablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_patch != NULL)
- m_patch->disable();
+ if (_patch != NULL)
+ _patch->disable();
}
void
DisablePatchEvent::post_process()
{
- if (m_patch != NULL) {
+ if (_patch != NULL) {
_responder->respond_ok();
- _engine.broadcaster()->send_patch_disable(m_patch_path);
+ _engine.broadcaster()->send_patch_disable(_patch_path);
} else {
- _responder->respond_error(string("Patch ") + m_patch_path + " not found");
+ _responder->respond_error(string("Patch ") + _patch_path + " not found");
}
}
diff --git a/src/libs/engine/events/DisablePatchEvent.h b/src/libs/engine/events/DisablePatchEvent.h
index 42e04e3b..8b7125c3 100644
--- a/src/libs/engine/events/DisablePatchEvent.h
+++ b/src/libs/engine/events/DisablePatchEvent.h
@@ -41,8 +41,8 @@ public:
void post_process();
private:
- string m_patch_path;
- Patch* m_patch;
+ string _patch_path;
+ Patch* _patch;
};
diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp
index e843e272..dcb69401 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.cpp
+++ b/src/libs/engine/events/DisconnectNodeEvent.cpp
@@ -40,11 +40,11 @@ namespace Ingen {
DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_patch(NULL),
- m_node(NULL),
- m_succeeded(true),
- m_lookup(true)
+ _node_path(node_path),
+ _patch(NULL),
+ _node(NULL),
+ _succeeded(true),
+ _lookup(true)
{
}
@@ -53,18 +53,18 @@ DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> re
*/
DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, Node* node)
: QueuedEvent(engine),
- m_node_path(node->path()),
- m_patch(node->parent_patch()),
- m_node(node),
- m_succeeded(true),
- m_lookup(false)
+ _node_path(node->path()),
+ _patch(node->parent_patch()),
+ _node(node),
+ _succeeded(true),
+ _lookup(false)
{
}
DisconnectNodeEvent::~DisconnectNodeEvent()
{
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
delete (*i);
}
@@ -76,37 +76,37 @@ DisconnectNodeEvent::pre_process()
// cerr << "Preparing disconnection event...\n";
- if (m_lookup) {
- m_patch = _engine.object_store()->find_patch(m_node_path.parent());
+ if (_lookup) {
+ _patch = _engine.object_store()->find_patch(_node_path.parent());
- if (m_patch == NULL) {
- m_succeeded = false;
+ if (_patch == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- m_node = _engine.object_store()->find_node(m_node_path);
+ _node = _engine.object_store()->find_node(_node_path);
- if (m_node == NULL) {
- m_succeeded = false;
+ if (_node == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
}
Connection* c = NULL;
- for (ConnectionListIterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i) {
+ for (ConnectionListIterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) {
c = (*i);
- if ((c->src_port()->parent_node() == m_node || c->dst_port()->parent_node() == m_node) && !c->pending_disconnection()) {
+ if ((c->src_port()->parent_node() == _node || c->dst_port()->parent_node() == _node) && !c->pending_disconnection()) {
DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
c->src_port(), c->dst_port());
ev->pre_process();
- m_disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
+ _disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
c->pending_disconnection(true);
}
}
- m_succeeded = true;
+ _succeeded = true;
QueuedEvent::pre_process();
}
@@ -116,8 +116,8 @@ DisconnectNodeEvent::execute(SampleCount nframes, FrameTime start, FrameTime end
{
QueuedEvent::execute(nframes, start, end);
- if (m_succeeded) {
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ if (_succeeded) {
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
(*i)->execute(nframes, start, end);
}
}
@@ -126,10 +126,10 @@ DisconnectNodeEvent::execute(SampleCount nframes, FrameTime start, FrameTime end
void
DisconnectNodeEvent::post_process()
{
- if (m_succeeded) {
+ if (_succeeded) {
if (_responder)
_responder->respond_ok();
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
(*i)->post_process();
} else {
if (_responder)
diff --git a/src/libs/engine/events/DisconnectNodeEvent.h b/src/libs/engine/events/DisconnectNodeEvent.h
index 2c706b65..60c8238f 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.h
+++ b/src/libs/engine/events/DisconnectNodeEvent.h
@@ -51,14 +51,14 @@ public:
void post_process();
private:
- Path m_node_path;
- Patch* m_patch;
- Node* m_node;
- List<DisconnectionEvent*> m_disconnection_events;
+ Path _node_path;
+ Patch* _patch;
+ Node* _node;
+ List<DisconnectionEvent*> _disconnection_events;
- bool m_succeeded;
- bool m_lookup;
- bool m_disconnect_parent;
+ bool _succeeded;
+ bool _lookup;
+ bool _disconnect_parent;
};
diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp
index cfd523e0..cdd49b8b 100644
--- a/src/libs/engine/events/DisconnectPortEvent.cpp
+++ b/src/libs/engine/events/DisconnectPortEvent.cpp
@@ -40,24 +40,24 @@ namespace Ingen {
DisconnectPortEvent::DisconnectPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
: QueuedEvent(engine, responder, timestamp),
- m_port_path(port_path),
- m_patch(NULL),
- m_port(NULL),
- m_process_order(NULL),
- m_succeeded(true),
- m_lookup(true)
+ _port_path(port_path),
+ _patch(NULL),
+ _port(NULL),
+ _process_order(NULL),
+ _succeeded(true),
+ _lookup(true)
{
}
DisconnectPortEvent::DisconnectPortEvent(Engine& engine, Port* port)
: QueuedEvent(engine),
- m_port_path(port->path()),
- m_patch((port->parent_node() == NULL) ? NULL : port->parent_node()->parent_patch()),
- m_port(port),
- m_process_order(NULL),
- m_succeeded(true),
- m_lookup(false)
+ _port_path(port->path()),
+ _patch((port->parent_node() == NULL) ? NULL : port->parent_node()->parent_patch()),
+ _port(port),
+ _process_order(NULL),
+ _succeeded(true),
+ _lookup(false)
{
//cerr << "DisconnectPortEvent(Engine& engine, )\n";
}
@@ -65,7 +65,7 @@ DisconnectPortEvent::DisconnectPortEvent(Engine& engine, Port* port)
DisconnectPortEvent::~DisconnectPortEvent()
{
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
delete (*i);
}
@@ -75,43 +75,43 @@ DisconnectPortEvent::pre_process()
{
// cerr << "Preparing disconnection event...\n";
- if (m_lookup) {
- m_patch = _engine.object_store()->find_patch(m_port_path.parent().parent());
+ if (_lookup) {
+ _patch = _engine.object_store()->find_patch(_port_path.parent().parent());
- if (m_patch == NULL) {
- m_succeeded = false;
+ if (_patch == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- m_port = _engine.object_store()->find_port(m_port_path);
+ _port = _engine.object_store()->find_port(_port_path);
- if (m_port == NULL) {
- m_succeeded = false;
+ if (_port == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
}
- if (m_patch == NULL) {
- m_succeeded = false;
+ if (_patch == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
Connection* c = NULL;
- for (List<Connection*>::const_iterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i) {
+ for (List<Connection*>::const_iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) {
c = (*i);
- if ((c->src_port() == m_port || c->dst_port() == m_port) && !c->pending_disconnection()) {
+ if ((c->src_port() == _port || c->dst_port() == _port) && !c->pending_disconnection()) {
DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
c->src_port(), c->dst_port());
ev->pre_process();
- m_disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
+ _disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
c->pending_disconnection(true);
}
}
- m_succeeded = true;
+ _succeeded = true;
QueuedEvent::pre_process();
}
@@ -121,8 +121,8 @@ DisconnectPortEvent::execute(SampleCount nframes, FrameTime start, FrameTime end
{
QueuedEvent::execute(nframes, start, end);
- if (m_succeeded) {
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ if (_succeeded) {
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
(*i)->execute(nframes, start, end);
}
}
@@ -131,10 +131,10 @@ DisconnectPortEvent::execute(SampleCount nframes, FrameTime start, FrameTime end
void
DisconnectPortEvent::post_process()
{
- if (m_succeeded) {
+ if (_succeeded) {
if (_responder)
_responder->respond_ok();
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
(*i)->post_process();
} else {
if (_responder)
diff --git a/src/libs/engine/events/DisconnectPortEvent.h b/src/libs/engine/events/DisconnectPortEvent.h
index 42c0d4e9..57a150ed 100644
--- a/src/libs/engine/events/DisconnectPortEvent.h
+++ b/src/libs/engine/events/DisconnectPortEvent.h
@@ -52,15 +52,15 @@ public:
void post_process();
private:
- Path m_port_path;
- Patch* m_patch;
- Port* m_port;
- List<DisconnectionEvent*> m_disconnection_events;
+ Path _port_path;
+ Patch* _patch;
+ Port* _port;
+ List<DisconnectionEvent*> _disconnection_events;
- Array<Node*>* m_process_order; // Patch's new process order
+ Array<Node*>* _process_order; // Patch's new process order
- bool m_succeeded;
- bool m_lookup;
+ bool _succeeded;
+ bool _lookup;
};
diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp
index 8dc9e617..58a9727d 100644
--- a/src/libs/engine/events/DisconnectionEvent.cpp
+++ b/src/libs/engine/events/DisconnectionEvent.cpp
@@ -37,28 +37,28 @@ namespace Ingen {
DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> 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_lookup(true),
- 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),
+ _lookup(true),
+ _typed_event(NULL),
+ _error(NO_ERROR)
{
}
DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port)
: QueuedEvent(engine, responder, timestamp),
- m_src_port_path(src_port->path()),
- m_dst_port_path(dst_port->path()),
- m_patch(src_port->parent_node()->parent_patch()),
- m_src_port(src_port),
- m_dst_port(dst_port),
- m_lookup(false),
- m_typed_event(NULL),
- m_error(NO_ERROR)
+ _src_port_path(src_port->path()),
+ _dst_port_path(dst_port->path()),
+ _patch(src_port->parent_node()->parent_patch()),
+ _src_port(src_port),
+ _dst_port(dst_port),
+ _lookup(false),
+ _typed_event(NULL),
+ _error(NO_ERROR)
{
// FIXME: These break for patch ports.. is that ok?
/*assert(src_port->is_output());
@@ -70,63 +70,63 @@ DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> resp
DisconnectionEvent::~DisconnectionEvent()
{
- delete m_typed_event;
+ delete _typed_event;
}
void
DisconnectionEvent::pre_process()
{
- if (m_lookup) {
- 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 (_lookup) {
+ 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;
}
// 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 TypedDisconnectionEvent<Sample>(_engine, _responder, _time,
- dynamic_cast<OutputPort<Sample>*>(m_src_port), dynamic_cast<InputPort<Sample>*>(m_dst_port));
+ _typed_event = new TypedDisconnectionEvent<Sample>(_engine, _responder, _time,
+ dynamic_cast<OutputPort<Sample>*>(_src_port), dynamic_cast<InputPort<Sample>*>(_dst_port));
} else if (type == DataType::MIDI) {
- m_typed_event = new TypedDisconnectionEvent<MidiMessage>(_engine, _responder, _time,
- dynamic_cast<OutputPort<MidiMessage>*>(m_src_port), dynamic_cast<InputPort<MidiMessage>*>(m_dst_port));
+ _typed_event = new TypedDisconnectionEvent<MidiMessage>(_engine, _responder, _time,
+ dynamic_cast<OutputPort<MidiMessage>*>(_src_port), dynamic_cast<InputPort<MidiMessage>*>(_dst_port));
} else {
- m_error = TYPE_MISMATCH;
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}
- assert(m_typed_event);
- m_typed_event->pre_process();
- assert(m_typed_event->is_prepared());
+ assert(_typed_event);
+ _typed_event->pre_process();
+ assert(_typed_event->is_prepared());
QueuedEvent::pre_process();
}
@@ -137,20 +137,20 @@ DisconnectionEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_error == NO_ERROR)
- m_typed_event->execute(nframes, start, end);
+ if (_error == NO_ERROR)
+ _typed_event->execute(nframes, start, end);
}
void
DisconnectionEvent::post_process()
{
- if (m_error == NO_ERROR) {
- m_typed_event->post_process();
+ if (_error == NO_ERROR) {
+ _typed_event->post_process();
} else {
// FIXME: better error messages
string msg = "Unable to disconnect ";
- msg.append(m_src_port_path + " -> " + m_dst_port_path);
+ msg.append(_src_port_path + " -> " + _dst_port_path);
_responder->respond_error(msg);
}
}
@@ -163,11 +163,11 @@ DisconnectionEvent::post_process()
template <typename T>
TypedDisconnectionEvent<T>::TypedDisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(engine, responder, timestamp),
- m_src_port(src_port),
- m_dst_port(dst_port),
- m_patch(NULL),
- m_process_order(NULL),
- m_succeeded(true)
+ _src_port(src_port),
+ _dst_port(dst_port),
+ _patch(NULL),
+ _process_order(NULL),
+ _succeeded(true)
{
assert(src_port != NULL);
assert(dst_port != NULL);
@@ -178,37 +178,37 @@ template <typename T>
void
TypedDisconnectionEvent<T>::pre_process()
{
- if (!m_dst_port->is_connected_to(m_src_port)) {
- m_succeeded = false;
+ if (!_dst_port->is_connected_to(_src_port)) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- Node* const src_node = m_src_port->parent_node();
- Node* const dst_node = m_dst_port->parent_node();
+ Node* const src_node = _src_port->parent_node();
+ Node* const dst_node = _dst_port->parent_node();
// Connection to a patch port from inside the patch
if (src_node->parent_patch() != dst_node->parent_patch()) {
assert(src_node->parent() == dst_node || dst_node->parent() == src_node);
if (src_node->parent() == dst_node)
- m_patch = dynamic_cast<Patch*>(dst_node);
+ _patch = dynamic_cast<Patch*>(dst_node);
else
- m_patch = dynamic_cast<Patch*>(src_node);
+ _patch = dynamic_cast<Patch*>(src_node);
// Connection from a patch input to a patch output (pass through)
} else if (src_node == dst_node && dynamic_cast<Patch*>(src_node)) {
- m_patch = dynamic_cast<Patch*>(src_node);
+ _patch = dynamic_cast<Patch*>(src_node);
// Normal connection between nodes with the same parent
} else {
- m_patch = src_node->parent_patch();
+ _patch = src_node->parent_patch();
}
- assert(m_patch);
+ assert(_patch);
if (src_node == NULL || dst_node == NULL) {
- m_succeeded = false;
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
@@ -225,10 +225,10 @@ TypedDisconnectionEvent<T>::pre_process()
break;
}
- if (m_patch->enabled())
- m_process_order = m_patch->build_process_order();
+ if (_patch->enabled())
+ _process_order = _patch->build_process_order();
- m_succeeded = true;
+ _succeeded = true;
QueuedEvent::pre_process();
}
@@ -239,14 +239,14 @@ TypedDisconnectionEvent<T>::execute(SampleCount nframes, FrameTime start, FrameT
{
QueuedEvent::execute(nframes, start, end);
- if (m_succeeded) {
+ if (_succeeded) {
ListNode<TypedConnection<T>*>* const port_connection
- = m_dst_port->remove_connection(m_src_port);
+ = _dst_port->remove_connection(_src_port);
if (port_connection != NULL) {
ListNode<Connection*>* const patch_connection
- = m_patch->remove_connection(m_src_port, m_dst_port);
+ = _patch->remove_connection(_src_port, _dst_port);
assert(patch_connection);
assert((Connection*)port_connection->elem() == patch_connection->elem());
@@ -256,11 +256,11 @@ TypedDisconnectionEvent<T>::execute(SampleCount nframes, FrameTime start, FrameT
_engine.maid()->push(patch_connection);
_engine.maid()->push(port_connection->elem());
- if (m_patch->process_order() != NULL)
- _engine.maid()->push(m_patch->process_order());
- m_patch->process_order(m_process_order);
+ if (_patch->process_order() != NULL)
+ _engine.maid()->push(_patch->process_order());
+ _patch->process_order(_process_order);
} else {
- m_succeeded = false; // Ports weren't connected
+ _succeeded = false; // Ports weren't connected
}
}
}
@@ -270,11 +270,11 @@ template <typename T>
void
TypedDisconnectionEvent<T>::post_process()
{
- if (m_succeeded) {
+ if (_succeeded) {
_responder->respond_ok();
- _engine.broadcaster()->send_disconnection(m_src_port->path(), m_dst_port->path());
+ _engine.broadcaster()->send_disconnection(_src_port->path(), _dst_port->path());
} else {
_responder->respond_error("Unable to disconnect ports.");
}
diff --git a/src/libs/engine/events/DisconnectionEvent.h b/src/libs/engine/events/DisconnectionEvent.h
index 499799ae..606e7039 100644
--- a/src/libs/engine/events/DisconnectionEvent.h
+++ b/src/libs/engine/events/DisconnectionEvent.h
@@ -58,17 +58,17 @@ private:
enum ErrorType { NO_ERROR, PARENT_PATCH_DIFFERENT, PORT_NOT_FOUND, TYPE_MISMATCH };
- Path m_src_port_path;
- Path m_dst_port_path;
+ Path _src_port_path;
+ Path _dst_port_path;
- Patch* m_patch;
- Port* m_src_port;
- Port* m_dst_port;
+ Patch* _patch;
+ Port* _src_port;
+ Port* _dst_port;
- bool m_lookup;
- QueuedEvent* m_typed_event;
+ bool _lookup;
+ QueuedEvent* _typed_event;
- ErrorType m_error;
+ ErrorType _error;
};
@@ -89,13 +89,13 @@ public:
void post_process();
private:
- OutputPort<T>* m_src_port;
- InputPort<T>* m_dst_port;
+ OutputPort<T>* _src_port;
+ InputPort<T>* _dst_port;
- Patch* m_patch;
- Array<Node*>* m_process_order; ///< New process order for Patch
+ Patch* _patch;
+ Array<Node*>* _process_order; ///< New process order for Patch
- bool m_succeeded;
+ bool _succeeded;
};
diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp
index b4abddf0..599fbbf7 100644
--- a/src/libs/engine/events/EnablePatchEvent.cpp
+++ b/src/libs/engine/events/EnablePatchEvent.cpp
@@ -27,9 +27,9 @@ namespace Ingen {
EnablePatchEvent::EnablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(engine, responder, timestamp),
- m_patch_path(patch_path),
- m_patch(NULL),
- m_process_order(NULL)
+ _patch_path(patch_path),
+ _patch(NULL),
+ _process_order(NULL)
{
}
@@ -37,14 +37,14 @@ EnablePatchEvent::EnablePatchEvent(Engine& engine, SharedPtr<Responder> responde
void
EnablePatchEvent::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) {
/* Any event that requires a new process order will set the patch's
* process order to NULL if it is executed when the patch is not
* active. So, if the PO is NULL, calculate it here */
- if (m_patch->process_order() == NULL)
- m_process_order = m_patch->build_process_order();
+ if (_patch->process_order() == NULL)
+ _process_order = _patch->build_process_order();
}
QueuedEvent::pre_process();
@@ -56,11 +56,11 @@ EnablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_patch != NULL) {
- m_patch->enable();
+ if (_patch != NULL) {
+ _patch->enable();
- if (m_patch->process_order() == NULL)
- m_patch->process_order(m_process_order);
+ if (_patch->process_order() == NULL)
+ _patch->process_order(_process_order);
}
}
@@ -68,11 +68,11 @@ EnablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
EnablePatchEvent::post_process()
{
- if (m_patch != NULL) {
+ if (_patch != NULL) {
_responder->respond_ok();
- _engine.broadcaster()->send_patch_enable(m_patch_path);
+ _engine.broadcaster()->send_patch_enable(_patch_path);
} else {
- _responder->respond_error(string("Patch ") + m_patch_path + " not found");
+ _responder->respond_error(string("Patch ") + _patch_path + " not found");
}
}
diff --git a/src/libs/engine/events/EnablePatchEvent.h b/src/libs/engine/events/EnablePatchEvent.h
index 53d2b779..2c34e3d5 100644
--- a/src/libs/engine/events/EnablePatchEvent.h
+++ b/src/libs/engine/events/EnablePatchEvent.h
@@ -44,9 +44,9 @@ public:
void post_process();
private:
- string m_patch_path;
- Patch* m_patch;
- Array<Node*>* m_process_order; // Patch's new process order
+ string _patch_path;
+ Patch* _patch;
+ Array<Node*>* _process_order; // Patch's new process order
};
diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp
index b36a5363..7d1a25e0 100644
--- a/src/libs/engine/events/MidiLearnEvent.cpp
+++ b/src/libs/engine/events/MidiLearnEvent.cpp
@@ -30,7 +30,7 @@ namespace Ingen {
void
MidiLearnResponseEvent::post_process()
{
- _engine.broadcaster()->send_control_change(m_port_path, m_value);
+ _engine.broadcaster()->send_control_change(_port_path, _value);
}
@@ -39,9 +39,9 @@ MidiLearnResponseEvent::post_process()
MidiLearnEvent::MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_node(NULL),
- m_response_event(NULL)
+ _node_path(node_path),
+ _node(NULL),
+ _response_event(NULL)
{
}
@@ -49,8 +49,8 @@ MidiLearnEvent::MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, S
void
MidiLearnEvent::pre_process()
{
- m_node = _engine.object_store()->find_node(m_node_path);
- m_response_event = new MidiLearnResponseEvent(_engine, m_node_path + "/Controller_Number", _time);
+ _node = _engine.object_store()->find_node(_node_path);
+ _response_event = new MidiLearnResponseEvent(_engine, _node_path + "/Controller_Number", _time);
QueuedEvent::pre_process();
}
@@ -62,9 +62,9 @@ MidiLearnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
QueuedEvent::execute(nframes, start, end);
// FIXME: this isn't very good at all.
- if (m_node != NULL && m_node->plugin()->type() == Plugin::Internal
- && m_node->plugin()->plug_label() == "midi_control_in") {
- ((MidiControlNode*)m_node)->learn(m_response_event);
+ if (_node != NULL && _node->plugin()->type() == Plugin::Internal
+ && _node->plugin()->plug_label() == "midi_control_in") {
+ ((MidiControlNode*)_node)->learn(_response_event);
}
}
@@ -72,11 +72,11 @@ MidiLearnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
MidiLearnEvent::post_process()
{
- if (m_node != NULL) {
+ if (_node != NULL) {
_responder->respond_ok();
} else {
string msg = "Did not find node '";
- msg.append(m_node_path).append("' for MIDI learn.");
+ msg.append(_node_path).append("' for MIDI learn.");
_responder->respond_error(msg);
}
}
diff --git a/src/libs/engine/events/MidiLearnEvent.h b/src/libs/engine/events/MidiLearnEvent.h
index a6eb7d2d..281f3c03 100644
--- a/src/libs/engine/events/MidiLearnEvent.h
+++ b/src/libs/engine/events/MidiLearnEvent.h
@@ -39,16 +39,16 @@ class MidiLearnResponseEvent : public Event
public:
MidiLearnResponseEvent(Engine& engine, const string& port_path, SampleCount timestamp)
: Event(engine, SharedPtr<Responder>(), timestamp),
- m_port_path(port_path),
- m_value(0.0f)
+ _port_path(port_path),
+ _value(0.0f)
{}
- void set_value(Sample val) { m_value = val; }
+ void set_value(Sample val) { _value = val; }
void post_process();
private:
- string m_port_path;
- Sample m_value;
+ string _port_path;
+ Sample _value;
};
@@ -71,11 +71,11 @@ public:
void post_process();
private:
- string m_node_path;
- Node* m_node;
+ string _node_path;
+ Node* _node;
/// Event to respond with when learned
- MidiLearnResponseEvent* m_response_event;
+ MidiLearnResponseEvent* _response_event;
};
diff --git a/src/libs/engine/events/NoteOffEvent.cpp b/src/libs/engine/events/NoteOffEvent.cpp
index adc7ac56..f8dfe8eb 100644
--- a/src/libs/engine/events/NoteOffEvent.cpp
+++ b/src/libs/engine/events/NoteOffEvent.cpp
@@ -29,8 +29,8 @@ namespace Ingen {
*/
NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num)
: Event(engine, responder, timestamp),
- m_node(node),
- m_note_num(note_num)
+ _node(node),
+ _note_num(note_num)
{
}
@@ -39,9 +39,9 @@ NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, Sampl
*/
NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num)
: Event(engine, responder, timestamp),
- m_node(NULL),
- m_node_path(node_path),
- m_note_num(note_num)
+ _node(NULL),
+ _node_path(node_path),
+ _note_num(note_num)
{
}
@@ -52,15 +52,15 @@ NoteOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
Event::execute(nframes, start, end);
assert(_time >= start && _time <= end);
- if (m_node == NULL && m_node_path != "")
- m_node = _engine.object_store()->find_node(m_node_path);
+ if (_node == NULL && _node_path != "")
+ _node = _engine.object_store()->find_node(_node_path);
// FIXME: this isn't very good at all.
- if (m_node != NULL && m_node->plugin()->type() == Plugin::Internal) {
- if (m_node->plugin()->plug_label() == "note_in")
- ((MidiNoteNode*)m_node)->note_off(m_note_num, _time, nframes, start, end);
- else if (m_node->plugin()->plug_label() == "trigger_in")
- ((MidiTriggerNode*)m_node)->note_off(m_note_num, _time, nframes, start, end);
+ if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
+ if (_node->plugin()->plug_label() == "note_in")
+ ((MidiNoteNode*)_node)->note_off(_note_num, _time, nframes, start, end);
+ else if (_node->plugin()->plug_label() == "trigger_in")
+ ((MidiTriggerNode*)_node)->note_off(_note_num, _time, nframes, start, end);
}
}
@@ -68,7 +68,7 @@ NoteOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
NoteOffEvent::post_process()
{
- if (m_node != NULL)
+ if (_node != NULL)
_responder->respond_ok();
else
_responder->respond_error("Did not find node for note_off");
diff --git a/src/libs/engine/events/NoteOffEvent.h b/src/libs/engine/events/NoteOffEvent.h
index 35706f26..6b5ee185 100644
--- a/src/libs/engine/events/NoteOffEvent.h
+++ b/src/libs/engine/events/NoteOffEvent.h
@@ -41,9 +41,9 @@ public:
void post_process();
private:
- Node* m_node;
- string m_node_path;
- uchar m_note_num;
+ Node* _node;
+ string _node_path;
+ uchar _note_num;
};
diff --git a/src/libs/engine/events/NoteOnEvent.cpp b/src/libs/engine/events/NoteOnEvent.cpp
index f94ebb97..f39a71b6 100644
--- a/src/libs/engine/events/NoteOnEvent.cpp
+++ b/src/libs/engine/events/NoteOnEvent.cpp
@@ -32,10 +32,10 @@ namespace Ingen {
*/
NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity)
: Event(engine, responder, timestamp),
- m_node(patch),
- m_note_num(note_num),
- m_velocity(velocity),
- m_is_osc_triggered(false)
+ _node(patch),
+ _note_num(note_num),
+ _velocity(velocity),
+ _is_osc_triggered(false)
{
}
@@ -46,11 +46,11 @@ NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleC
*/
NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity)
: Event(engine, responder, timestamp),
- m_node(NULL),
- m_node_path(node_path),
- m_note_num(note_num),
- m_velocity(velocity),
- m_is_osc_triggered(true)
+ _node(NULL),
+ _node_path(node_path),
+ _note_num(note_num),
+ _velocity(velocity),
+ _is_osc_triggered(true)
{
}
@@ -62,15 +62,15 @@ NoteOnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
assert(_time >= start && _time <= end);
// Lookup if neccessary
- if (m_is_osc_triggered)
- m_node = _engine.object_store()->find_node(m_node_path);
+ if (_is_osc_triggered)
+ _node = _engine.object_store()->find_node(_node_path);
// FIXME: this isn't very good at all.
- if (m_node != NULL && m_node->plugin()->type() == Plugin::Internal) {
- if (m_node->plugin()->plug_label() == "note_in")
- ((MidiNoteNode*)m_node)->note_on(m_note_num, m_velocity, _time, nframes, start, end);
- else if (m_node->plugin()->plug_label() == "trigger_in")
- ((MidiTriggerNode*)m_node)->note_on(m_note_num, m_velocity, _time, nframes, start, end);
+ if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
+ if (_node->plugin()->plug_label() == "note_in")
+ ((MidiNoteNode*)_node)->note_on(_note_num, _velocity, _time, nframes, start, end);
+ else if (_node->plugin()->plug_label() == "trigger_in")
+ ((MidiTriggerNode*)_node)->note_on(_note_num, _velocity, _time, nframes, start, end);
}
}
@@ -78,8 +78,8 @@ NoteOnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
NoteOnEvent::post_process()
{
- if (m_is_osc_triggered) {
- if (m_node != NULL)
+ if (_is_osc_triggered) {
+ if (_node != NULL)
_responder->respond_ok();
else
_responder->respond_error("Did not find node for note_on");
diff --git a/src/libs/engine/events/NoteOnEvent.h b/src/libs/engine/events/NoteOnEvent.h
index f7bceb4a..0b592548 100644
--- a/src/libs/engine/events/NoteOnEvent.h
+++ b/src/libs/engine/events/NoteOnEvent.h
@@ -41,11 +41,11 @@ public:
void post_process();
private:
- Node* m_node;
- string m_node_path;
- uchar m_note_num;
- uchar m_velocity;
- bool m_is_osc_triggered;
+ Node* _node;
+ string _node_path;
+ uchar _note_num;
+ uchar _velocity;
+ bool _is_osc_triggered;
};
diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp
index f7b9bcf8..3ce22e07 100644
--- a/src/libs/engine/events/RenameEvent.cpp
+++ b/src/libs/engine/events/RenameEvent.cpp
@@ -29,18 +29,18 @@ namespace Ingen {
RenameEvent::RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name)
: QueuedEvent(engine, responder, timestamp),
- m_old_path(path),
- m_name(name),
- m_new_path(m_old_path.parent().base() + name),
- m_parent_patch(NULL),
- m_store_treenode(NULL),
- m_error(NO_ERROR)
+ _old_path(path),
+ _name(name),
+ _new_path(_old_path.parent().base() + name),
+ _parent_patch(NULL),
+ _store_treenode(NULL),
+ _error(NO_ERROR)
{
/*
- if (m_old_path.parent() == "/")
- m_new_path = string("/") + m_name;
+ if (_old_path.parent() == "/")
+ _new_path = string("/") + _name;
else
- m_new_path = m_old_path.parent() +"/"+ m_name;*/
+ _new_path = _old_path.parent() +"/"+ _name;*/
}
@@ -52,36 +52,36 @@ RenameEvent::~RenameEvent()
void
RenameEvent::pre_process()
{
- if (m_name.find("/") != string::npos) {
- m_error = INVALID_NAME;
+ if (_name.find("/") != string::npos) {
+ _error = INVALID_NAME;
QueuedEvent::pre_process();
return;
}
- if (_engine.object_store()->find(m_new_path)) {
- m_error = OBJECT_EXISTS;
+ if (_engine.object_store()->find(_new_path)) {
+ _error = OBJECT_EXISTS;
QueuedEvent::pre_process();
return;
}
- GraphObject* obj = _engine.object_store()->find(m_old_path);
+ GraphObject* obj = _engine.object_store()->find(_old_path);
if (obj == NULL) {
- m_error = OBJECT_NOT_FOUND;
+ _error = OBJECT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
// Renaming only works for Nodes and Patches (which are Nodes)
/*if (obj->as_node() == NULL) {
- m_error = OBJECT_NOT_RENAMABLE;
+ _error = OBJECT_NOT_RENAMABLE;
QueuedEvent::pre_process();
return;
}*/
if (obj != NULL) {
- obj->set_path(m_new_path);
- assert(obj->path() == m_new_path);
+ obj->set_path(_new_path);
+ assert(obj->path() == _new_path);
}
QueuedEvent::pre_process();
@@ -101,18 +101,18 @@ RenameEvent::post_process()
{
string msg = "Unable to rename object - ";
- if (m_error == NO_ERROR) {
+ if (_error == NO_ERROR) {
_responder->respond_ok();
- _engine.broadcaster()->send_rename(m_old_path, m_new_path);
+ _engine.broadcaster()->send_rename(_old_path, _new_path);
} else {
- if (m_error == OBJECT_EXISTS)
- msg.append("Object already exists at ").append(m_new_path);
- else if (m_error == OBJECT_NOT_FOUND)
- msg.append("Could not find object ").append(m_old_path);
- else if (m_error == OBJECT_NOT_RENAMABLE)
- msg.append(m_old_path).append(" is not renamable");
- else if (m_error == INVALID_NAME)
- msg.append(m_name).append(" is not a valid name");
+ if (_error == OBJECT_EXISTS)
+ msg.append("Object already exists at ").append(_new_path);
+ else if (_error == OBJECT_NOT_FOUND)
+ msg.append("Could not find object ").append(_old_path);
+ else if (_error == OBJECT_NOT_RENAMABLE)
+ msg.append(_old_path).append(" is not renamable");
+ else if (_error == INVALID_NAME)
+ msg.append(_name).append(" is not a valid name");
_responder->respond_error(msg);
}
diff --git a/src/libs/engine/events/RenameEvent.h b/src/libs/engine/events/RenameEvent.h
index cf866fb9..9c04314b 100644
--- a/src/libs/engine/events/RenameEvent.h
+++ b/src/libs/engine/events/RenameEvent.h
@@ -52,12 +52,12 @@ public:
private:
enum ErrorType { NO_ERROR, OBJECT_NOT_FOUND, OBJECT_EXISTS, OBJECT_NOT_RENAMABLE, INVALID_NAME };
- Path m_old_path;
- string m_name;
- Path m_new_path;
- Patch* m_parent_patch;
- TreeNode<GraphObject*>* m_store_treenode;
- ErrorType m_error;
+ Path _old_path;
+ string _name;
+ Path _new_path;
+ Patch* _parent_patch;
+ TreeNode<GraphObject*>* _store_treenode;
+ ErrorType _error;
};
diff --git a/src/libs/engine/events/RequestAllObjectsEvent.cpp b/src/libs/engine/events/RequestAllObjectsEvent.cpp
index 3c164ce2..43974076 100644
--- a/src/libs/engine/events/RequestAllObjectsEvent.cpp
+++ b/src/libs/engine/events/RequestAllObjectsEvent.cpp
@@ -33,7 +33,7 @@ RequestAllObjectsEvent::RequestAllObjectsEvent(Engine& engine, SharedPtr<Respond
void
RequestAllObjectsEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
+ _client = _engine.broadcaster()->client(_responder->client_key());
QueuedEvent::pre_process();
}
@@ -42,13 +42,13 @@ RequestAllObjectsEvent::pre_process()
void
RequestAllObjectsEvent::post_process()
{
- if (m_client) {
+ if (_client) {
_responder->respond_ok();
// Everything is a child of the root patch, so this sends it all
Patch* root = _engine.object_store()->find_patch("/");
if (root)
- ObjectSender::send_patch(m_client.get(), root, true);
+ ObjectSender::send_patch(_client.get(), root, true);
} else {
_responder->respond_error("Unable to find client to send all objects");
diff --git a/src/libs/engine/events/RequestAllObjectsEvent.h b/src/libs/engine/events/RequestAllObjectsEvent.h
index 46d22aab..dd89e421 100644
--- a/src/libs/engine/events/RequestAllObjectsEvent.h
+++ b/src/libs/engine/events/RequestAllObjectsEvent.h
@@ -41,7 +41,7 @@ public:
void post_process();
private:
- SharedPtr<ClientInterface> m_client;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp
index 9437ccbf..1c7c4578 100644
--- a/src/libs/engine/events/RequestMetadataEvent.cpp
+++ b/src/libs/engine/events/RequestMetadataEvent.cpp
@@ -29,10 +29,10 @@ namespace Ingen {
RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key)
: QueuedEvent(engine, responder, timestamp),
- m_path(node_path),
- m_key(key),
- m_object(NULL),
- m_client(SharedPtr<ClientInterface>())
+ _path(node_path),
+ _key(key),
+ _object(NULL),
+ _client(SharedPtr<ClientInterface>())
{
}
@@ -40,17 +40,17 @@ RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Responder>
void
RequestMetadataEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
+ _client = _engine.broadcaster()->client(_responder->client_key());
- if (m_client) {
- m_object = _engine.object_store()->find(m_path);
- if (m_object == NULL) {
+ if (_client) {
+ _object = _engine.object_store()->find(_path);
+ if (_object == NULL) {
QueuedEvent::pre_process();
return;
}
}
- m_value = m_object->get_metadata(m_key);
+ _value = _object->get_metadata(_key);
QueuedEvent::pre_process();
}
@@ -59,14 +59,14 @@ RequestMetadataEvent::pre_process()
void
RequestMetadataEvent::post_process()
{
- if (m_client) {
- if (!m_object) {
+ if (_client) {
+ if (!_object) {
string msg = "Unable to find metadata subject ";
- msg += m_path;
+ msg += _path;
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- m_client->metadata_update(m_path, m_key, m_value);
+ _client->metadata_update(_path, _key, _value);
}
} else {
_responder->respond_error("Unknown client");
diff --git a/src/libs/engine/events/RequestMetadataEvent.h b/src/libs/engine/events/RequestMetadataEvent.h
index 6b782ed2..0c95b74e 100644
--- a/src/libs/engine/events/RequestMetadataEvent.h
+++ b/src/libs/engine/events/RequestMetadataEvent.h
@@ -43,11 +43,11 @@ public:
void post_process();
private:
- string m_path;
- string m_key;
- Raul::Atom m_value;
- GraphObject* m_object;
- SharedPtr<ClientInterface> m_client;
+ string _path;
+ string _key;
+ Raul::Atom _value;
+ GraphObject* _object;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RequestObjectEvent.cpp b/src/libs/engine/events/RequestObjectEvent.cpp
index cd63f28e..72526299 100644
--- a/src/libs/engine/events/RequestObjectEvent.cpp
+++ b/src/libs/engine/events/RequestObjectEvent.cpp
@@ -33,8 +33,8 @@ namespace Ingen {
RequestObjectEvent::RequestObjectEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_object(NULL)
+ _path(path),
+ _object(NULL)
{
}
@@ -42,8 +42,8 @@ RequestObjectEvent::RequestObjectEvent(Engine& engine, SharedPtr<Responder> resp
void
RequestObjectEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
- m_object = _engine.object_store()->find(m_path);
+ _client = _engine.broadcaster()->client(_responder->client_key());
+ _object = _engine.object_store()->find(_path);
QueuedEvent::pre_process();
}
@@ -60,28 +60,28 @@ RequestObjectEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
RequestObjectEvent::post_process()
{
- if (!m_object) {
+ if (!_object) {
_responder->respond_error("Unable to find object requested.");
- } else if (m_client) {
- Patch* const patch = dynamic_cast<Patch*>(m_object);
+ } else if (_client) {
+ Patch* const patch = dynamic_cast<Patch*>(_object);
if (patch) {
_responder->respond_ok();
- ObjectSender::send_patch(m_client.get(), patch, true);
+ ObjectSender::send_patch(_client.get(), patch, true);
return;
}
- Node* const node = dynamic_cast<Node*>(m_object);
+ Node* const node = dynamic_cast<Node*>(_object);
if (node) {
_responder->respond_ok();
- ObjectSender::send_node(m_client.get(), node, true);
+ ObjectSender::send_node(_client.get(), node, true);
return;
}
- Port* const port = dynamic_cast<Port*>(m_object);
+ Port* const port = dynamic_cast<Port*>(_object);
if (port) {
_responder->respond_ok();
- ObjectSender::send_port(m_client.get(), port);
+ ObjectSender::send_port(_client.get(), port);
return;
}
diff --git a/src/libs/engine/events/RequestObjectEvent.h b/src/libs/engine/events/RequestObjectEvent.h
index b6041d2e..e80a9003 100644
--- a/src/libs/engine/events/RequestObjectEvent.h
+++ b/src/libs/engine/events/RequestObjectEvent.h
@@ -44,9 +44,9 @@ public:
void post_process();
private:
- string m_path;
- GraphObject* m_object;
- SharedPtr<ClientInterface> m_client;
+ string _path;
+ GraphObject* _object;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RequestPluginEvent.cpp b/src/libs/engine/events/RequestPluginEvent.cpp
index 8663f40a..66093ee8 100644
--- a/src/libs/engine/events/RequestPluginEvent.cpp
+++ b/src/libs/engine/events/RequestPluginEvent.cpp
@@ -32,8 +32,8 @@ namespace Ingen {
RequestPluginEvent::RequestPluginEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& uri)
: QueuedEvent(engine, responder, timestamp),
- m_uri(uri),
- m_plugin(NULL)
+ _uri(uri),
+ _plugin(NULL)
{
}
@@ -41,8 +41,8 @@ RequestPluginEvent::RequestPluginEvent(Engine& engine, SharedPtr<Responder> resp
void
RequestPluginEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
- m_plugin = _engine.node_factory()->plugin(m_uri);
+ _client = _engine.broadcaster()->client(_responder->client_key());
+ _plugin = _engine.node_factory()->plugin(_uri);
QueuedEvent::pre_process();
}
@@ -59,14 +59,14 @@ RequestPluginEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
RequestPluginEvent::post_process()
{
- if (!m_plugin) {
+ if (!_plugin) {
_responder->respond_error("Unable to find plugin requested.");
- } else if (m_client) {
+ } else if (_client) {
_responder->respond_ok();
- assert(m_plugin->uri() == m_uri);
- m_client->new_plugin(m_uri, m_plugin->type_uri(), m_plugin->name());
+ assert(_plugin->uri() == _uri);
+ _client->new_plugin(_uri, _plugin->type_uri(), _plugin->name());
} else {
_responder->respond_error("Unable to find client to send plugin.");
diff --git a/src/libs/engine/events/RequestPluginEvent.h b/src/libs/engine/events/RequestPluginEvent.h
index 8833f842..cae0aafe 100644
--- a/src/libs/engine/events/RequestPluginEvent.h
+++ b/src/libs/engine/events/RequestPluginEvent.h
@@ -44,9 +44,9 @@ public:
void post_process();
private:
- string m_uri;
- const Plugin* m_plugin;
- SharedPtr<ClientInterface> m_client;
+ string _uri;
+ const Plugin* _plugin;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RequestPluginsEvent.cpp b/src/libs/engine/events/RequestPluginsEvent.cpp
index da726e13..24fb055c 100644
--- a/src/libs/engine/events/RequestPluginsEvent.cpp
+++ b/src/libs/engine/events/RequestPluginsEvent.cpp
@@ -32,11 +32,11 @@ RequestPluginsEvent::RequestPluginsEvent(Engine& engine, SharedPtr<Responder> re
void
RequestPluginsEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
+ _client = _engine.broadcaster()->client(_responder->client_key());
// Take a copy to send in the post processing thread (to avoid problems
// because std::list isn't thread safe)
- m_plugins = _engine.node_factory()->plugins();
+ _plugins = _engine.node_factory()->plugins();
QueuedEvent::pre_process();
}
@@ -45,8 +45,8 @@ RequestPluginsEvent::pre_process()
void
RequestPluginsEvent::post_process()
{
- if (m_client) {
- _engine.broadcaster()->send_plugins_to(m_client, m_plugins);
+ if (_client) {
+ _engine.broadcaster()->send_plugins_to(_client, _plugins);
_responder->respond_ok();
} else {
_responder->respond_error("Unable to find client to send plugins");
diff --git a/src/libs/engine/events/RequestPluginsEvent.h b/src/libs/engine/events/RequestPluginsEvent.h
index 6355c037..d0ba3446 100644
--- a/src/libs/engine/events/RequestPluginsEvent.h
+++ b/src/libs/engine/events/RequestPluginsEvent.h
@@ -44,8 +44,8 @@ public:
void post_process();
private:
- SharedPtr<ClientInterface> m_client;
- std::list<Plugin*> m_plugins;
+ SharedPtr<ClientInterface> _client;
+ std::list<Plugin*> _plugins;
};
diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp
index 8457486f..30daa038 100644
--- a/src/libs/engine/events/RequestPortValueEvent.cpp
+++ b/src/libs/engine/events/RequestPortValueEvent.cpp
@@ -30,9 +30,9 @@ namespace Ingen {
RequestPortValueEvent::RequestPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
: QueuedEvent(engine, responder, timestamp),
- m_port_path(port_path),
- m_port(NULL),
- m_value(0.0)
+ _port_path(port_path),
+ _port(NULL),
+ _value(0.0)
{
}
@@ -40,8 +40,8 @@ RequestPortValueEvent::RequestPortValueEvent(Engine& engine, SharedPtr<Responder
void
RequestPortValueEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
- m_port = _engine.object_store()->find_port(m_port_path);
+ _client = _engine.broadcaster()->client(_responder->client_key());
+ _port = _engine.object_store()->find_port(_port_path);
QueuedEvent::pre_process();
}
@@ -53,10 +53,10 @@ RequestPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime e
QueuedEvent::execute(nframes, start, end);
assert(_time >= start && _time <= end);
- if (m_port != NULL && m_port->type() == DataType::FLOAT)
- m_value = ((TypedPort<Sample>*)m_port)->buffer(0)->value_at(0/*_time - start*/);
+ if (_port != NULL && _port->type() == DataType::FLOAT)
+ _value = ((TypedPort<Sample>*)_port)->buffer(0)->value_at(0/*_time - start*/);
else
- m_port = NULL; // triggers error response
+ _port = NULL; // triggers error response
}
@@ -64,11 +64,11 @@ void
RequestPortValueEvent::post_process()
{
string msg;
- if (!m_port) {
+ if (!_port) {
_responder->respond_error("Unable to find port for get_value responder.");
- } else if (m_client) {
+ } else if (_client) {
_responder->respond_ok();
- m_client->control_change(m_port_path, m_value);
+ _client->control_change(_port_path, _value);
} else {
_responder->respond_error("Unable to find client to send port value");
}
diff --git a/src/libs/engine/events/RequestPortValueEvent.h b/src/libs/engine/events/RequestPortValueEvent.h
index 55831f31..aceaaf85 100644
--- a/src/libs/engine/events/RequestPortValueEvent.h
+++ b/src/libs/engine/events/RequestPortValueEvent.h
@@ -44,10 +44,10 @@ public:
void post_process();
private:
- string m_port_path;
- Port* m_port;
- Sample m_value;
- SharedPtr<ClientInterface> m_client;
+ string _port_path;
+ Port* _port;
+ Sample _value;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp
index ba3d88e9..cc405a89 100644
--- a/src/libs/engine/events/SetMetadataEvent.cpp
+++ b/src/libs/engine/events/SetMetadataEvent.cpp
@@ -29,10 +29,10 @@ namespace Ingen {
SetMetadataEvent::SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_key(key),
- m_value(value),
- m_object(NULL)
+ _path(path),
+ _key(key),
+ _value(value),
+ _object(NULL)
{
}
@@ -40,13 +40,13 @@ SetMetadataEvent::SetMetadataEvent(Engine& engine, SharedPtr<Responder> responde
void
SetMetadataEvent::pre_process()
{
- m_object = _engine.object_store()->find(m_path);
- if (m_object == NULL) {
+ _object = _engine.object_store()->find(_path);
+ if (_object == NULL) {
QueuedEvent::pre_process();
return;
}
- m_object->set_metadata(m_key, m_value);
+ _object->set_metadata(_key, _value);
QueuedEvent::pre_process();
}
@@ -63,13 +63,13 @@ SetMetadataEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
SetMetadataEvent::post_process()
{
- if (m_object == NULL) {
+ if (_object == NULL) {
string msg = "Unable to find object ";
- msg += m_path;
+ msg += _path;
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- _engine.broadcaster()->send_metadata_update(m_path, m_key, m_value);
+ _engine.broadcaster()->send_metadata_update(_path, _key, _value);
}
}
diff --git a/src/libs/engine/events/SetMetadataEvent.h b/src/libs/engine/events/SetMetadataEvent.h
index adf73878..0b2a4075 100644
--- a/src/libs/engine/events/SetMetadataEvent.h
+++ b/src/libs/engine/events/SetMetadataEvent.h
@@ -42,10 +42,10 @@ public:
void post_process();
private:
- string m_path;
- string m_key;
- Raul::Atom m_value;
- GraphObject* m_object;
+ string _path;
+ string _key;
+ Raul::Atom _value;
+ GraphObject* _object;
};
diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp
index bba5bc3c..11eb91da 100644
--- a/src/libs/engine/events/SetPortValueEvent.cpp
+++ b/src/libs/engine/events/SetPortValueEvent.cpp
@@ -29,22 +29,22 @@ namespace Ingen {
*/
SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
: Event(engine, responder, timestamp),
- m_voice_num(voice_num),
- m_port_path(port_path),
- m_val(val),
- m_port(NULL),
- m_error(NO_ERROR)
+ _voice_num(voice_num),
+ _port_path(port_path),
+ _val(val),
+ _port(NULL),
+ _error(NO_ERROR)
{
}
SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
: Event(engine, responder, timestamp),
- m_voice_num(-1),
- m_port_path(port_path),
- m_val(val),
- m_port(NULL),
- m_error(NO_ERROR)
+ _voice_num(-1),
+ _port_path(port_path),
+ _val(val),
+ _port(NULL),
+ _error(NO_ERROR)
{
}
@@ -55,19 +55,19 @@ SetPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
Event::execute(nframes, start, end);
assert(_time >= start && _time <= end);
- if (m_port == NULL)
- m_port = _engine.object_store()->find_port(m_port_path);
+ if (_port == NULL)
+ _port = _engine.object_store()->find_port(_port_path);
- if (m_port == NULL) {
- m_error = PORT_NOT_FOUND;
- } else if (!(m_port->type() == DataType::FLOAT)) {
- m_error = TYPE_MISMATCH;
+ if (_port == NULL) {
+ _error = PORT_NOT_FOUND;
+ } else if (!(_port->type() == DataType::FLOAT)) {
+ _error = TYPE_MISMATCH;
} else {
- if (m_voice_num == -1)
- ((TypedPort<Sample>*)m_port)->set_value(m_val, _time - start);
+ if (_voice_num == -1)
+ ((TypedPort<Sample>*)_port)->set_value(_val, _time - start);
else
- ((TypedPort<Sample>*)m_port)->set_value(m_voice_num, m_val, _time - start);
- //((TypedPort<Sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range
+ ((TypedPort<Sample>*)_port)->set_value(_voice_num, _val, _time - start);
+ //((TypedPort<Sample>*)_port)->buffer(_voice_num)->set(_val, offset); // FIXME: check range
}
}
@@ -75,20 +75,20 @@ SetPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
SetPortValueEvent::post_process()
{
- if (m_error == NO_ERROR) {
- assert(m_port != NULL);
+ if (_error == NO_ERROR) {
+ assert(_port != NULL);
_responder->respond_ok();
- _engine.broadcaster()->send_control_change(m_port_path, m_val);
+ _engine.broadcaster()->send_control_change(_port_path, _val);
- } else if (m_error == PORT_NOT_FOUND) {
+ } else if (_error == PORT_NOT_FOUND) {
string msg = "Unable to find port ";
- msg.append(m_port_path).append(" for set_port_value");
+ msg.append(_port_path).append(" for set_port_value");
_responder->respond_error(msg);
- } else if (m_error == TYPE_MISMATCH) {
+ } else if (_error == TYPE_MISMATCH) {
string msg = "Attempt to set ";
- msg.append(m_port_path).append(" to incompatible type");
+ msg.append(_port_path).append(" to incompatible type");
_responder->respond_error(msg);
}
}
diff --git a/src/libs/engine/events/SetPortValueEvent.h b/src/libs/engine/events/SetPortValueEvent.h
index ed4bb86e..63f82a41 100644
--- a/src/libs/engine/events/SetPortValueEvent.h
+++ b/src/libs/engine/events/SetPortValueEvent.h
@@ -43,11 +43,11 @@ public:
private:
enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH };
- int m_voice_num;
- string m_port_path;
- float m_val;
- Port* m_port;
- ErrorType m_error;
+ int _voice_num;
+ string _port_path;
+ float _val;
+ Port* _port;
+ ErrorType _error;
};
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
index 2d7deeef..688455aa 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
@@ -30,22 +30,22 @@ namespace Ingen {
*/
SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
: QueuedEvent(engine, responder, timestamp),
- m_voice_num(voice_num),
- m_port_path(port_path),
- m_val(val),
- m_port(NULL),
- m_error(NO_ERROR)
+ _voice_num(voice_num),
+ _port_path(port_path),
+ _val(val),
+ _port(NULL),
+ _error(NO_ERROR)
{
}
SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
: QueuedEvent(engine, responder, timestamp),
- m_voice_num(-1),
- m_port_path(port_path),
- m_val(val),
- m_port(NULL),
- m_error(NO_ERROR)
+ _voice_num(-1),
+ _port_path(port_path),
+ _val(val),
+ _port(NULL),
+ _error(NO_ERROR)
{
}
@@ -53,13 +53,13 @@ SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Respo
void
SetPortValueQueuedEvent::pre_process()
{
- if (m_port == NULL)
- m_port = _engine.object_store()->find_port(m_port_path);
+ if (_port == NULL)
+ _port = _engine.object_store()->find_port(_port_path);
- if (m_port == NULL) {
- m_error = PORT_NOT_FOUND;
- } else if ( !(m_port->type() == DataType::FLOAT) ) {
- m_error = TYPE_MISMATCH;
+ if (_port == NULL) {
+ _error = PORT_NOT_FOUND;
+ } else if ( !(_port->type() == DataType::FLOAT) ) {
+ _error = TYPE_MISMATCH;
}
QueuedEvent::pre_process();
@@ -72,12 +72,12 @@ SetPortValueQueuedEvent::execute(SampleCount nframes, FrameTime start, FrameTime
QueuedEvent::execute(nframes, start, end);
assert(_time >= start && _time <= end);
- if (m_error == NO_ERROR) {
- assert(m_port != NULL);
- if (m_voice_num == -1)
- ((TypedPort<Sample>*)m_port)->set_value(m_val, _time - start);
+ if (_error == NO_ERROR) {
+ assert(_port != NULL);
+ if (_voice_num == -1)
+ ((TypedPort<Sample>*)_port)->set_value(_val, _time - start);
else
- ((TypedPort<Sample>*)m_port)->buffer(m_voice_num)->set(m_val, _time - start); // FIXME: check range
+ ((TypedPort<Sample>*)_port)->buffer(_voice_num)->set(_val, _time - start); // FIXME: check range
}
}
@@ -85,27 +85,27 @@ SetPortValueQueuedEvent::execute(SampleCount nframes, FrameTime start, FrameTime
void
SetPortValueQueuedEvent::post_process()
{
- if (m_error == NO_ERROR) {
- assert(m_port != NULL);
+ if (_error == NO_ERROR) {
+ assert(_port != NULL);
_responder->respond_ok();
- _engine.broadcaster()->send_control_change(m_port_path, m_val);
+ _engine.broadcaster()->send_control_change(_port_path, _val);
// Send patch port control change, if this is a bridge port
- /*Port* parent_port = m_port->parent_node()->as_port();
+ /*Port* parent_port = _port->parent_node()->as_port();
if (parent_port != NULL) {
assert(parent_port->type() == DataType::FLOAT);
- _engine.broadcaster()->send_control_change(parent_port->path(), m_val);
+ _engine.broadcaster()->send_control_change(parent_port->path(), _val);
}*/
- } else if (m_error == PORT_NOT_FOUND) {
+ } else if (_error == PORT_NOT_FOUND) {
string msg = "Unable to find port ";
- msg.append(m_port_path).append(" for set_port_value_slow");
+ msg.append(_port_path).append(" for set_port_value_slow");
_responder->respond_error(msg);
- } else if (m_error == TYPE_MISMATCH) {
+ } else if (_error == TYPE_MISMATCH) {
string msg = "Attempt to set ";
- msg.append(m_port_path).append(" to incompatible type");
+ msg.append(_port_path).append(" to incompatible type");
_responder->respond_error(msg);
}
}
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.h b/src/libs/engine/events/SetPortValueQueuedEvent.h
index 118899dd..742f84bb 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.h
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.h
@@ -44,11 +44,11 @@ public:
private:
enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH };
- int m_voice_num;
- string m_port_path;
- float m_val;
- Port* m_port;
- ErrorType m_error;
+ int _voice_num;
+ string _port_path;
+ float _val;
+ Port* _port;
+ ErrorType _error;
};