summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-13 16:04:14 +0000
committerDavid Robillard <d@drobilla.net>2009-05-13 16:04:14 +0000
commitaa473d19780f2670bb828835ee7ce970571016cf (patch)
tree0483fcb2cc350b3cc2f660f22449f803ae12f93d /src/engine
parent44ddb73018b96a6979b4339f4ba234e5c97741f8 (diff)
downloadingen-aa473d19780f2670bb828835ee7ce970571016cf.tar.gz
ingen-aa473d19780f2670bb828835ee7ce970571016cf.tar.bz2
ingen-aa473d19780f2670bb828835ee7ce970571016cf.zip
Strip trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1999 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/AudioBuffer.cpp26
-rw-r--r--src/engine/AudioBuffer.hpp24
-rw-r--r--src/engine/AudioDriver.hpp14
-rw-r--r--src/engine/Buffer.cpp6
-rw-r--r--src/engine/Buffer.hpp18
-rw-r--r--src/engine/ClientBroadcaster.cpp14
-rw-r--r--src/engine/ClientBroadcaster.hpp16
-rw-r--r--src/engine/CompiledPatch.hpp8
-rw-r--r--src/engine/ConnectionImpl.cpp28
-rw-r--r--src/engine/ConnectionImpl.hpp16
-rw-r--r--src/engine/Context.hpp6
-rw-r--r--src/engine/Driver.hpp18
-rw-r--r--src/engine/DuplexPort.cpp28
-rw-r--r--src/engine/DuplexPort.hpp10
-rw-r--r--src/engine/Engine.cpp36
-rw-r--r--src/engine/Engine.hpp14
-rw-r--r--src/engine/EngineStore.cpp20
-rw-r--r--src/engine/EngineStore.hpp10
-rw-r--r--src/engine/Event.cpp8
-rw-r--r--src/engine/Event.hpp16
-rw-r--r--src/engine/EventBuffer.cpp16
-rw-r--r--src/engine/EventBuffer.hpp20
-rw-r--r--src/engine/EventSink.cpp12
-rw-r--r--src/engine/EventSink.hpp6
-rw-r--r--src/engine/EventSource.hpp6
-rw-r--r--src/engine/GraphObjectImpl.cpp10
-rw-r--r--src/engine/GraphObjectImpl.hpp24
-rw-r--r--src/engine/HTTPClientSender.cpp18
-rw-r--r--src/engine/HTTPClientSender.hpp42
-rw-r--r--src/engine/HTTPEngineReceiver.cpp34
-rw-r--r--src/engine/HTTPEngineReceiver.hpp6
-rw-r--r--src/engine/InputPort.cpp40
-rw-r--r--src/engine/InputPort.hpp18
-rw-r--r--src/engine/InternalController.cpp28
-rw-r--r--src/engine/InternalController.hpp14
-rw-r--r--src/engine/InternalNote.cpp44
-rw-r--r--src/engine/InternalNote.hpp12
-rw-r--r--src/engine/InternalPlugin.cpp8
-rw-r--r--src/engine/InternalPlugin.hpp10
-rw-r--r--src/engine/InternalTransport.cpp30
-rw-r--r--src/engine/InternalTransport.hpp6
-rw-r--r--src/engine/InternalTrigger.cpp22
-rw-r--r--src/engine/InternalTrigger.hpp10
-rw-r--r--src/engine/JackAudioDriver.cpp52
-rw-r--r--src/engine/JackAudioDriver.hpp34
-rw-r--r--src/engine/JackMidiDriver.cpp28
-rw-r--r--src/engine/JackMidiDriver.hpp22
-rw-r--r--src/engine/LADSPANode.cpp48
-rw-r--r--src/engine/LADSPANode.hpp14
-rw-r--r--src/engine/LADSPAPlugin.cpp16
-rw-r--r--src/engine/LADSPAPlugin.hpp14
-rw-r--r--src/engine/LV2EventBuffer.cpp16
-rw-r--r--src/engine/LV2EventBuffer.hpp12
-rw-r--r--src/engine/LV2Info.cpp10
-rw-r--r--src/engine/LV2Info.hpp12
-rw-r--r--src/engine/LV2Node.cpp52
-rw-r--r--src/engine/LV2Node.hpp18
-rw-r--r--src/engine/LV2Plugin.cpp18
-rw-r--r--src/engine/LV2Plugin.hpp12
-rw-r--r--src/engine/MessageContext.cpp6
-rw-r--r--src/engine/MessageContext.hpp6
-rw-r--r--src/engine/MidiDriver.hpp26
-rw-r--r--src/engine/NodeBase.cpp16
-rw-r--r--src/engine/NodeBase.hpp34
-rw-r--r--src/engine/NodeFactory.cpp38
-rw-r--r--src/engine/NodeFactory.hpp14
-rw-r--r--src/engine/NodeImpl.hpp30
-rw-r--r--src/engine/OSCClientSender.cpp14
-rw-r--r--src/engine/OSCClientSender.hpp46
-rw-r--r--src/engine/OSCDriver.hpp20
-rw-r--r--src/engine/OSCEngineReceiver.cpp46
-rw-r--r--src/engine/OSCEngineReceiver.hpp8
-rw-r--r--src/engine/ObjectSender.cpp38
-rw-r--r--src/engine/ObjectSender.hpp6
-rw-r--r--src/engine/OutputPort.cpp6
-rw-r--r--src/engine/OutputPort.hpp8
-rw-r--r--src/engine/PatchImpl.cpp58
-rw-r--r--src/engine/PatchImpl.hpp36
-rw-r--r--src/engine/PatchPlugin.hpp10
-rw-r--r--src/engine/PluginImpl.cpp8
-rw-r--r--src/engine/PluginImpl.hpp16
-rw-r--r--src/engine/PortImpl.cpp16
-rw-r--r--src/engine/PortImpl.hpp22
-rw-r--r--src/engine/PostProcessor.cpp8
-rw-r--r--src/engine/PostProcessor.hpp6
-rw-r--r--src/engine/ProcessContext.hpp6
-rw-r--r--src/engine/ProcessSlave.cpp16
-rw-r--r--src/engine/ProcessSlave.hpp14
-rw-r--r--src/engine/QueuedEngineInterface.cpp18
-rw-r--r--src/engine/QueuedEngineInterface.hpp50
-rw-r--r--src/engine/QueuedEvent.cpp8
-rw-r--r--src/engine/QueuedEvent.hpp12
-rw-r--r--src/engine/QueuedEventSource.cpp12
-rw-r--r--src/engine/QueuedEventSource.hpp10
-rw-r--r--src/engine/Responder.hpp6
-rw-r--r--src/engine/ThreadManager.hpp6
-rw-r--r--src/engine/events.hpp6
-rw-r--r--src/engine/events/AllNotesOffEvent.cpp8
-rw-r--r--src/engine/events/AllNotesOffEvent.hpp8
-rw-r--r--src/engine/events/ClearPatchEvent.cpp24
-rw-r--r--src/engine/events/ClearPatchEvent.hpp12
-rw-r--r--src/engine/events/ConnectionEvent.cpp26
-rw-r--r--src/engine/events/ConnectionEvent.hpp18
-rw-r--r--src/engine/events/CreateNodeEvent.cpp14
-rw-r--r--src/engine/events/CreateNodeEvent.hpp8
-rw-r--r--src/engine/events/CreatePatchEvent.cpp20
-rw-r--r--src/engine/events/CreatePatchEvent.hpp10
-rw-r--r--src/engine/events/CreatePortEvent.cpp18
-rw-r--r--src/engine/events/CreatePortEvent.hpp10
-rw-r--r--src/engine/events/DeactivateEvent.hpp8
-rw-r--r--src/engine/events/DestroyEvent.cpp36
-rw-r--r--src/engine/events/DestroyEvent.hpp8
-rw-r--r--src/engine/events/DisablePortMonitoringEvent.cpp8
-rw-r--r--src/engine/events/DisablePortMonitoringEvent.hpp8
-rw-r--r--src/engine/events/DisconnectAllEvent.cpp18
-rw-r--r--src/engine/events/DisconnectAllEvent.hpp10
-rw-r--r--src/engine/events/DisconnectionEvent.cpp28
-rw-r--r--src/engine/events/DisconnectionEvent.hpp18
-rw-r--r--src/engine/events/LoadPluginsEvent.cpp10
-rw-r--r--src/engine/events/LoadPluginsEvent.hpp8
-rw-r--r--src/engine/events/MidiLearnEvent.cpp12
-rw-r--r--src/engine/events/MidiLearnEvent.hpp10
-rw-r--r--src/engine/events/NoteEvent.cpp10
-rw-r--r--src/engine/events/NoteEvent.hpp8
-rw-r--r--src/engine/events/PingQueuedEvent.hpp6
-rw-r--r--src/engine/events/RegisterClientEvent.cpp8
-rw-r--r--src/engine/events/RegisterClientEvent.hpp6
-rw-r--r--src/engine/events/RenameEvent.cpp14
-rw-r--r--src/engine/events/RenameEvent.hpp6
-rw-r--r--src/engine/events/RequestAllObjectsEvent.cpp6
-rw-r--r--src/engine/events/RequestAllObjectsEvent.hpp6
-rw-r--r--src/engine/events/RequestMetadataEvent.cpp8
-rw-r--r--src/engine/events/RequestMetadataEvent.hpp10
-rw-r--r--src/engine/events/RequestObjectEvent.cpp8
-rw-r--r--src/engine/events/RequestObjectEvent.hpp8
-rw-r--r--src/engine/events/RequestPluginEvent.cpp8
-rw-r--r--src/engine/events/RequestPluginEvent.hpp8
-rw-r--r--src/engine/events/RequestPluginsEvent.cpp6
-rw-r--r--src/engine/events/RequestPluginsEvent.hpp6
-rw-r--r--src/engine/events/SendPortActivityEvent.cpp6
-rw-r--r--src/engine/events/SendPortActivityEvent.hpp8
-rw-r--r--src/engine/events/SendPortValueEvent.cpp8
-rw-r--r--src/engine/events/SendPortValueEvent.hpp8
-rw-r--r--src/engine/events/SetMetadataEvent.cpp12
-rw-r--r--src/engine/events/SetMetadataEvent.hpp8
-rw-r--r--src/engine/events/SetPortValueEvent.cpp22
-rw-r--r--src/engine/events/SetPortValueEvent.hpp14
-rw-r--r--src/engine/events/UnregisterClientEvent.cpp6
-rw-r--r--src/engine/events/UnregisterClientEvent.hpp6
-rw-r--r--src/engine/ingen.lv2/ingen_lv2.cpp18
-rw-r--r--src/engine/ingen_engine.cpp6
-rw-r--r--src/engine/ingen_engine.hpp6
-rw-r--r--src/engine/tuning.hpp10
-rw-r--r--src/engine/types.hpp6
-rw-r--r--src/engine/util.hpp6
155 files changed, 1248 insertions, 1248 deletions
diff --git a/src/engine/AudioBuffer.cpp b/src/engine/AudioBuffer.cpp
index c621c18c..c151a98e 100644
--- a/src/engine/AudioBuffer.cpp
+++ b/src/engine/AudioBuffer.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -68,13 +68,13 @@ AudioBuffer::resize(size_t size)
_size = size;
Sample* const old_data = _data;
-
+
const bool using_local_data = (_data == _local_data);
deallocate();
alloc_local_data(_size * sizeof(Sample));
assert(_local_data);
-
+
if (using_local_data)
_data = _local_data;
else
@@ -161,7 +161,7 @@ AudioBuffer::set_block(Sample val, size_t start_offset, size_t end_offset)
{
assert(end_offset >= start_offset);
assert(end_offset < _size);
-
+
Sample* const buf = data();
assert(buf);
@@ -179,7 +179,7 @@ AudioBuffer::scale(Sample val, size_t start_sample, size_t end_sample)
{
assert(end_sample >= start_sample);
assert(end_sample < _size);
-
+
Sample* const buf = data();
assert(buf);
@@ -199,10 +199,10 @@ AudioBuffer::copy(const Buffer* src, size_t start_sample, size_t end_sample)
assert(end_sample >= start_sample);
assert(src);
assert(src->type() == DataType::CONTROL || DataType::AUDIO);
-
+
Sample* const buf = data();
assert(buf);
-
+
const Sample* const src_buf = ((AudioBuffer*)src)->data();
assert(src_buf);
@@ -226,14 +226,14 @@ AudioBuffer::accumulate(const AudioBuffer* const src, size_t start_sample, size_
Sample* const buf = data();
assert(buf);
-
+
const Sample* const src_buf = src->data();
assert(src_buf);
const size_t to_copy = std::min(end_sample, _size - 1);
for (size_t i = start_sample; i <= to_copy; ++i)
buf[i] += src_buf[i];
-
+
}
@@ -249,7 +249,7 @@ AudioBuffer::join(Buffer* buf)
return false;
assert(abuf->size() >= _size);
-
+
_joined_buf = abuf;
_filled_size = abuf->filled_size();
@@ -258,7 +258,7 @@ AudioBuffer::join(Buffer* buf)
return true;
}
-
+
void
AudioBuffer::unjoin()
{
diff --git a/src/engine/AudioBuffer.hpp b/src/engine/AudioBuffer.hpp
index de5487c0..09683151 100644
--- a/src/engine/AudioBuffer.hpp
+++ b/src/engine/AudioBuffer.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -26,7 +26,7 @@
namespace Ingen {
-
+
class AudioBuffer : public Buffer
{
public:
@@ -38,27 +38,27 @@ public:
void scale(Sample val, size_t start_sample, size_t end_sample);
void copy(const Buffer* src, size_t start_sample, size_t end_sample);
void accumulate(const AudioBuffer* src, size_t start_sample, size_t end_sample);
-
+
bool join(Buffer* buf);
void unjoin();
-
+
/** For driver use only!! */
void set_data(Sample* data);
-
+
inline const void* raw_data() const { return _data; }
inline void* raw_data() { return _data; }
-
+
inline Sample* data() const { return _data; }
-
+
inline Sample& value_at(size_t offset) const
{ assert(offset < _size); return data()[offset]; }
-
+
void prepare_read(FrameTime start, SampleCount nframes);
void prepare_write(FrameTime start, SampleCount nframes) {}
-
+
void rewind() const {}
void resize(size_t size);
-
+
void filled_size(size_t size) { _filled_size = size; }
size_t filled_size() const { return _filled_size; }
size_t size() const { return _size; }
diff --git a/src/engine/AudioDriver.hpp b/src/engine/AudioDriver.hpp
index 265bb3ec..a753a39a 100644
--- a/src/engine/AudioDriver.hpp
+++ b/src/engine/AudioDriver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -41,14 +41,14 @@ class AudioDriver : public Driver
{
public:
AudioDriver() : Driver(Shared::DataType::AUDIO) {}
-
+
virtual void set_root_patch(PatchImpl* patch) = 0;
virtual PatchImpl* root_patch() = 0;
-
+
virtual void add_port(DriverPort* port) = 0;
-
+
virtual Raul::List<DriverPort*>::Node* remove_port(const Raul::Path& path) = 0;
-
+
virtual SampleCount buffer_size() const = 0;
virtual SampleCount sample_rate() const = 0;
virtual SampleCount frame_time() const = 0;
diff --git a/src/engine/Buffer.cpp b/src/engine/Buffer.cpp
index 49ce1136..90edb506 100644
--- a/src/engine/Buffer.cpp
+++ b/src/engine/Buffer.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/Buffer.hpp b/src/engine/Buffer.hpp
index 254cf009..987a6191 100644
--- a/src/engine/Buffer.hpp
+++ b/src/engine/Buffer.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -27,7 +27,7 @@
namespace Ingen {
-
+
class Buffer : public boost::noncopyable, public Raul::Deletable
{
public:
@@ -38,12 +38,12 @@ public:
{}
virtual ~Buffer() {}
-
+
static Buffer* create(Shared::DataType type, size_t size);
/** Clear contents and reset state */
virtual void clear() = 0;
-
+
virtual void* raw_data() = 0;
virtual const void* raw_data() const = 0;
@@ -52,13 +52,13 @@ public:
virtual void prepare_read(FrameTime start, SampleCount nframes) = 0;
virtual void prepare_write(FrameTime start, SampleCount nframes) = 0;
-
+
bool is_joined() const { return (_joined_buf != NULL); }
Buffer* joined_buffer() const { return _joined_buf; }
-
+
virtual bool join(Buffer* buf) = 0;
virtual void unjoin() = 0;
-
+
virtual void copy(const Buffer* src, size_t start_sample, size_t end_sample) = 0;
virtual void resize(size_t size) { _size = size; }
diff --git a/src/engine/ClientBroadcaster.cpp b/src/engine/ClientBroadcaster.cpp
index 638dbbb1..725e4b3c 100644
--- a/src/engine/ClientBroadcaster.cpp
+++ b/src/engine/ClientBroadcaster.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -32,7 +32,7 @@ using Ingen::Shared::ClientInterface;
namespace Ingen {
-
+
/** Register a client to receive messages over the notification band.
*/
void
@@ -57,7 +57,7 @@ bool
ClientBroadcaster::unregister_client(const URI& uri)
{
size_t erased = _clients.erase(uri);
-
+
if (erased > 0)
cout << "Unregistered client: " << uri << endl;
else
@@ -85,7 +85,7 @@ ClientBroadcaster::client(const URI& uri)
}
}
-
+
void
ClientBroadcaster::bundle_begin()
{
@@ -93,7 +93,7 @@ ClientBroadcaster::bundle_begin()
(*i).second->bundle_begin();
}
-
+
void
ClientBroadcaster::bundle_end()
{
diff --git a/src/engine/ClientBroadcaster.hpp b/src/engine/ClientBroadcaster.hpp
index a053e23b..821f4970 100644
--- a/src/engine/ClientBroadcaster.hpp
+++ b/src/engine/ClientBroadcaster.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -51,17 +51,17 @@ class ClientBroadcaster
public:
void register_client(const Raul::URI& uri, Shared::ClientInterface* client);
bool unregister_client(const Raul::URI& uri);
-
+
Shared::ClientInterface* client(const Raul::URI& uri);
-
+
//void send_client_registration(const string& url, int client_id);
-
+
void bundle_begin();
void bundle_end();
// Error that isn't the direct result of a request
void send_error(const std::string& msg);
-
+
void send_plugins(const NodeFactory::Plugins& plugin_list);
void send_object(const GraphObjectImpl* p, bool recursive);
void send_destroyed(const Raul::Path& path);
@@ -75,7 +75,7 @@ public:
void send_activity(const Raul::Path& path);
void send_program_add(const Raul::Path& node_path, int bank, int program, const std::string& name);
void send_program_remove(const Raul::Path& node_path, int bank, int program);
-
+
void send_plugins_to(Shared::ClientInterface*, const NodeFactory::Plugins& plugin_list);
private:
diff --git a/src/engine/CompiledPatch.hpp b/src/engine/CompiledPatch.hpp
index 4c62f494..4af7148c 100644
--- a/src/engine/CompiledPatch.hpp
+++ b/src/engine/CompiledPatch.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -35,7 +35,7 @@ struct CompiledNode {
{
// Copy to a vector for maximum iteration speed and cache optimization
// (Need to take a copy anyway)
-
+
_dependants.reserve(d->size());
for (Raul::List<NodeImpl*>::iterator i = d->begin(); i != d->end(); ++i)
_dependants.push_back(*i);
diff --git a/src/engine/ConnectionImpl.cpp b/src/engine/ConnectionImpl.cpp
index 3ec1a3f8..90253502 100644
--- a/src/engine/ConnectionImpl.cpp
+++ b/src/engine/ConnectionImpl.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -29,7 +29,7 @@ using namespace Shared;
/** Constructor for a connection from a node's output port.
*
- * This handles both polyphonic and monophonic nodes, transparently to the
+ * This handles both polyphonic and monophonic nodes, transparently to the
* user (InputPort).
*/
ConnectionImpl::ConnectionImpl(PortImpl* src_port, PortImpl* dst_port)
@@ -64,7 +64,7 @@ ConnectionImpl::~ConnectionImpl()
{
delete _local_buffer;
}
-
+
void
ConnectionImpl::set_mode()
@@ -90,7 +90,7 @@ ConnectionImpl::set_buffer_size(size_t size)
_local_buffer = Buffer::create(_dst_port->type(), _dst_port->buffer(0)->size());
}
-
+
_buffer_size = size;
}
@@ -137,7 +137,7 @@ ConnectionImpl::apply_poly(Raul::Maid& maid, uint32_t poly)
{
_src_port->apply_poly(maid, poly);
set_mode();
-
+
/*cerr << "CONNECTION APPLY: " << src_port()->path() << " * " << src_port()->poly()
<< " -> " << dst_port()->path() << " * " << dst_port()->poly()
<< "\t\tmust mix: " << must_mix() << ", extend: " << must_extend()
@@ -167,7 +167,7 @@ ConnectionImpl::process(ProcessContext& context)
/*std::cerr << src_port()->path() << " * " << src_port()->poly()
<< " -> " << dst_port()->path() << " * " << dst_port()->poly()
<< "\t\tmode: " << (int)_mode << std::endl;*/
-
+
if (_mode == COPY) {
assert(src_port()->poly() == dst_port()->poly());
const size_t copy_size = std::min(src_port()->buffer_size(), dst_port()->buffer_size());
@@ -178,7 +178,7 @@ ConnectionImpl::process(ProcessContext& context)
const AudioBuffer* const src_buffer = (AudioBuffer*)src_port()->buffer(0);
AudioBuffer* mix_buf = (AudioBuffer*)_local_buffer;
-
+
assert(mix_buf);
const size_t copy_size = std::min(src_buffer->size(), mix_buf->size());
@@ -189,13 +189,13 @@ ConnectionImpl::process(ProcessContext& context)
// Write last value of src buffer to remainder of dst buffer, if necessary
if (copy_size < mix_buf->size())
mix_buf->set_block(src_buffer->value_at(copy_size-1), copy_size, mix_buf->size()-1);
-
+
// Accumulate the source's voices into local buffer starting at the second
// voice (buffer is already set to first voice above)
for (uint32_t j=1; j < src_port()->poly(); ++j) {
mix_buf->accumulate((AudioBuffer*)src_port()->buffer(j), 0, copy_size-1);
}
-
+
// Find the summed value and write it to the remainder of dst buffer
if (copy_size < mix_buf->size()) {
float src_value = src_buffer->value_at(copy_size-1);
@@ -208,7 +208,7 @@ ConnectionImpl::process(ProcessContext& context)
// Scale the buffer down.
if (src_port()->poly() > 1)
mix_buf->scale(1.0f/(float)src_port()->poly(), 0, mix_buf->size()-1);
-
+
} else if (_mode == EXTEND) {
assert(type() == DataType::AUDIO || type() == DataType::CONTROL);
assert(src_port()->poly() == 1 || src_port()->poly() == dst_port()->poly());
@@ -216,7 +216,7 @@ ConnectionImpl::process(ProcessContext& context)
const uint32_t poly = dst_port()->poly();
const uint32_t copy_size = std::min(src_port()->buffer(0)->size(),
dst_port()->buffer(0)->size());
-
+
for (uint32_t i = 0; i < poly; ++i) {
uint32_t src_voice = std::min(i, src_port()->poly() - 1);
AudioBuffer* src_buf = (AudioBuffer*)src_port()->buffer(src_voice);
@@ -224,7 +224,7 @@ ConnectionImpl::process(ProcessContext& context)
// Copy src to start of dst
dst_buf->copy(src_buf, 0, copy_size-1);
-
+
// Write last value of src buffer to remainder of dst buffer, if necessary
if (copy_size < dst_buf->size())
dst_buf->set_block(src_buf->value_at(copy_size - 1), copy_size, dst_buf->size() - 1);
diff --git a/src/engine/ConnectionImpl.hpp b/src/engine/ConnectionImpl.hpp
index 48bc72df..e41d393e 100644
--- a/src/engine/ConnectionImpl.hpp
+++ b/src/engine/ConnectionImpl.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,17 +46,17 @@ class ConnectionImpl : public Raul::Deletable, public Shared::Connection
public:
ConnectionImpl(PortImpl* src_port, PortImpl* dst_port);
virtual ~ConnectionImpl();
-
+
PortImpl* src_port() const { return _src_port; }
PortImpl* dst_port() const { return _dst_port; }
-
+
const Raul::Path src_port_path() const { return _src_port->path(); }
const Raul::Path dst_port_path() const { return _dst_port->path(); }
/** Used by some (recursive) events to prevent double disconnections */
bool pending_disconnection() { return _pending_disconnection; }
void pending_disconnection(bool b) { _pending_disconnection = b; }
-
+
void process(ProcessContext& context);
/** Get the buffer for a particular voice.
@@ -67,7 +67,7 @@ public:
inline Buffer* buffer(uint32_t voice) const;
inline size_t buffer_size() const { return _buffer_size; }
-
+
void set_buffer_size(size_t size);
void prepare_poly(uint32_t poly);
void apply_poly(Raul::Maid& maid, uint32_t poly);
@@ -80,7 +80,7 @@ public:
protected:
enum { DIRECT, MIX, COPY, EXTEND } _mode;
void set_mode();
-
+
bool must_copy() const;
bool must_mix() const;
bool must_extend() const;
diff --git a/src/engine/Context.hpp b/src/engine/Context.hpp
index 2e000fb1..c747b751 100644
--- a/src/engine/Context.hpp
+++ b/src/engine/Context.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/Driver.hpp b/src/engine/Driver.hpp
index 5493fdb8..3e8b3289 100644
--- a/src/engine/Driver.hpp
+++ b/src/engine/Driver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -33,7 +33,7 @@ class DuplexPort;
/** Representation of a "system" (eg outside Ingen) port.
*
- * This is the class through which the rest of the engine manages everything
+ * This is the class through which the rest of the engine manages everything
* related to driver ports. Derived classes are expected to have a pointer to
* their driver (to be able to perform the operation necessary).
*
@@ -48,7 +48,7 @@ public:
virtual void create() = 0;
virtual void destroy() = 0;
-
+
bool is_input() const { return _patch_port->is_input(); }
DuplexPort* patch_port() const { return _patch_port; }
@@ -79,17 +79,17 @@ public:
virtual void activate() = 0;
virtual void deactivate() = 0;
-
+
virtual bool is_activated() const = 0;
-
+
/** Create a port ready to be inserted with add_input (non realtime).
*
* May return NULL if the Driver can not drive the port for some reason.
*/
virtual DriverPort* create_port(DuplexPort* patch_port) = 0;
-
+
virtual DriverPort* driver_port(const Raul::Path& path) = 0;
-
+
virtual void add_port(DriverPort* port) = 0;
virtual Raul::List<DriverPort*>::Node* remove_port(const Raul::Path& path) = 0;
diff --git a/src/engine/DuplexPort.cpp b/src/engine/DuplexPort.cpp
index 5912174b..e103b8c3 100644
--- a/src/engine/DuplexPort.cpp
+++ b/src/engine/DuplexPort.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -56,15 +56,15 @@ void
DuplexPort::pre_process(ProcessContext& context)
{
// <BrainHurt>
-
+
/*cerr << endl << "{ duplex pre" << endl;
cerr << path() << " duplex pre: fixed buffers: " << fixed_buffers() << endl;
cerr << path() << " duplex pre: buffer: " << buffer(0) << endl;
cerr << path() << " duplex pre: is_output: " << _is_output << " { " << endl;*/
-
+
for (Connections::iterator c = _connections.begin(); c != _connections.end(); ++c)
(*c)->process(context);
-
+
if (_is_output) {
for (uint32_t i=0; i < _poly; ++i)
@@ -80,14 +80,14 @@ DuplexPort::pre_process(ProcessContext& context)
broadcast(context);
}
-
- /*if (type() == DataType::EVENT)
+
+ /*if (type() == DataType::EVENT)
for (uint32_t i=0; i < _poly; ++i)
cerr << path() << " (" << buffer(i) << ") # events: "
<< ((EventBuffer*)buffer(i))->event_count()
<< ", joined: " << _buffers->at(i)->is_joined()
<< ", is_output: " << _is_output << endl;*/
-
+
//cerr << "} duplex pre " << path() << endl;
// </BrainHurt>
@@ -98,13 +98,13 @@ void
DuplexPort::post_process(ProcessContext& context)
{
// <BrainHurt>
-
+
/*cerr << endl << "{ duplex post" << endl;
cerr << path() << " duplex post: fixed buffers: " << fixed_buffers() << endl;
cerr << path() << " duplex post: buffer: " << buffer(0) << endl;
cerr << path() << " duplex post: is_output: " << _is_output << " { " << endl;
-
- if (type() == DataType::EVENT)
+
+ if (type() == DataType::EVENT)
for (uint32_t i=0; i < _poly; ++i)
cerr << path() << " (" << buffer(i) << ") # events: "
<< ((EventBuffer*)buffer(i))->event_count()
@@ -114,9 +114,9 @@ DuplexPort::post_process(ProcessContext& context)
InputPort::pre_process(context); // Mix down inputs
broadcast(context);
}
-
+
//cerr << "} duplex post " << path() << endl;
-
+
// </BrainHurt>
}
diff --git a/src/engine/DuplexPort.hpp b/src/engine/DuplexPort.hpp
index f76843a4..1bc2f560 100644
--- a/src/engine/DuplexPort.hpp
+++ b/src/engine/DuplexPort.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -24,7 +24,7 @@
#include "OutputPort.hpp"
namespace Ingen {
-
+
class NodeImpl;
@@ -52,7 +52,7 @@ public:
void pre_process(ProcessContext& context);
void post_process(ProcessContext& context);
-
+
bool is_input() const { return !_is_output; }
bool is_output() const { return _is_output; }
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp
index 9bbc74f3..15ba5ed7 100644
--- a/src/engine/Engine.cpp
+++ b/src/engine/Engine.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -27,7 +27,7 @@
#include "module/World.hpp"
#include "AudioDriver.hpp"
#include "ClientBroadcaster.hpp"
-#include "Engine.hpp"
+#include "Engine.hpp"
#include "EngineStore.hpp"
#include "Event.hpp"
#include "MessageContext.hpp"
@@ -88,10 +88,10 @@ Engine::~Engine()
//delete _lash_driver;
delete _maid;
-
+
munlockall();
}
-
+
SharedPtr<EngineStore>
Engine::engine_store() const
@@ -139,7 +139,7 @@ Engine::main()
main_iteration();
}
cout << "[Main] Done main loop." << endl;
-
+
deactivate();
return 0;
@@ -155,7 +155,7 @@ Engine::main_iteration()
{
_post_processor->process();
_maid->cleanup();
-
+
return !_quit_flag;
}
@@ -184,7 +184,7 @@ Engine::activate(size_t parallelism)
if (!_midi_driver)
_midi_driver = new DummyMidiDriver();
-
+
for (EventSources::iterator i = _event_sources.begin(); i != _event_sources.end(); ++i)
(*i)->activate_source();
@@ -206,13 +206,13 @@ Engine::activate(size_t parallelism)
_process_slaves.reserve(parallelism);
for (size_t i=0; i < parallelism - 1; ++i)
_process_slaves.push_back(new ProcessSlave(*this, _audio_driver->is_realtime()));
-
+
root_patch->enable();
-
+
//_post_processor->start();
_activated = true;
-
+
return true;
}
@@ -222,7 +222,7 @@ Engine::deactivate()
{
if (!_activated)
return;
-
+
for (EventSources::iterator i = _event_sources.begin(); i != _event_sources.end(); ++i)
(*i)->deactivate_source();
@@ -230,18 +230,18 @@ Engine::deactivate()
i != _engine_store->objects().end(); ++i)
if ((*i)->as_node() != NULL && (*i)->as_node()->parent() == NULL)
(*i)->as_node()->deactivate();*/
-
+
if (_midi_driver)
_midi_driver->deactivate();
_audio_driver->deactivate();
_audio_driver->root_patch()->deactivate();
-
+
/*for (size_t i=0; i < _process_slaves.size(); ++i) {
delete _process_slaves[i];
}*/
-
+
//_process_slaves.clear();
// Finalize any lingering events (unlikely)
@@ -249,10 +249,10 @@ Engine::deactivate()
//_audio_driver.reset();
//_event_sources.clear();
-
+
_activated = false;
}
-
+
void
Engine::process_events(ProcessContext& context)
diff --git a/src/engine/Engine.hpp b/src/engine/Engine.hpp
index 5d17d304..e465179f 100644
--- a/src/engine/Engine.hpp
+++ b/src/engine/Engine.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -63,12 +63,12 @@ class Engine : boost::noncopyable
{
public:
Engine(Ingen::Shared::World* world);
-
+
virtual ~Engine();
virtual int main();
virtual bool main_iteration();
-
+
/** Set the quit flag that should kill all threads and exit cleanly.
* Note that it will take some time. */
virtual void quit() { _quit_flag = true; }
@@ -105,7 +105,7 @@ public:
typedef std::vector<ProcessSlave*> ProcessSlaves;
inline const ProcessSlaves& process_slaves() const { return _process_slaves; }
inline ProcessSlaves& process_slaves() { return _process_slaves; }
-
+
private:
typedef std::set< SharedPtr<EventSource> > EventSources;
EventSources _event_sources;
@@ -120,7 +120,7 @@ private:
ClientBroadcaster* _broadcaster;
NodeFactory* _node_factory;
MessageContext* _message_context;
-
+
bool _quit_flag;
bool _activated;
};
diff --git a/src/engine/EngineStore.cpp b/src/engine/EngineStore.cpp
index 420c6b49..30181571 100644
--- a/src/engine/EngineStore.cpp
+++ b/src/engine/EngineStore.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -35,7 +35,7 @@ namespace Ingen {
/** Find the Patch at the given path.
*/
PatchImpl*
-EngineStore::find_patch(const Path& path)
+EngineStore::find_patch(const Path& path)
{
GraphObjectImpl* const object = find_object(path);
return dynamic_cast<PatchImpl*>(object);
@@ -45,7 +45,7 @@ EngineStore::find_patch(const Path& path)
/** Find the Node at the given path.
*/
NodeImpl*
-EngineStore::find_node(const Path& path)
+EngineStore::find_node(const Path& path)
{
GraphObjectImpl* const object = find_object(path);
return dynamic_cast<NodeImpl*>(object);
@@ -55,7 +55,7 @@ EngineStore::find_node(const Path& path)
/** Find the Port at the given path.
*/
PortImpl*
-EngineStore::find_port(const Path& path)
+EngineStore::find_port(const Path& path)
{
GraphObjectImpl* const object = find_object(path);
return dynamic_cast<PortImpl*>(object);
@@ -91,7 +91,7 @@ EngineStore::add(const Objects& table)
//cerr << "[EngineStore] Adding " << o[0].second->path() << endl;
cram(table);
-
+
/*cerr << "[EngineStore] Adding Table:" << endl;
for (const_iterator i = table.begin(); i != table.end(); ++i) {
cerr << i->first << " = " << i->second->path() << endl;
@@ -120,7 +120,7 @@ SharedPtr<EngineStore::Objects>
EngineStore::remove(iterator object)
{
assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS);
-
+
if (object != end()) {
iterator descendants_end = find_descendants_end(object);
//cout << "[EngineStore] Removing " << object->first << " {" << endl;
@@ -129,7 +129,7 @@ EngineStore::remove(iterator object)
cout << "\t" << i->first << endl;
}
cout << "}" << endl;*/
-
+
return removed;
} else {
@@ -138,7 +138,7 @@ EngineStore::remove(iterator object)
}
}
-
+
/** Remove all children of an object from the store.
*
* Returned is a vector containing all descendants of the object removed
diff --git a/src/engine/EngineStore.hpp b/src/engine/EngineStore.hpp
index a6782501..8b464319 100644
--- a/src/engine/EngineStore.hpp
+++ b/src/engine/EngineStore.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -48,10 +48,10 @@ public:
NodeImpl* find_node(const Raul::Path& path);
PortImpl* find_port(const Raul::Path& path);
GraphObjectImpl* find_object(const Raul::Path& path);
-
+
void add(Shared::GraphObject* o);
void add(const Objects& family);
-
+
SharedPtr<Objects> remove(const Raul::Path& path);
SharedPtr<Objects> remove(Objects::iterator i);
SharedPtr<Objects> remove_children(const Raul::Path& path);
diff --git a/src/engine/Event.cpp b/src/engine/Event.cpp
index 4455a846..d8fea5da 100644
--- a/src/engine/Event.cpp
+++ b/src/engine/Event.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -35,7 +35,7 @@ Event::execute(ProcessContext& context)
_executed = true;
}
-
+
void
Event::post_process()
diff --git a/src/engine/Event.hpp b/src/engine/Event.hpp
index ee2658b5..24f5d1fe 100644
--- a/src/engine/Event.hpp
+++ b/src/engine/Event.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -24,7 +24,7 @@
#include "raul/Path.hpp"
#include "types.hpp"
-namespace Ingen {
+namespace Ingen {
class Engine;
class Responder;
@@ -49,13 +49,13 @@ public:
/** Execute this event in the audio thread (MUST be realtime safe). */
virtual void execute(ProcessContext& context);
-
+
/** Perform any actions after execution (ie send replies to commands)
* (no realtime requirements). */
virtual void post_process();
-
+
inline SampleCount time() const { return _time; }
-
+
protected:
Event(Engine& engine, SharedPtr<Responder> responder, FrameTime time)
: _engine(engine)
@@ -63,7 +63,7 @@ protected:
, _time(time)
, _executed(false)
{}
-
+
Engine& _engine;
SharedPtr<Responder> _responder;
FrameTime _time;
diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp
index c96a7d8c..19217faa 100644
--- a/src/engine/EventBuffer.cpp
+++ b/src/engine/EventBuffer.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -66,7 +66,7 @@ EventBuffer::join(Buffer* buf)
return true;
}
-
+
void
EventBuffer::unjoin()
{
@@ -89,7 +89,7 @@ EventBuffer::prepare_write(FrameTime start, SampleCount nframes)
{
reset(nframes);
}
-
+
/** FIXME: parameters ignored */
void
EventBuffer::copy(const Buffer* src_buf, size_t start_sample, size_t end_sample)
@@ -98,7 +98,7 @@ EventBuffer::copy(const Buffer* src_buf, size_t start_sample, size_t end_sample)
assert(src);
assert(_buf->capacity() >= src->_buf->capacity());
assert(src->_buf != _buf);
-
+
//clear();
src->rewind();
@@ -131,14 +131,14 @@ EventBuffer::merge(const EventBuffer& a, const EventBuffer& b)
uint16_t a_type;
uint16_t a_size;
uint8_t* a_data;
-
+
uint32_t b_frames;
uint32_t b_subframes;
uint16_t b_type;
uint16_t b_size;
uint8_t* b_data;
#endif
-
+
cout << "FIXME: merge" << endl;
#if 0
a.get_event(&a_frames, &a_subframes, &a_type, &a_size, &a_data);
diff --git a/src/engine/EventBuffer.hpp b/src/engine/EventBuffer.hpp
index 9ff91cc7..3a674d9a 100644
--- a/src/engine/EventBuffer.hpp
+++ b/src/engine/EventBuffer.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,20 +30,20 @@ namespace Ingen {
class EventBuffer : public Buffer {
public:
EventBuffer(size_t capacity);
-
+
void prepare_read(FrameTime start, SampleCount nframes);
void prepare_write(FrameTime start, SampleCount nframes);
bool join(Buffer* buf);
void unjoin();
-
+
void* raw_data() { return _buf; }
const void* raw_data() const { return _buf; }
void copy(const Buffer* src, size_t start_sample, size_t end_sample);
-
+
bool merge(const EventBuffer& a, const EventBuffer& b);
-
+
bool increment() const { return _buf->increment(); }
bool is_valid() const { return _buf->is_valid(); }
@@ -53,14 +53,14 @@ public:
inline uint32_t event_count() const { return _buf->event_count(); }
inline void rewind() const { _buf->rewind(); }
-
+
inline void clear() { reset(_this_nframes); }
-
+
inline void reset(SampleCount nframes) {
_this_nframes = nframes;
_buf->reset();
}
-
+
inline bool get_event(uint32_t* frames,
uint32_t* subframes,
uint16_t* type,
diff --git a/src/engine/EventSink.cpp b/src/engine/EventSink.cpp
index 5e7305e4..2a4bc730 100644
--- a/src/engine/EventSink.cpp
+++ b/src/engine/EventSink.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -22,7 +22,7 @@
using namespace std;
namespace Ingen {
-
+
/** \a size is not size_t because an event will never be even remotely close
* to UINT32_MAX in size, so uint32_t saves wasted space on 64-bit.
@@ -35,7 +35,7 @@ EventSink::write(uint32_t size, const Event* ev)
_events.write(sizeof(uint32_t), (uint8_t*)&size);
_events.write(size, (uint8_t*)ev);
-
+
return true;
}
@@ -54,7 +54,7 @@ EventSink::read(uint32_t event_buffer_size, uint8_t* event_buffer)
assert(read_size <= event_buffer_size);
- if (read_size > 0)
+ if (read_size > 0)
return _events.full_read(read_size, event_buffer);
else
return false;
diff --git a/src/engine/EventSink.hpp b/src/engine/EventSink.hpp
index 95795969..649c6cdd 100644
--- a/src/engine/EventSink.hpp
+++ b/src/engine/EventSink.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/EventSource.hpp b/src/engine/EventSource.hpp
index 1e36c2da..b10462b1 100644
--- a/src/engine/EventSource.hpp
+++ b/src/engine/EventSource.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/GraphObjectImpl.cpp b/src/engine/GraphObjectImpl.cpp
index b5d04106..26aaf159 100644
--- a/src/engine/GraphObjectImpl.cpp
+++ b/src/engine/GraphObjectImpl.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -33,7 +33,7 @@ GraphObjectImpl::set_variable(const Raul::URI& key, const Atom& value)
_variables[key] = value;
}
-
+
const Atom&
GraphObjectImpl::get_variable(const Raul::URI& key)
{
@@ -48,7 +48,7 @@ GraphObjectImpl::parent_patch() const
{
return dynamic_cast<PatchImpl*>((NodeImpl*)_parent);
}
-
+
SharedPtr<GraphObject>
GraphObjectImpl::find_child(const string& name) const
diff --git a/src/engine/GraphObjectImpl.hpp b/src/engine/GraphObjectImpl.hpp
index d5156088..c6cc349a 100644
--- a/src/engine/GraphObjectImpl.hpp
+++ b/src/engine/GraphObjectImpl.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -48,17 +48,17 @@ class GraphObjectImpl : virtual public Ingen::Shared::GraphObject
{
public:
virtual ~GraphObjectImpl() {}
-
+
bool polyphonic() const { return _polyphonic; }
virtual bool set_polyphonic(Raul::Maid& maid, bool p) { _polyphonic = p; return true; }
-
+
GraphObject* graph_parent() const { return _parent; }
-
+
const Raul::URI uri() const { return path(); }
inline GraphObjectImpl* parent() const { return _parent; }
const Raul::Symbol symbol() const { return _name; }
-
+
virtual void process(ProcessContext& context) = 0;
/** Rename */
@@ -67,16 +67,16 @@ public:
_name = new_path.name();
assert(_name.find("/") == std::string::npos);
}
-
+
const Raul::Atom& get_variable(const Raul::URI& key);
void set_variable(const Raul::URI& key, const Raul::Atom& value);
-
+
const Properties& variables() const { return _variables; }
Properties& variables() { return _variables; }
/** The Patch this object is a child of. */
virtual PatchImpl* parent_patch() const;
-
+
/** Raul::Path is dynamically generated from parent to ease renaming */
const Raul::Path path() const {
if (_parent == NULL)
@@ -86,7 +86,7 @@ public:
else
return Raul::Path(_parent->path().child(_name));
}
-
+
SharedPtr<GraphObject> find_child(const std::string& name) const;
protected:
@@ -99,7 +99,7 @@ protected:
assert(parent == NULL || _name.length() > 0);
assert(_name.find("/") == std::string::npos);
}
-
+
GraphObjectImpl* _parent;
std::string _name;
bool _polyphonic;
diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp
index 2d02ab92..2c6801f7 100644
--- a/src/engine/HTTPClientSender.cpp
+++ b/src/engine/HTTPClientSender.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -85,7 +85,7 @@ void
HTTPClientSender::connect(const Raul::Path& src_path, const Raul::Path& dst_path)
{
string msg = string(
- "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
+ "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
"@prefix ingen: <http://drobilla.net/ns/ingen#> .\n"
"@prefix lv2var: <http://lv2plug.in/ns/ext/instance-var#> .\n\n<").append(
"<> ingen:connection [\n"
@@ -107,7 +107,7 @@ HTTPClientSender::set_variable(const Raul::URI& path, const Raul::URI& key, cons
{
Redland::Node node = AtomRDF::atom_to_node(*_engine.world()->rdf_world, value);
string msg = string(
- "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
+ "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
"@prefix ingenuity: <http://drobilla.net/ns/ingenuity#> .\n"
"@prefix lv2var: <http://lv2plug.in/ns/ext/instance-var#> .\n\n<").append(
path.str()).append("> lv2var:variable [\n"
@@ -122,7 +122,7 @@ HTTPClientSender::set_property(const Raul::URI& path, const Raul::URI& key, cons
{
Redland::Node node = AtomRDF::atom_to_node(*_engine.world()->rdf_world, value);
string msg = string(
- "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
+ "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
"@prefix ingen: <http://drobilla.net/ns/ingen#> .\n"
"@prefix ingenuity: <http://drobilla.net/ns/ingenuity#> .\n"
"@prefix lv2var: <http://lv2plug.in/ns/ext/instance-var#> .\n\n<").append(
@@ -205,7 +205,7 @@ void
HTTPClientSender::rename(const Raul::Path& old_path, const Raul::Path& new_path)
{
string msg = string(
- "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
+ "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
"@prefix ingen: <http://drobilla.net/ns/ingen#> .\n\n<").append(
old_path.str()).append("> rdf:subject <").append(new_path.str()).append("> .\n");
send_chunk(msg);
@@ -215,7 +215,7 @@ HTTPClientSender::rename(const Raul::Path& old_path, const Raul::Path& new_path)
void
HTTPClientSender::program_add(const Raul::Path& node_path, uint32_t bank, uint32_t program, const std::string& name)
{
- /*send("/ingen/program_add", "siis",
+ /*send("/ingen/program_add", "siis",
node_path.c_str(), bank, program, name.c_str(), LO_ARGS_END);*/
}
@@ -223,7 +223,7 @@ HTTPClientSender::program_add(const Raul::Path& node_path, uint32_t bank, uint32
void
HTTPClientSender::program_remove(const Raul::Path& node_path, uint32_t bank, uint32_t program)
{
- /*send("/ingen/program_remove", "sii",
+ /*send("/ingen/program_remove", "sii",
node_path.c_str(), bank, program, LO_ARGS_END);*/
}
diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp
index e04e70f7..db007f1c 100644
--- a/src/engine/HTTPClientSender.hpp
+++ b/src/engine/HTTPClientSender.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -53,14 +53,14 @@ public:
void enable() { _enabled = true; }
void disable() { _enabled = false; }
-
+
void bundle_begin() { HTTPSender::bundle_begin(); }
void bundle_end() { HTTPSender::bundle_end(); }
void transfer_begin() { HTTPSender::transfer_begin(); }
void transfer_end() { HTTPSender::transfer_end(); }
Raul::URI uri() const { return "http://example.org/"; }
-
+
void subscribe(Shared::EngineInterface* engine) { }
/* *** ClientInterface Implementation Below *** */
@@ -71,59 +71,59 @@ public:
void response_error(int32_t id, const std::string& msg);
void error(const std::string& msg);
-
+
virtual bool new_object(const Shared::GraphObject* object);
virtual void new_plugin(const Raul::URI& uri,
const Raul::URI& type_uri,
const Raul::Symbol& symbol);
-
+
virtual void new_patch(const Raul::Path& path,
uint32_t poly);
-
+
virtual void new_node(const Raul::Path& path,
const Raul::URI& plugin_uri);
-
+
virtual void new_port(const Raul::Path& path,
const Raul::URI& type,
uint32_t index,
bool is_output);
-
+
virtual void clear_patch(const Raul::Path& path);
-
+
virtual void destroy(const Raul::Path& path);
-
+
virtual void rename(const Raul::Path& old_path,
const Raul::Path& new_path);
-
+
virtual void connect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void disconnect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void set_variable(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_port_value(const Raul::Path& port_path,
const Raul::Atom& value);
-
+
virtual void set_voice_value(const Raul::Path& port_path,
uint32_t voice,
const Raul::Atom& value);
-
+
virtual void activity(const Raul::Path& path);
-
+
virtual void program_add(const Raul::Path& node_path,
uint32_t bank,
uint32_t program,
const std::string& program_name);
-
+
virtual void program_remove(const Raul::Path& node_path,
uint32_t bank,
uint32_t program);
diff --git a/src/engine/HTTPEngineReceiver.cpp b/src/engine/HTTPEngineReceiver.cpp
index 46e5e0af..de5d1bed 100644
--- a/src/engine/HTTPEngineReceiver.cpp
+++ b/src/engine/HTTPEngineReceiver.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -54,7 +54,7 @@ HTTPEngineReceiver::HTTPEngineReceiver(Engine& engine, uint16_t port)
cout << "Started HTTP server on port " << soup_server_get_port(_server) << endl;
Thread::set_name("HTTP Receiver");
-
+
if (!engine.world()->serialisation_module)
engine.world()->serialisation_module = Ingen::Shared::load_module("ingen_serialisation");
@@ -62,7 +62,7 @@ HTTPEngineReceiver::HTTPEngineReceiver(Engine& engine, uint16_t port)
if (!engine.world()->serialiser)
engine.world()->serialiser = SharedPtr<Serialiser>(
Ingen::Serialisation::new_serialiser(engine.world(), engine.engine_store()));
-
+
if (!engine.world()->parser)
engine.world()->parser = SharedPtr<Parser>(
Ingen::Serialisation::new_parser());
@@ -122,16 +122,16 @@ HTTPEngineReceiver::message_callback(SoupServer* server, SoupMessage* msg, const
if (path[path.length()-1] == '/') {
path = path.substr(0, path.length()-1);
}
-
+
SharedPtr<Serialiser> serialiser = me->_engine.world()->serialiser;
const string base_uri = "";
const char* mime_type = "text/plain";
-
+
if (!strcmp(msg->method, SOUP_METHOD_PUT)) {
cout << "PUT " << path << ":\n" << msg->request_body->data << endl;
}
-
+
if (path == Path::root_uri || path == "") {
const string r = string("@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n")
.append("\n<> rdfs:seeAlso <plugins> ;")
@@ -145,7 +145,7 @@ HTTPEngineReceiver::message_callback(SoupServer* server, SoupMessage* msg, const
// FIXME: kludge
me->load_plugins();
me->_receive_thread->whip();
-
+
serialiser->start_to_string("/", base_uri);
for (NodeFactory::Plugins::const_iterator p = me->_engine.node_factory()->plugins().begin();
p != me->_engine.node_factory()->plugins().end(); ++p)
@@ -156,7 +156,7 @@ HTTPEngineReceiver::message_callback(SoupServer* server, SoupMessage* msg, const
return;
} else if (path.substr(0, 6) == "/patch") {
path = '/' + path.substr(6);
-
+
} else if (path.substr(0, 7) == "/stream") {
HTTPClientSender* client = new HTTPClientSender(me->_engine);
me->register_client(client);
@@ -168,7 +168,7 @@ HTTPEngineReceiver::message_callback(SoupServer* server, SoupMessage* msg, const
soup_message_set_status(msg, SOUP_STATUS_OK);
soup_message_set_response(msg, mime_type, SOUP_MEMORY_COPY, buf, strlen(buf));
return;
-
+
} else {
soup_message_set_status(msg, SOUP_STATUS_NOT_FOUND);
soup_message_set_response(msg, "text/plain", SOUP_MEMORY_STATIC,
@@ -186,7 +186,7 @@ HTTPEngineReceiver::message_callback(SoupServer* server, SoupMessage* msg, const
if (msg->method == SOUP_METHOD_GET) {
Glib::RWLock::ReaderLock lock(store->lock());
-
+
// Find object
Store::const_iterator start = store->find(path);
if (start == store->end()) {
@@ -196,7 +196,7 @@ HTTPEngineReceiver::message_callback(SoupServer* server, SoupMessage* msg, const
err.c_str(), err.length());
return;
}
-
+
// Get serialiser
SharedPtr<Serialiser> serialiser = me->_engine.world()->serialiser;
if (!serialiser) {
@@ -217,24 +217,24 @@ HTTPEngineReceiver::message_callback(SoupServer* server, SoupMessage* msg, const
soup_message_set_status(msg, SOUP_STATUS_OK);
soup_message_set_response(msg, mime_type, SOUP_MEMORY_COPY,
response.c_str(), response.length());
-
+
} else if (msg->method == SOUP_METHOD_PUT) {
Glib::RWLock::WriterLock lock(store->lock());
-
+
// Be sure object doesn't exist
Store::const_iterator start = store->find(path);
if (start != store->end()) {
soup_message_set_status(msg, SOUP_STATUS_CONFLICT);
return;
}
-
+
// Get parser
SharedPtr<Parser> parser = me->_engine.world()->parser;
if (!parser) {
soup_message_set_status(msg, SOUP_STATUS_INTERNAL_SERVER_ERROR);
return;
}
-
+
//cout << "POST: " << msg->request_body->data << endl;
// Load object
diff --git a/src/engine/HTTPEngineReceiver.hpp b/src/engine/HTTPEngineReceiver.hpp
index 88f71aaf..ea6f3d5c 100644
--- a/src/engine/HTTPEngineReceiver.hpp
+++ b/src/engine/HTTPEngineReceiver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/InputPort.cpp b/src/engine/InputPort.cpp
index 9ff348a7..275fcd8b 100644
--- a/src/engine/InputPort.cpp
+++ b/src/engine/InputPort.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -43,7 +43,7 @@ InputPort::InputPort(NodeImpl* parent,
: PortImpl(parent, name, index, poly, type, value, buffer_size)
{
}
-
+
bool
InputPort::can_direct() const
@@ -60,10 +60,10 @@ InputPort::set_buffer_size(size_t size)
for (Connections::iterator c = _connections.begin(); c != _connections.end(); ++c)
((ConnectionImpl*)c->get())->set_buffer_size(size);
-
+
}
-
+
bool
InputPort::prepare_poly(uint32_t poly)
{
@@ -81,19 +81,19 @@ InputPort::apply_poly(Raul::Maid& maid, uint32_t poly)
{
if (!_polyphonic || !_parent->polyphonic())
return true;
-
+
for (Connections::iterator c = _connections.begin(); c != _connections.end(); ++c)
((ConnectionImpl*)c->get())->apply_poly(maid, poly);
PortImpl::apply_poly(maid, poly);
assert(this->poly() == poly);
-
+
if (can_direct()) {
ConnectionImpl* c = _connections.begin()->get();
for (uint32_t i=_poly; i < poly; ++i)
_buffers->at(i)->join(c->buffer(i));
}
-
+
for (uint32_t i=0; i < _poly; ++i)
PortImpl::parent_node()->set_port_buffer(i, _index, buffer(i));
@@ -112,7 +112,7 @@ InputPort::add_connection(Connections::Node* const c)
_connections.push_back(c);
bool modify_buffers = !_fixed_buffers;
-
+
if (modify_buffers) {
if (can_direct()) {
// Use buffer directly to avoid copying
@@ -141,7 +141,7 @@ InputPort::Connections::Node*
InputPort::remove_connection(const OutputPort* src_port)
{
bool modify_buffers = !_fixed_buffers;
-
+
bool found = false;
Connections::Node* connection = NULL;
for (Connections::iterator i = _connections.begin(); i != _connections.end(); ++i) {
@@ -167,12 +167,12 @@ InputPort::remove_connection(const OutputPort* src_port)
for (uint32_t i=0; i < _poly; ++i) {
_buffers->at(i)->join(_connections.front()->buffer(i));
}
- }
+ }
}
if (modify_buffers)
PortImpl::connect_buffers();
-
+
// Turn off broadcasting if we're not connected any more (FIXME: not quite right..)
if (_type == DataType::CONTROL && _connections.size() == 0)
_broadcast = false;
@@ -193,7 +193,7 @@ InputPort::pre_process(ProcessContext& context)
return;
bool do_mixdown = true;
-
+
if (_connections.size() == 0) {
for (uint32_t i=0; i < _poly; ++i)
buffer(i)->prepare_read(context.start(), context.nframes());
@@ -220,12 +220,12 @@ InputPort::pre_process(ProcessContext& context)
for (uint32_t i=0; i < _poly; ++i)
buffer(i)->prepare_read(context.start(), context.nframes());
-
+
/*cerr << path() << " poly = " << _poly << ", mixdown: " << do_mixdown
<< ", fixed buffers: " << _fixed_buffers << ", joined: " << _buffers->at(0)->is_joined()
<< " to " << _buffers->at(0)->joined_buffer() << endl;*/
-
- /*if (type() == DataType::EVENT)
+
+ /*if (type() == DataType::EVENT)
for (uint32_t i=0; i < _poly; ++i)
if (((EventBuffer*)buffer(i))->event_count() > 0)
cerr << path() << " (" << buffer(i) << ") # events: "
@@ -256,11 +256,11 @@ InputPort::pre_process(ProcessContext& context)
}
} else {
assert(_poly == 1);
-
+
// FIXME
if (_connections.size() > 1)
cerr << "WARNING: MIDI mixing not implemented, only first connection used." << endl;
-
+
// Copy first connection
_buffers->at(0)->copy(_connections.front()->buffer(0), 0, _buffer_size-1);
}
@@ -278,7 +278,7 @@ InputPort::post_process(ProcessContext& context)
buffer(i)->prepare_write(context.start(), context.nframes());
_set_by_user = false;
-
+
/*if (_broadcast && (_type == DataType::CONTROL)) {
const Sample value = ((AudioBuffer*)(*_buffers)[0])->value_at(0);
diff --git a/src/engine/InputPort.hpp b/src/engine/InputPort.hpp
index 65912881..8ef4c2bf 100644
--- a/src/engine/InputPort.hpp
+++ b/src/engine/InputPort.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -55,27 +55,27 @@ public:
size_t buffer_size);
virtual ~InputPort() {}
-
+
typedef Raul::List< SharedPtr<ConnectionImpl> > Connections;
-
+
void add_connection(Connections::Node* c);
Connections::Node* remove_connection(const OutputPort* src_port);
const Connections& connections() { return _connections; }
-
+
bool prepare_poly(uint32_t poly);
bool apply_poly(Raul::Maid& maid, uint32_t poly);
void pre_process(ProcessContext& context);
void post_process(ProcessContext& context);
-
+
bool is_connected() const { return (_connections.size() > 0); }
-
+
bool is_input() const { return true; }
bool is_output() const { return false; }
virtual void set_buffer_size(size_t size);
-
+
protected:
bool can_direct() const;
diff --git a/src/engine/InternalController.cpp b/src/engine/InternalController.cpp
index fad17225..d9c3b3b1 100644
--- a/src/engine/InternalController.cpp
+++ b/src/engine/InternalController.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,7 +36,7 @@ namespace Ingen {
using namespace Shared;
static InternalPlugin controller_plugin(NS_INTERNALS "Controller", "controller");
-
+
ControllerNode::ControllerNode(const string& path,
bool polyphonic,
PatchImpl* parent,
@@ -49,7 +49,7 @@ ControllerNode::ControllerNode(const string& path,
_midi_in_port = new InputPort(this, "input", 0, 1, DataType::EVENT, Raul::Atom(), _buffer_size);
_ports->at(0) = _midi_in_port;
-
+
_param_port = new InputPort(this, "controller", 1, 1, DataType::CONTROL, 0.0f, 1);
_param_port->set_property("lv2:minimum", 0.0f);
_param_port->set_property("lv2:maximum", 127.0f);
@@ -59,13 +59,13 @@ ControllerNode::ControllerNode(const string& path,
_log_port = new InputPort(this, "logarithmic", 2, 1, DataType::CONTROL, 0.0f, 1);
_log_port->set_property("lv2:toggled", true);
_ports->at(2) = _log_port;
-
+
_min_port = new InputPort(this, "minimum", 3, 1, DataType::CONTROL, 0.0f, 1);
_ports->at(3) = _min_port;
-
+
_max_port = new InputPort(this, "maximum", 4, 1, DataType::CONTROL, 1.0f, 1);
_ports->at(4) = _max_port;
-
+
_audio_port = new OutputPort(this, "ar_output", 5, 1, DataType::AUDIO, 0.0f, _buffer_size);
_ports->at(5) = _audio_port;
}
@@ -75,7 +75,7 @@ void
ControllerNode::process(ProcessContext& context)
{
NodeBase::pre_process(context);
-
+
uint32_t frames = 0;
uint32_t subframes = 0;
uint16_t type = 0;
@@ -84,17 +84,17 @@ ControllerNode::process(ProcessContext& context)
EventBuffer* const midi_in = (EventBuffer*)_midi_in_port->buffer(0);
//assert(midi_in->this_nframes() == context.nframes());
-
+
midi_in->rewind();
while (midi_in->get_event(&frames, &subframes, &type, &size, &buf)) {
// FIXME: type
if (size >= 3 && (buf[0] & 0xF0) == MIDI_CMD_CONTROL)
control(context, buf[1], buf[2], frames + context.start());
-
+
midi_in->increment();
}
-
+
NodeBase::post_process(context);
}
@@ -105,9 +105,9 @@ ControllerNode::control(ProcessContext& context, uint8_t control_num, uint8_t va
assert(time - context.start() < _buffer_size);
Sample scaled_value;
-
+
const Sample nval = (val / 127.0f); // normalized [0, 1]
-
+
if (_learning) {
_param_port->set_value(control_num);
((AudioBuffer*)_param_port->buffer(0))->set_value(
diff --git a/src/engine/InternalController.hpp b/src/engine/InternalController.hpp
index d33515b4..97d21451 100644
--- a/src/engine/InternalController.hpp
+++ b/src/engine/InternalController.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -22,7 +22,7 @@
#include "NodeBase.hpp"
namespace Ingen {
-
+
class InputPort;
class OutputPort;
@@ -31,16 +31,16 @@ class OutputPort;
*
* Creating one of these nodes is how a user makes "MIDI Bindings". Note that
* this node will always be monophonic, the poly parameter is ignored.
- *
+ *
* \ingroup engine
*/
class ControllerNode : public NodeBase
{
public:
ControllerNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
-
+
void process(ProcessContext& context);
-
+
void control(ProcessContext& context, uint8_t control_num, uint8_t val, FrameTime time);
void learn() { _learning = true; }
diff --git a/src/engine/InternalNote.cpp b/src/engine/InternalNote.cpp
index 3120ca96..de350a8a 100644
--- a/src/engine/InternalNote.cpp
+++ b/src/engine/InternalNote.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,22 +46,22 @@ NoteNode::NoteNode(const string& path, bool polyphonic, PatchImpl* parent, Sampl
, _sustain(false)
{
_ports = new Raul::Array<PortImpl*>(5);
-
+
_midi_in_port = new InputPort(this, "input", 0, 1, DataType::EVENT, Raul::Atom(), _buffer_size);
_ports->at(0) = _midi_in_port;
_freq_port = new OutputPort(this, "frequency", 1, _polyphony, DataType::AUDIO, 440.0f, _buffer_size);
_ports->at(1) = _freq_port;
-
+
_vel_port = new OutputPort(this, "velocity", 2, _polyphony, DataType::AUDIO, 0.0f, _buffer_size);
_vel_port->set_property("lv2:minimum", 0.0f);
_vel_port->set_property("lv2:maximum", 1.0f);
_ports->at(2) = _vel_port;
-
+
_gate_port = new OutputPort(this, "gate", 3, _polyphony, DataType::AUDIO, 0.0f, _buffer_size);
_gate_port->set_property("lv2:toggled", true);
_ports->at(3) = _gate_port;
-
+
_trig_port = new OutputPort(this, "trigger", 4, _polyphony, DataType::AUDIO, 0.0f, _buffer_size);
_trig_port->set_property("lv2:toggled", true);
_ports->at(4) = _trig_port;
@@ -118,7 +118,7 @@ NoteNode::process(ProcessContext& context)
{
EventBuffer* const midi_in = (EventBuffer*)_midi_in_port->buffer(0);
NodeBase::pre_process(context);
-
+
uint32_t frames = 0;
uint32_t subframes = 0;
uint16_t type = 0;
@@ -136,7 +136,7 @@ NoteNode::process(ProcessContext& context)
for (uint16_t i = 0; i < size; ++i)
cout << (int)((char)buf[i]) << " ";
cout << endl;*/
-
+
const FrameTime time = context.start() + (FrameTime)frames;
if (size >= 3) {
@@ -181,7 +181,7 @@ NoteNode::process(ProcessContext& context)
if (midi_in->increment() == midi_in->this_nframes())
break;
}
-
+
NodeBase::post_process(context);
}
@@ -196,7 +196,7 @@ NoteNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, F
Key* key = &_keys[note_num];
Voice* voice = NULL;
uint32_t voice_num = 0;
-
+
if (key->state != Key::OFF) {
//cerr << "[NoteNode] Double midi note received" << endl;
return;
@@ -223,13 +223,13 @@ NoteNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, F
oldest_time = voice->time;
}
}
- }
+ }
assert(voice != NULL);
assert(voice == &(*_voices)[voice_num]);
/*cerr << "[NoteNode] Note " << (int)note_num << " on @ " << time
<< ". Voice " << voice_num << " / " << _polyphony << endl;*/
-
+
// Update stolen key, if applicable
if (voice->state == Voice::Voice::ACTIVE) {
assert(_keys[voice->note].state == Key::ON_ASSIGNED);
@@ -237,7 +237,7 @@ NoteNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, F
_keys[voice->note].state = Key::Key::ON_UNASSIGNED;
//cerr << "[NoteNode] Stole voice " << voice_num << endl;
}
-
+
// Store key information for later reallocation on note off
key->state = Key::Key::ON_ASSIGNED;
key->voice = voice_num;
@@ -247,14 +247,14 @@ NoteNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, F
voice->state = Voice::Voice::ACTIVE;
voice->note = note_num;
voice->time = time;
-
+
assert(_keys[voice->note].state == Key::Key::ON_ASSIGNED);
assert(_keys[voice->note].voice == voice_num);
-
+
((AudioBuffer*)_freq_port->buffer(voice_num))->set_value(note_to_freq(note_num), context.start(), time);
((AudioBuffer*)_vel_port->buffer(voice_num))->set_value(velocity/127.0, context.start(), time);
((AudioBuffer*)_gate_port->buffer(voice_num))->set_value(1.0f, context.start(), time);
-
+
// trigger (one sample)
((AudioBuffer*)_trig_port->buffer(voice_num))->set_value(1.0f, context.start(), time);
((AudioBuffer*)_trig_port->buffer(voice_num))->set_value(0.0f, context.start(), time + 1);
@@ -273,7 +273,7 @@ NoteNode::note_off(ProcessContext& context, uint8_t note_num, FrameTime time)
assert(time - context.start() < _buffer_size);
Key* key = &_keys[note_num];
-
+
//cerr << "[NoteNode] Note " << (int)note_num << " off @ " << time << endl;
if (key->state == Key::ON_ASSIGNED) {
@@ -299,7 +299,7 @@ NoteNode::note_off(ProcessContext& context, uint8_t note_num, FrameTime time)
key->state = Key::OFF;
}
-
+
void
NoteNode::free_voice(ProcessContext& context, uint32_t voice, FrameTime time)
{
@@ -322,7 +322,7 @@ NoteNode::free_voice(ProcessContext& context, uint32_t voice, FrameTime time)
if (replace_key != NULL) { // Found a key to assign to freed voice
assert(&_keys[replace_key_num] == replace_key);
assert(replace_key->state == Key::ON_UNASSIGNED);
-
+
// Change the freq but leave the gate high and don't retrigger
((AudioBuffer*)_freq_port->buffer(voice))->set_value(note_to_freq(replace_key_num), context.start(), time);
@@ -349,7 +349,7 @@ NoteNode::all_notes_off(ProcessContext& context, FrameTime time)
//cerr << "All notes off @ " << offset << endl;
// FIXME: set all keys to Key::OFF?
-
+
for (uint32_t i = 0; i < _polyphony; ++i) {
((AudioBuffer*)_gate_port->buffer(i))->set_value(0.0f, context.start(), time);
(*_voices)[i].state = Voice::FREE;
@@ -381,7 +381,7 @@ NoteNode::sustain_off(ProcessContext& context, FrameTime time)
assert(time - context.start() < _buffer_size);
_sustain = false;
-
+
for (uint32_t i=0; i < _polyphony; ++i)
if ((*_voices)[i].state == Voice::HOLDING)
free_voice(context, i, time);
diff --git a/src/engine/InternalNote.hpp b/src/engine/InternalNote.hpp
index 9e441a65..3066bc1c 100644
--- a/src/engine/InternalNote.hpp
+++ b/src/engine/InternalNote.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -39,12 +39,12 @@ class NoteNode : public NodeBase
public:
NoteNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
~NoteNode();
-
+
bool prepare_poly(uint32_t poly);
bool apply_poly(Raul::Maid& maid, uint32_t poly);
void process(ProcessContext& context);
-
+
void note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, FrameTime time);
void note_off(ProcessContext& context, uint8_t note_num, FrameTime time);
void all_notes_off(ProcessContext& context, FrameTime time);
@@ -74,7 +74,7 @@ private:
Raul::Array<Voice>* _prepared_voices;
Key _keys[128];
bool _sustain; ///< Whether or not hold pedal is depressed
-
+
InputPort* _midi_in_port;
OutputPort* _freq_port;
OutputPort* _vel_port;
diff --git a/src/engine/InternalPlugin.cpp b/src/engine/InternalPlugin.cpp
index e78519e8..7b094ab7 100644
--- a/src/engine/InternalPlugin.cpp
+++ b/src/engine/InternalPlugin.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,7 +36,7 @@ InternalPlugin::instantiate(const string& name,
Engine& engine)
{
assert(_type == Internal);
-
+
SampleCount srate = engine.audio_driver()->sample_rate();
SampleCount buffer_size = engine.audio_driver()->buffer_size();
diff --git a/src/engine/InternalPlugin.hpp b/src/engine/InternalPlugin.hpp
index a58c827b..0689b176 100644
--- a/src/engine/InternalPlugin.hpp
+++ b/src/engine/InternalPlugin.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -50,12 +50,12 @@ public:
: PluginImpl(Plugin::Internal, uri)
, _symbol(symbol)
{}
-
+
NodeImpl* instantiate(const std::string& name,
bool polyphonic,
Ingen::PatchImpl* parent,
Engine& engine);
-
+
const std::string symbol() const { return _symbol; }
private:
diff --git a/src/engine/InternalTransport.cpp b/src/engine/InternalTransport.cpp
index 35eaa53a..5478682b 100644
--- a/src/engine/InternalTransport.cpp
+++ b/src/engine/InternalTransport.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -44,15 +44,15 @@ TransportNode::TransportNode(const string& path, bool polyphonic, PatchImpl* par
OutputPort<Sample>* bpb_port = new OutputPort<Sample>(this, "Beats per Bar", 1, 1,
// new PortInfo("Beats per Bar", CONTROL, OUTPUT, 0, 0, 1), 1);
_ports.at(1) = bpb_port;
-
+
OutputPort<Sample>* bar_port = new OutputPort<Sample>(this, "Bar", 3, 1,
// new PortInfo("Bar", CONTROL, OUTPUT, 0, 0, 1), buffer_size);
_ports.at(2) = bar_port;
-
+
OutputPort<Sample>* beat_port = new OutputPort<Sample>(this, "Beat", 3, 1,
// new PortInfo("Beat", CONTROL, OUTPUT, 0, 0, 1), buffer_size);
_ports.at(3) = beat_port;
-
+
OutputPort<Sample>* frame_port = new OutputPort<Sample>(this, "Frame", 3, 1,
// new PortInfo("Frame", CONTROL, OUTPUT, 0, 0, 1), buffer_size);
_ports.at(4) = frame_port;
@@ -60,7 +60,7 @@ TransportNode::TransportNode(const string& path, bool polyphonic, PatchImpl* par
OutputPort<Sample>* hour_port = new OutputPort<Sample>(this, "Hour", 3, 1,
// new PortInfo("Hour", CONTROL, OUTPUT, 0, 0, 1), buffer_size);
_ports.at(5) = hour_port;
-
+
OutputPort<Sample>* minute_port = new OutputPort<Sample>(this, "Minute", 3, 1,
// new PortInfo("Minute", CONTROL, OUTPUT, 0, 0, 1), buffer_size);
_ports.at(6) = minute_port;
@@ -68,7 +68,7 @@ TransportNode::TransportNode(const string& path, bool polyphonic, PatchImpl* par
OutputPort<Sample>* second_port = new OutputPort<Sample>(this, "Second", 3, 1,
// new PortInfo("Second", CONTROL, OUTPUT, 0, 0, 1), buffer_size);
_ports.at(7) = second_port;
-
+
OutputPort<Sample>* trg_port = new OutputPort<Sample>(this, "Beat Tick", 2, 1,
// new PortInfo("Beat Tick", AUDIO, OUTPUT, 0, 0, 1), buffer_size);
_ports.at(8) = trg_port;
@@ -92,10 +92,10 @@ TransportNode::process(ProcessContext& context)
double bpm = position->beats_per_minute;
float bpb = position->beats_per_bar;
float spb = 60.0 / bpm;
-
+
//cerr << "bpm = " << bpm << endl;
- //cerr << "spb = " << spb << endl;
-
+ //cerr << "spb = " << spb << endl;
+
if (position->valid & JackPositionBBT) {
cerr << "bar: " << position->bar << endl;
cerr << "beat: " << position->beat << endl;
@@ -121,14 +121,14 @@ TransportNode::process(ProcessContext& context)
cerr << "No timecode." << endl;
}
-
+
((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>*)_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)) {
double frames_per_beat = position->frame_rate * spb;
@@ -147,7 +147,7 @@ TransportNode::process(ProcessContext& context)
}
}
#endif
-
+
NodeBase::post_process(context);
}
diff --git a/src/engine/InternalTransport.hpp b/src/engine/InternalTransport.hpp
index af0ed207..19706253 100644
--- a/src/engine/InternalTransport.hpp
+++ b/src/engine/InternalTransport.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/InternalTrigger.cpp b/src/engine/InternalTrigger.cpp
index c6bf6d62..bd1f41f2 100644
--- a/src/engine/InternalTrigger.cpp
+++ b/src/engine/InternalTrigger.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -42,13 +42,13 @@ TriggerNode::TriggerNode(const string& path, bool polyphonic, PatchImpl* parent,
_midi_in_port = new InputPort(this, "input", 0, 1, DataType::EVENT, Raul::Atom(), _buffer_size);
_ports->at(0) = _midi_in_port;
-
+
_note_port = new InputPort(this, "note", 1, 1, DataType::CONTROL, 60.0f, 1);
_note_port->set_property("lv2:minimum", 0.0f);
_note_port->set_property("lv2:maximum", 127.0f);
_note_port->set_property("lv2:integer", true);
_ports->at(1) = _note_port;
-
+
_gate_port = new OutputPort(this, "gate", 2, 1, DataType::AUDIO, 0.0f, _buffer_size);
_gate_port->set_property("lv2:toggled", true);
_ports->at(2) = _gate_port;
@@ -56,7 +56,7 @@ TriggerNode::TriggerNode(const string& path, bool polyphonic, PatchImpl* parent,
_trig_port = new OutputPort(this, "trigger", 3, 1, DataType::AUDIO, 0.0f, _buffer_size);
_trig_port->set_property("lv2:toggled", true);
_ports->at(3) = _trig_port;
-
+
_vel_port = new OutputPort(this, "velocity", 4, 1, DataType::AUDIO, 0.0f, _buffer_size);
_vel_port->set_property("lv2:minimum", 0.0f);
_vel_port->set_property("lv2:maximum", 1.0f);
@@ -68,7 +68,7 @@ void
TriggerNode::process(ProcessContext& context)
{
NodeBase::pre_process(context);
-
+
uint32_t frames = 0;
uint32_t subframes = 0;
uint16_t type = 0;
@@ -77,7 +77,7 @@ TriggerNode::process(ProcessContext& context)
EventBuffer* const midi_in = (EventBuffer*)_midi_in_port->buffer(0);
//assert(midi_in->this_nframes() == context.nframes());
-
+
midi_in->rewind();
while (midi_in->get_event(&frames, &subframes, &type, &size, &buf)) {
@@ -102,10 +102,10 @@ TriggerNode::process(ProcessContext& context)
break;
}
}
-
+
midi_in->increment();
}
-
+
NodeBase::post_process(context);
}
@@ -115,7 +115,7 @@ TriggerNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity
{
assert(time >= context.start() && time <= context.end());
assert(time - context.start() < _buffer_size);
-
+
if (_learning) {
_note_port->set_value(note_num);
((AudioBuffer*)_note_port->buffer(0))->set_value(
diff --git a/src/engine/InternalTrigger.hpp b/src/engine/InternalTrigger.hpp
index 8f287d0f..46712c03 100644
--- a/src/engine/InternalTrigger.hpp
+++ b/src/engine/InternalTrigger.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -43,10 +43,10 @@ public:
TriggerNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
void process(ProcessContext& context);
-
+
void note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, FrameTime time);
void note_off(ProcessContext& context, uint8_t note_num, FrameTime time);
-
+
void learn() { _learning = true; }
private:
diff --git a/src/engine/JackAudioDriver.cpp b/src/engine/JackAudioDriver.cpp
index 127dd1a9..9f3f55e2 100644
--- a/src/engine/JackAudioDriver.cpp
+++ b/src/engine/JackAudioDriver.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -42,7 +42,7 @@ using namespace Raul;
namespace Ingen {
-
+
//// JackAudioPort ////
JackAudioPort::JackAudioPort(JackAudioDriver* driver, DuplexPort* patch_port)
@@ -58,7 +58,7 @@ JackAudioPort::JackAudioPort(JackAudioDriver* driver, DuplexPort* patch_port)
patch_port->buffer(0)->clear();
patch_port->fixed_buffers(true);
-}
+}
JackAudioPort::~JackAudioPort()
@@ -108,7 +108,7 @@ JackAudioPort::prepare_buffer(jack_nframes_t nframes)
assert(patch_buf->data() == jack_buf);
}
-
+
//// JackAudioDriver ////
JackAudioDriver::JackAudioDriver(Engine& engine)
@@ -130,7 +130,7 @@ JackAudioDriver::JackAudioDriver(Engine& engine)
JackAudioDriver::~JackAudioDriver()
{
deactivate();
-
+
if (_local_client)
jack_client_close(_client);
}
@@ -151,12 +151,12 @@ JackAudioDriver::attach(const std::string& server_name,
cerr << "[JackAudioDriver] Connected to JACK server '" <<
server_name << "'" << endl;
}
-
+
// Either server name not specified, or supplied server name does not exist
// Connect to default server
if (!_client) {
_client = jack_client_open(client_name.c_str(), JackNullOption, NULL);
-
+
if (_client)
cerr << "[JackAudioDriver] Connected to default JACK server." << endl;
}
@@ -174,13 +174,13 @@ JackAudioDriver::attach(const std::string& server_name,
_buffer_size = jack_get_buffer_size(_client);
_sample_rate = jack_get_sample_rate(_client);
-
+
jack_on_shutdown(_client, shutdown_cb, this);
jack_set_thread_init_callback(_client, thread_init_cb, this);
jack_set_sample_rate_callback(_client, sample_rate_cb, this);
jack_set_buffer_size_callback(_client, buffer_size_cb, this);
-
+
for (Raul::List<JackAudioPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
(*i)->create();
@@ -190,7 +190,7 @@ JackAudioDriver::attach(const std::string& server_name,
void
JackAudioDriver::activate()
-{
+{
if (_is_activated) {
cerr << "[JackAudioDriver] Jack driver already activated." << endl;
return;
@@ -242,7 +242,7 @@ JackAudioDriver::deactivate()
*
* Realtime safe, this is to be called at the beginning of a process cycle to
* insert (and actually begin using) a new port.
- *
+ *
* See create_port() and remove_port().
*/
void
@@ -270,7 +270,7 @@ JackAudioDriver::remove_port(const Path& path)
for (Raul::List<JackAudioPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
if ((*i)->patch_port()->path() == path)
return (Raul::List<DriverPort*>::Node*)(_ports.erase(i));
-
+
cerr << "[JackAudioDriver::remove_port] WARNING: Unable to find port " << path << endl;
return NULL;
}
@@ -323,7 +323,7 @@ JackAudioDriver::driver_port(const Path& path)
* \callgraph
*/
int
-JackAudioDriver::_process_cb(jack_nframes_t nframes)
+JackAudioDriver::_process_cb(jack_nframes_t nframes)
{
if (nframes == 0 || ! _is_activated) {
if (_flag == 1)
@@ -332,7 +332,7 @@ JackAudioDriver::_process_cb(jack_nframes_t nframes)
}
// FIXME: all of this time stuff is screwy
-
+
// FIXME: support nframes != buffer_size, even though that never damn well happens
assert(nframes == _buffer_size);
@@ -355,11 +355,11 @@ JackAudioDriver::_process_cb(jack_nframes_t nframes)
i != _engine.process_slaves().end(); ++i) {
(*i)->context().set_time_slice(nframes, start_of_current_cycle, end_of_current_cycle);
}
-
+
// Process events that came in during the last cycle
// (Aiming for jitter-free 1 block event latency, ideally)
_engine.process_events(_process_context);
-
+
// Set buffers of patch ports to Jack port buffers (zero-copy processing)
for (Raul::List<JackAudioPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i) {
assert(*i);
@@ -368,11 +368,11 @@ JackAudioDriver::_process_cb(jack_nframes_t nframes)
if (_engine.midi_driver())
_engine.midi_driver()->pre_process(_process_context);
-
+
// Run root patch
if (_root_patch)
_root_patch->process(_process_context);
-
+
if (_engine.midi_driver())
_engine.midi_driver()->post_process(_process_context);
@@ -382,8 +382,8 @@ JackAudioDriver::_process_cb(jack_nframes_t nframes)
}
-void
-JackAudioDriver::_thread_init_cb()
+void
+JackAudioDriver::_thread_init_cb()
{
// Initialize thread specific data
_jack_thread = Thread::create_for_this_thread("Jack");
@@ -392,8 +392,8 @@ JackAudioDriver::_thread_init_cb()
assert(ThreadManager::current_thread_id() == THREAD_PROCESS);
}
-void
-JackAudioDriver::_shutdown_cb()
+void
+JackAudioDriver::_shutdown_cb()
{
cout << "[JackAudioDriver] Jack shutdown. Exiting." << endl;
_engine.quit();
@@ -402,7 +402,7 @@ JackAudioDriver::_shutdown_cb()
int
-JackAudioDriver::_sample_rate_cb(jack_nframes_t nframes)
+JackAudioDriver::_sample_rate_cb(jack_nframes_t nframes)
{
if (_is_activated) {
cerr << "[JackAudioDriver] On-the-fly sample rate changing not supported (yet). Aborting." << endl;
@@ -415,7 +415,7 @@ JackAudioDriver::_sample_rate_cb(jack_nframes_t nframes)
int
-JackAudioDriver::_buffer_size_cb(jack_nframes_t nframes)
+JackAudioDriver::_buffer_size_cb(jack_nframes_t nframes)
{
if (_root_patch) {
_root_patch->set_buffer_size(nframes);
diff --git a/src/engine/JackAudioDriver.hpp b/src/engine/JackAudioDriver.hpp
index aa952197..50648fd3 100644
--- a/src/engine/JackAudioDriver.hpp
+++ b/src/engine/JackAudioDriver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -49,12 +49,12 @@ class JackAudioPort : public DriverPort, public Raul::List<JackAudioPort*>::Node
public:
JackAudioPort(JackAudioDriver* driver, DuplexPort* patch_port);
~JackAudioPort();
-
+
void create();
void destroy();
-
+
void set_name(const std::string& name) { jack_port_set_name(_jack_port, name.c_str()); };
-
+
void prepare_buffer(jack_nframes_t nframes);
jack_port_t* jack_port() const { return _jack_port; }
@@ -77,7 +77,7 @@ private:
*/
class JackAudioDriver : public AudioDriver
{
-public:
+public:
JackAudioDriver(Engine& engine);
~JackAudioDriver();
@@ -92,29 +92,29 @@ public:
DriverPort* port(const Raul::Path& path);
DriverPort* create_port(DuplexPort* patch_port);
-
+
void add_port(DriverPort* port);
DriverPort* driver_port(const Raul::Path& path);
-
+
Raul::List<DriverPort*>::Node* remove_port(const Raul::Path& path);
-
+
PatchImpl* root_patch() { return _root_patch; }
void set_root_patch(PatchImpl* patch) { _root_patch = patch; }
-
+
ProcessContext& context() { return _process_context; }
-
+
/** Transport state for this frame.
* Intended to only be called from the audio thread. */
inline const jack_position_t* position() { return &_position; }
inline jack_transport_state_t transport_state() { return _transport_state; }
-
+
bool is_realtime() const { return jack_is_realtime(_client); }
-
+
jack_client_t* jack_client() const { return _client; }
SampleCount buffer_size() const { return _buffer_size; }
SampleCount sample_rate() const { return _sample_rate; }
bool is_activated() const { return _is_activated; }
-
+
inline SampleCount frame_time() const { return _client ? jack_frame_time(_client) : 0; }
class PortRegistrationFailedException : public std::exception {};
@@ -148,7 +148,7 @@ private:
bool _local_client; ///< Whether _client should be closed on destruction
jack_position_t _position;
jack_transport_state_t _transport_state;
-
+
Raul::List<JackAudioPort*> _ports;
ProcessContext _process_context;
@@ -187,7 +187,7 @@ inline int JackAudioDriver::sample_rate_cb(jack_nframes_t nframes, void* jack_dr
assert(jack_driver);
return ((JackAudioDriver*)jack_driver)->_sample_rate_cb(nframes);
}
-
+
} // namespace Ingen
diff --git a/src/engine/JackMidiDriver.cpp b/src/engine/JackMidiDriver.cpp
index c0b55a6b..5f01a6f4 100644
--- a/src/engine/JackMidiDriver.cpp
+++ b/src/engine/JackMidiDriver.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -38,7 +38,7 @@ using namespace Raul;
namespace Ingen {
-
+
//// JackMidiPort ////
JackMidiPort::JackMidiPort(JackMidiDriver* driver, DuplexPort* patch_port)
@@ -68,7 +68,7 @@ JackMidiPort::create()
_patch_port->path().c_str(), JACK_DEFAULT_MIDI_TYPE,
(_patch_port->is_input()) ? JackPortIsInput : JackPortIsOutput,
0);
-
+
if (_jack_port == NULL) {
cerr << "[JackMidiPort] ERROR: Failed to register port " << _patch_port->path() << endl;
throw JackAudioDriver::PortRegistrationFailedException();
@@ -96,7 +96,7 @@ JackMidiPort::pre_process(ProcessContext& context)
{
if ( ! is_input() )
return;
-
+
assert(_patch_port->poly() == 1);
EventBuffer* patch_buf = dynamic_cast<EventBuffer*>(_patch_port->buffer(0));
@@ -106,7 +106,7 @@ JackMidiPort::pre_process(ProcessContext& context)
const jack_nframes_t event_count = jack_midi_get_event_count(jack_buffer);
patch_buf->prepare_write(context.start(), context.nframes());
-
+
// Copy events from Jack port buffer into patch port buffer
for (jack_nframes_t i=0; i < event_count; ++i) {
jack_midi_event_t ev;
@@ -135,13 +135,13 @@ JackMidiPort::post_process(ProcessContext& context)
EventBuffer* patch_buf = dynamic_cast<EventBuffer*>(_patch_port->buffer(0));
void* jack_buf = jack_port_get_buffer(_jack_port, context.nframes());
-
+
assert(_patch_port->poly() == 1);
assert(patch_buf);
patch_buf->prepare_read(context.start(), context.nframes());
jack_midi_clear_buffer(jack_buf);
-
+
uint32_t frames = 0;
uint32_t subframes = 0;
uint16_t type = 0;
@@ -198,7 +198,7 @@ JackMidiDriver::attach(AudioDriver& driver)
/** Launch and start the MIDI thread.
*/
void
-JackMidiDriver::activate()
+JackMidiDriver::activate()
{
_is_activated = true;
}
@@ -207,7 +207,7 @@ JackMidiDriver::activate()
/** Terminate the MIDI thread.
*/
void
-JackMidiDriver::deactivate()
+JackMidiDriver::deactivate()
{
for (Raul::List<JackMidiPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
(*i)->destroy();
@@ -241,7 +241,7 @@ JackMidiDriver::post_process(ProcessContext& context)
*
* Realtime safe, this is to be called at the beginning of a process cycle to
* insert (and actually begin using) a new port.
- *
+ *
* See new_port() and remove_port().
*/
void
@@ -269,12 +269,12 @@ JackMidiDriver::remove_port(const Path& path)
for (Raul::List<JackMidiPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
if ((*i)->patch_port()->path() == path)
return (Raul::List<DriverPort*>::Node*)_ports.erase(i);
-
+
cerr << "[JackMidiDriver::remove_port] WARNING: Unable to find port " << path << endl;
return NULL;
}
-
+
DriverPort*
JackMidiDriver::driver_port(const Path& path)
{
diff --git a/src/engine/JackMidiDriver.hpp b/src/engine/JackMidiDriver.hpp
index d0e81396..9d20c215 100644
--- a/src/engine/JackMidiDriver.hpp
+++ b/src/engine/JackMidiDriver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,7 +46,7 @@ public:
void pre_process(ProcessContext& context);
void post_process(ProcessContext& context);
-
+
void set_name(const std::string& name) { jack_port_set_name(_jack_port, name.c_str()); };
private:
@@ -74,19 +74,19 @@ public:
void deactivate();
void enable() { _is_enabled = true; }
void disable() { _is_enabled = false; }
-
+
bool is_activated() const { return _is_activated; }
bool is_enabled() const { return _is_enabled; }
-
+
void pre_process(ProcessContext& context);
void post_process(ProcessContext& context);
JackMidiPort* create_port(DuplexPort* patch_port)
{ return new JackMidiPort(this, patch_port); }
-
+
void add_port(DriverPort* port);
DriverPort* driver_port(const Raul::Path& path);
-
+
Raul::List<DriverPort*>::Node* remove_port(const Raul::Path& path);
jack_client_t* jack_client() { return _client; }
@@ -96,12 +96,12 @@ private:
uint32_t _midi_event_type;
Raul::List<JackMidiPort*> _ports;
-
+
friend class JackMidiPort;
-
+
void add_output(Raul::List<JackMidiPort*>::Node* port);
Raul::List<JackMidiPort*>::Node* remove_output(JackMidiPort* port);
-
+
// MIDI thread
static void* process_midi_in(void* me);
diff --git a/src/engine/LADSPANode.cpp b/src/engine/LADSPANode.cpp
index f8fc9e8d..5a3f0619 100644
--- a/src/engine/LADSPANode.cpp
+++ b/src/engine/LADSPANode.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -70,7 +70,7 @@ LADSPANode::prepare_poly(uint32_t poly)
|| (_prepared_instances && poly <= _prepared_instances->size()) ) {
return true;
}
-
+
_prepared_instances = new Raul::Array<LADSPA_Handle>(poly, *_instances);
for (uint32_t i = _polyphony; i < _prepared_instances->size(); ++i) {
_prepared_instances->at(i) = _descriptor->instantiate(_descriptor, _srate);
@@ -78,7 +78,7 @@ LADSPANode::prepare_poly(uint32_t poly)
cerr << "Failed to instantiate plugin!" << endl;
return false;
}
-
+
// Initialize the values of new ports
for (unsigned long j=0; j < num_ports(); ++j) {
PortImpl* const port = _ports->at(j);
@@ -95,7 +95,7 @@ LADSPANode::prepare_poly(uint32_t poly)
if (_activated && _descriptor->activate)
_descriptor->activate(_prepared_instances->at(i));
}
-
+
return true;
}
@@ -112,14 +112,14 @@ LADSPANode::apply_poly(Raul::Maid& maid, uint32_t poly)
_instances = _prepared_instances;
_prepared_instances = NULL;
}
-
+
assert(poly <= _instances->size());
_polyphony = poly;
-
+
return NodeBase::apply_poly(maid, poly);
}
-
+
static string
nameify_if_invalid(const string& name)
{
@@ -137,7 +137,7 @@ nameify_if_invalid(const string& name)
*
* Implemented as a seperate function (rather than in the constructor) to
* allow graceful error-catching of broken plugins.
- *
+ *
* Returns whether or not plugin was successfully instantiated. If return
* value is false, this object may not be used.
*/
@@ -146,11 +146,11 @@ LADSPANode::instantiate()
{
if (!_ports)
_ports = new Raul::Array<PortImpl*>(_descriptor->PortCount);
-
+
_instances = new Raul::Array<LADSPA_Handle>(_polyphony, NULL);
-
+
size_t port_buffer_size = 0;
-
+
for (uint32_t i=0; i < _polyphony; ++i) {
(*_instances)[i] = _descriptor->instantiate(_descriptor, _srate);
if ((*_instances)[i] == NULL) {
@@ -158,7 +158,7 @@ LADSPANode::instantiate()
return false;
}
}
-
+
PortImpl* port = NULL;
std::map<std::string, uint32_t> names;
@@ -189,7 +189,7 @@ LADSPANode::instantiate()
port_name = name;
names.insert(make_pair(port_name, j));
-
+
Path port_path(path().child(port_name));
DataType type = DataType::AUDIO;
@@ -203,10 +203,10 @@ LADSPANode::instantiate()
}
assert (LADSPA_IS_PORT_INPUT(_descriptor->PortDescriptors[j])
|| LADSPA_IS_PORT_OUTPUT(_descriptor->PortDescriptors[j]));
-
+
boost::optional<Sample> default_val, min, max;
get_port_limits(j, default_val, min, max);
-
+
const float value = default_val ? default_val.get() : 0.0f;
if (LADSPA_IS_PORT_INPUT(_descriptor->PortDescriptors[j])) {
@@ -226,13 +226,13 @@ LADSPANode::instantiate()
<< ": Port default < minimum. Minimum adjusted." << endl;
min = default_val;
}
-
+
if (default_val && default_val.get() > max.get()) {
cerr << "WARNING: Broken LADSPA " << _descriptor->UniqueID
<< ": Maximum adjusted." << endl;
max = default_val;
}
-
+
// Set initial/default value
if (port->buffer_size() == 1) {
for (uint32_t i=0; i < _polyphony; ++i)
@@ -280,7 +280,7 @@ void
LADSPANode::deactivate()
{
NodeBase::deactivate();
-
+
for (uint32_t i=0; i < _polyphony; ++i)
if (_descriptor->deactivate != NULL)
_descriptor->deactivate((*_instances)[i]);
@@ -291,10 +291,10 @@ void
LADSPANode::process(ProcessContext& context)
{
NodeBase::pre_process(context);
-
- for (uint32_t i=0; i < _polyphony; ++i)
+
+ for (uint32_t i=0; i < _polyphony; ++i)
_descriptor->run((*_instances)[i], context.nframes());
-
+
NodeBase::post_process(context);
}
@@ -303,7 +303,7 @@ void
LADSPANode::set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf)
{
assert(voice < _polyphony);
-
+
AudioBuffer* audio_buffer = dynamic_cast<AudioBuffer*>(buf);
assert(audio_buffer);
diff --git a/src/engine/LADSPANode.hpp b/src/engine/LADSPANode.hpp
index 1ca84208..fe671390 100644
--- a/src/engine/LADSPANode.hpp
+++ b/src/engine/LADSPANode.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,15 +46,15 @@ public:
~LADSPANode();
bool instantiate();
-
+
bool prepare_poly(uint32_t poly);
bool apply_poly(Raul::Maid& maid, uint32_t poly);
void activate();
void deactivate();
-
+
void process(ProcessContext& context);
-
+
void set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf);
protected:
@@ -62,7 +62,7 @@ protected:
boost::optional<Sample>& default_value,
boost::optional<Sample>& lower_bound,
boost::optional<Sample>& upper_bound);
-
+
const LADSPA_Descriptor* _descriptor;
Raul::Array<LADSPA_Handle>* _instances;
Raul::Array<LADSPA_Handle>* _prepared_instances;
diff --git a/src/engine/LADSPAPlugin.cpp b/src/engine/LADSPAPlugin.cpp
index bc1f02fd..de9a81fb 100644
--- a/src/engine/LADSPAPlugin.cpp
+++ b/src/engine/LADSPAPlugin.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -45,23 +45,23 @@ LADSPAPlugin::instantiate(const string& name,
Engine& engine)
{
assert(_id != 0);
-
+
SampleCount srate = engine.audio_driver()->sample_rate();
SampleCount buffer_size = engine.audio_driver()->buffer_size();
-
+
union {
void* dp;
LADSPA_Descriptor_Function fp;
} df;
df.dp = NULL;
df.fp = NULL;
-
+
LADSPANode* n = NULL;
load(); // FIXME: unload at some point
assert(_module);
assert(*_module);
-
+
if (!_module->get_symbol("ladspa_descriptor", df.dp)) {
cerr << "Looks like this isn't a LADSPA plugin." << endl;
return NULL;
@@ -74,7 +74,7 @@ LADSPAPlugin::instantiate(const string& name,
break;
}
}
-
+
if (descriptor != NULL) {
n = new LADSPANode(this, name, polyphonic, parent, descriptor, srate, buffer_size);
diff --git a/src/engine/LADSPAPlugin.hpp b/src/engine/LADSPAPlugin.hpp
index 1b4897a0..aea5aa12 100644
--- a/src/engine/LADSPAPlugin.hpp
+++ b/src/engine/LADSPAPlugin.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -48,12 +48,12 @@ public:
, _label(label)
, _name(Raul::Atom::STRING, name)
{}
-
+
NodeImpl* instantiate(const std::string& name,
bool polyphonic,
Ingen::PatchImpl* parent,
Engine& engine);
-
+
const std::string& label() const { return _label; }
unsigned long id() const { return _id; }
const std::string symbol() const { return Raul::Path::nameify(_label); }
@@ -62,9 +62,9 @@ public:
const std::string library_name() const {
return _library_path.substr(_library_path.find_last_of("/")+1);
}
-
+
const Raul::Atom& get_property(const Raul::URI& uri) const;
-
+
private:
const unsigned long _id;
const std::string _label;
diff --git a/src/engine/LV2EventBuffer.cpp b/src/engine/LV2EventBuffer.cpp
index bec92c0e..5e462c2a 100644
--- a/src/engine/LV2EventBuffer.cpp
+++ b/src/engine/LV2EventBuffer.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -95,14 +95,14 @@ LV2EventBuffer::is_valid() const
/** Read an event from the current position in the buffer
- *
+ *
* \return true if read was successful, or false if end of buffer reached
*/
bool
LV2EventBuffer::get_event(uint32_t* frames,
- uint32_t* subframes,
- uint16_t* type,
- uint16_t* size,
+ uint32_t* subframes,
+ uint16_t* type,
+ uint16_t* size,
uint8_t** data) const
{
if (lv2_event_is_valid(&_iter)) {
@@ -183,7 +183,7 @@ LV2EventBuffer::append(const LV2_Event_Buffer* buf)
_latest_frames = ev->frames;
_latest_subframes = ev->subframes;
}
-
+
return ret;
}
diff --git a/src/engine/LV2EventBuffer.hpp b/src/engine/LV2EventBuffer.hpp
index 30edc96c..2d559889 100644
--- a/src/engine/LV2EventBuffer.hpp
+++ b/src/engine/LV2EventBuffer.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -31,9 +31,9 @@ public:
inline LV2_Event_Buffer* data() { return _data; }
inline const LV2_Event_Buffer* data() const { return _data; }
-
+
inline void rewind() const { lv2_event_begin(&_iter, _data); }
-
+
inline void reset() {
_latest_frames = 0;
_latest_subframes = 0;
@@ -41,7 +41,7 @@ public:
_data->size = 0;
rewind();
}
-
+
inline size_t event_count() const { return _data->event_count; }
inline uint32_t capacity() const { return _data->capacity; }
inline uint32_t size() const { return _data->size; }
diff --git a/src/engine/LV2Info.cpp b/src/engine/LV2Info.cpp
index fbef2f78..aa27d393 100644
--- a/src/engine/LV2Info.cpp
+++ b/src/engine/LV2Info.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -25,7 +25,7 @@
using namespace std;
namespace Ingen {
-
+
LV2Info::LV2Info(Ingen::Shared::World* world)
: input_class(slv2_value_new_uri(world->slv2_world, SLV2_PORT_CLASS_INPUT))
, output_class(slv2_value_new_uri(world->slv2_world, SLV2_PORT_CLASS_OUTPUT))
@@ -58,7 +58,7 @@ LV2Info::~LV2Info()
}
-uint32_t
+uint32_t
LV2Info::event_ref(LV2_Event_Callback_Data callback_data,
LV2_Event* event)
{
diff --git a/src/engine/LV2Info.hpp b/src/engine/LV2Info.hpp
index 96620ffd..a63664e4 100644
--- a/src/engine/LV2Info.hpp
+++ b/src/engine/LV2Info.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -31,9 +31,9 @@
#include "shared/LV2URIMap.hpp"
#include "lv2ext/lv2_uri_map.h"
#include "lv2ext/lv2_event.h"
-
+
namespace Ingen {
-
+
/** Stuff that may need to be passed to an LV2 plugin (i.e. LV2 features).
*/
@@ -47,7 +47,7 @@ public:
SLV2Value control_class;
SLV2Value audio_class;
SLV2Value event_class;
-
+
Ingen::Shared::World& world() { return *_world; }
SLV2World lv2_world() { return _world->slv2_world; }
diff --git a/src/engine/LV2Node.cpp b/src/engine/LV2Node.cpp
index e8029642..9c4bd065 100644
--- a/src/engine/LV2Node.cpp
+++ b/src/engine/LV2Node.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -71,7 +71,7 @@ bool
LV2Node::prepare_poly(uint32_t poly)
{
NodeBase::prepare_poly(poly);
-
+
if ( (!_polyphonic)
|| (_prepared_instances && poly <= _prepared_instances->size()) ) {
return true;
@@ -105,7 +105,7 @@ LV2Node::prepare_poly(uint32_t poly)
if (_activated)
slv2_instance_activate(_prepared_instances->at(i));
}
-
+
return true;
}
@@ -125,7 +125,7 @@ LV2Node::apply_poly(Raul::Maid& maid, uint32_t poly)
assert(poly <= _instances->size());
_polyphony = poly;
-
+
return NodeBase::apply_poly(maid, poly);
}
@@ -134,7 +134,7 @@ LV2Node::apply_poly(Raul::Maid& maid, uint32_t poly)
*
* Implemented as a seperate function (rather than in the constructor) to
* allow graceful error-catching of broken plugins.
- *
+ *
* Returns whether or not plugin was successfully instantiated. If return
* value is false, this object may not be used.
*/
@@ -149,43 +149,43 @@ LV2Node::instantiate()
_ports = new Raul::Array<PortImpl*>(num_ports, NULL);
_instances = new Raul::Array<SLV2Instance>(_polyphony, NULL);
-
+
uint32_t port_buffer_size = 0;
SLV2Value ctx_ext_uri = slv2_value_new_uri(info->lv2_world(), LV2_CONTEXT_MESSAGE);
-
+
for (uint32_t i=0; i < _polyphony; ++i) {
(*_instances)[i] = slv2_plugin_instantiate(plug, _srate, info->lv2_features());
if ((*_instances)[i] == NULL) {
cerr << "Failed to instantiate plugin!" << endl;
return false;
}
-
+
if (!slv2_plugin_has_feature(plug, ctx_ext_uri))
continue;
const void* ctx_ext = slv2_instance_get_extension_data(
(*_instances)[i], LV2_CONTEXT_MESSAGE);
-
+
if (i == 0 && ctx_ext) {
cerr << "HAS CONTEXT EXTENSION" << endl;
assert(!_message_funcs);
_message_funcs = (LV2MessageContext*)ctx_ext;
}
}
-
+
slv2_value_free(ctx_ext_uri);
-
+
string port_name;
Path port_path;
-
+
PortImpl* port = NULL;
-
+
float* def_values = new float[num_ports];
slv2_plugin_get_port_ranges_float(plug, 0, 0, def_values);
-
+
SLV2Value pred = slv2_value_new_uri(info->lv2_world(),
"http://lv2plug.in/ns/dev/contexts#context");
-
+
for (uint32_t j=0; j < num_ports; ++j) {
SLV2Port id = slv2_plugin_get_port_by_index(plug, j);
@@ -194,7 +194,7 @@ LV2Node::instantiate()
assert(port_name.find("/") == string::npos);
port_path = path().child(port_name);
-
+
DataType data_type = DataType::UNKNOWN;
if (slv2_port_is_a(plug, id, info->control_class)) {
data_type = DataType::CONTROL;
@@ -221,7 +221,7 @@ LV2Node::instantiate()
_instances = NULL;
return false;
}
-
+
// FIXME: need nice type preserving SLV2Value -> Raul::Atom conversion
const float def = isnan(def_values[j]) ? 0.0f : def_values[j];
const Raul::Atom defatm = def;
@@ -233,7 +233,7 @@ LV2Node::instantiate()
if (direction == INPUT && data_type == DataType::CONTROL)
((AudioBuffer*)port->buffer(0))->set_value(def, 0, 0);
-
+
SLV2Values contexts = slv2_port_get_value(plug, id, pred);
for (uint32_t i = 0; i < slv2_values_size(contexts); ++i) {
SLV2Value c = slv2_values_get_at(contexts, i);
@@ -254,9 +254,9 @@ LV2Node::instantiate()
_ports->at(j) = port;
}
-
+
delete[] def_values;
-
+
return true;
}
@@ -287,7 +287,7 @@ void
LV2Node::deactivate()
{
NodeBase::deactivate();
-
+
for (uint32_t i=0; i < _polyphony; ++i)
slv2_instance_deactivate((*_instances)[i]);
}
@@ -309,9 +309,9 @@ LV2Node::process(ProcessContext& context)
{
NodeBase::pre_process(context);
- for (uint32_t i=0; i < _polyphony; ++i)
+ for (uint32_t i=0; i < _polyphony; ++i)
slv2_instance_run((*_instances)[i], context.nframes());
-
+
NodeBase::post_process(context);
}
@@ -320,7 +320,7 @@ void
LV2Node::set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf)
{
assert(voice < _polyphony);
-
+
slv2_instance_connect_port((*_instances)[voice], port_num, buf->raw_data());
if ((*_ports).at(port_num)->context() == Context::MESSAGE) {
assert(_message_funcs);
diff --git a/src/engine/LV2Node.hpp b/src/engine/LV2Node.hpp
index 595ed8e9..454f653f 100644
--- a/src/engine/LV2Node.hpp
+++ b/src/engine/LV2Node.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -20,7 +20,7 @@
#include <string>
#include "slv2/slv2.h"
-#include "lv2_contexts.h"
+#include "lv2_contexts.h"
#include "types.hpp"
#include "NodeBase.hpp"
@@ -42,21 +42,21 @@ public:
PatchImpl* parent,
SampleRate srate,
size_t buffer_size);
-
+
~LV2Node();
bool instantiate();
-
+
bool prepare_poly(uint32_t poly);
bool apply_poly(Raul::Maid& maid, uint32_t poly);
void activate();
void deactivate();
-
+
void message_process(MessageContext& context, uint32_t* ins, uint32_t* outs);
-
+
void process(ProcessContext& context);
-
+
void set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf);
protected:
diff --git a/src/engine/LV2Plugin.cpp b/src/engine/LV2Plugin.cpp
index fa5eb415..7cc7b19f 100644
--- a/src/engine/LV2Plugin.cpp
+++ b/src/engine/LV2Plugin.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -29,7 +29,7 @@ using namespace Raul;
namespace Ingen {
-
+
const string
LV2Plugin::symbol() const
{
@@ -46,7 +46,7 @@ LV2Plugin::symbol() const
else
working = working.substr(0, last_slash);
}
-
+
return "lv2_symbol";
}
@@ -59,9 +59,9 @@ LV2Plugin::instantiate(const string& name,
{
SampleCount srate = engine.audio_driver()->sample_rate();
SampleCount buffer_size = engine.audio_driver()->buffer_size();
-
+
load(); // FIXME: unload at some point
-
+
Glib::Mutex::Lock lock(engine.world()->rdf_world->mutex());
LV2Node* n = new LV2Node(this, name, polyphonic, parent, srate, buffer_size);
@@ -69,10 +69,10 @@ LV2Plugin::instantiate(const string& name,
delete n;
n = NULL;
}
-
+
return n;
}
-
+
void
LV2Plugin::slv2_plugin(SLV2Plugin p)
diff --git a/src/engine/LV2Plugin.hpp b/src/engine/LV2Plugin.hpp
index a05853a8..8a515d2e 100644
--- a/src/engine/LV2Plugin.hpp
+++ b/src/engine/LV2Plugin.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -51,16 +51,16 @@ public:
, _slv2_plugin(NULL)
, _lv2_info(lv2_info)
{}
-
+
NodeImpl* instantiate(const std::string& name,
bool polyphonic,
Ingen::PatchImpl* parent,
Engine& engine);
-
+
const std::string symbol() const;
SharedPtr<LV2Info> lv2_info() const { return _lv2_info; }
-
+
const std::string& library_path() const;
SLV2Plugin slv2_plugin() const { return _slv2_plugin; }
diff --git a/src/engine/MessageContext.cpp b/src/engine/MessageContext.cpp
index 778804b3..1f6be6bd 100644
--- a/src/engine/MessageContext.cpp
+++ b/src/engine/MessageContext.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/MessageContext.hpp b/src/engine/MessageContext.hpp
index 31531521..8a01304a 100644
--- a/src/engine/MessageContext.hpp
+++ b/src/engine/MessageContext.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007-2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/MidiDriver.hpp b/src/engine/MidiDriver.hpp
index 31ef686d..ee10d06c 100644
--- a/src/engine/MidiDriver.hpp
+++ b/src/engine/MidiDriver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -45,7 +45,7 @@ public:
* Realtime safe, run in audio thread before executing the graph for a cycle.
*/
virtual void pre_process(ProcessContext& context) = 0;
-
+
/** Prepare output for the specified (just completed) cycle.
*
* Realtime safe, run in audio thread after executing the graph for a cycle.
@@ -70,28 +70,28 @@ public:
DummyMidiDriver() {
std::cout << "[DummyMidiDriver] Started Dummy MIDI driver." << std::endl;
}
-
+
~DummyMidiDriver() {}
void activate() {}
void deactivate() {}
-
+
bool is_activated() const { return false; }
bool is_enabled() const { return false; }
-
+
void enable() {}
void disable() {}
-
+
DriverPort* create_port(DuplexPort* patch_port) { return NULL; }
-
+
DriverPort* driver_port(const Raul::Path& path) { return NULL; }
-
+
DriverPort* new_port(DuplexPort* patch_port) { return NULL; }
-
+
void add_port(DriverPort* port) {}
-
+
Raul::List<DriverPort*>::Node* remove_port(const Raul::Path& path) { return NULL; }
-
+
void pre_process(ProcessContext& context) {}
void post_process(ProcessContext& context) {}
};
diff --git a/src/engine/NodeBase.cpp b/src/engine/NodeBase.cpp
index 2fd93162..34dbcca5 100644
--- a/src/engine/NodeBase.cpp
+++ b/src/engine/NodeBase.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -64,7 +64,7 @@ NodeBase::~NodeBase()
delete _dependants;
}
-
+
Shared::Port*
NodeBase::port(uint32_t index) const
{
@@ -126,11 +126,11 @@ NodeBase::apply_poly(Raul::Maid& maid, uint32_t poly)
_ports->at(i)->apply_poly(maid, poly);
assert(_ports->at(i)->poly() == poly);
}
-
+
for (uint32_t i=0; i < num_ports(); ++i)
for (uint32_t j=0; j < _polyphony; ++j)
set_port_buffer(j, i, _ports->at(i)->prepared_buffer(j));
-
+
return true;
}
@@ -141,12 +141,12 @@ NodeBase::set_buffer_size(size_t size)
assert(ThreadManager::current_thread_id() == THREAD_PROCESS);
_buffer_size = size;
-
+
if (_ports)
for (size_t i=0; i < _ports->size(); ++i)
_ports->at(i)->set_buffer_size(size);
}
-
+
void
NodeBase::reset_input_ready()
diff --git a/src/engine/NodeBase.hpp b/src/engine/NodeBase.hpp
index 7c0293f9..d1fbe147 100644
--- a/src/engine/NodeBase.hpp
+++ b/src/engine/NodeBase.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -58,10 +58,10 @@ public:
virtual void activate();
virtual void deactivate();
bool activated() { return _activated; }
-
+
virtual bool prepare_poly(uint32_t poly);
virtual bool apply_poly(Raul::Maid& maid, uint32_t poly);
-
+
virtual void reset_input_ready();
virtual bool process_lock();
virtual void process_unlock();
@@ -69,54 +69,54 @@ public:
virtual unsigned n_inputs_ready() const { return _n_inputs_ready.get(); }
virtual void learn() {}
-
+
virtual void message_process(MessageContext& context, uint32_t* ins, uint32_t* outs) {}
virtual void pre_process(ProcessContext& context);
virtual void process(ProcessContext& context) = 0;
virtual void post_process(ProcessContext& context);
-
+
virtual void set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf) {}
-
+
virtual void set_buffer_size(size_t size);
-
+
SampleRate sample_rate() const { return _srate; }
size_t buffer_size() const { return _buffer_size; }
uint32_t num_ports() const { return _ports ? _ports->size() : 0; }
uint32_t polyphony() const { return _polyphony; }
bool traversed() const { return _traversed; }
void traversed(bool b) { _traversed = b; }
-
+
virtual Shared::Port* port(uint32_t index) const;
virtual PortImpl* port_impl(uint32_t index) const { return (*_ports)[index]; }
-
+
/* These are NOT to be used in the audio thread!
* The providers and dependants in CompiledNode are for that
*/
Raul::List<NodeImpl*>* providers() { return _providers; }
void providers(Raul::List<NodeImpl*>* l) { _providers = l; }
-
+
Raul::List<NodeImpl*>* dependants() { return _dependants; }
void dependants(Raul::List<NodeImpl*>* l) { _dependants = l; }
-
+
virtual const Shared::Plugin* plugin() const;
virtual PluginImpl* plugin_impl() const { return _plugin; }
virtual void plugin(PluginImpl* pi) { _plugin = pi; }
-
+
/** A node's parent is always a patch, so static cast should be safe */
inline PatchImpl* parent_patch() const { return (PatchImpl*)_parent; }
-
+
protected:
virtual void signal_input_ready();
-
+
PluginImpl* _plugin;
uint32_t _polyphony;
SampleRate _srate;
size_t _buffer_size;
bool _activated;
-
+
bool _traversed; ///< Flag for process order algorithm
Raul::Semaphore _input_ready; ///< Parallelism: input ready signal
Raul::AtomicInt _process_lock; ///< Parallelism: Waiting on inputs 'lock'
diff --git a/src/engine/NodeFactory.cpp b/src/engine/NodeFactory.cpp
index fa9ec94e..67380606 100644
--- a/src/engine/NodeFactory.cpp
+++ b/src/engine/NodeFactory.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -104,7 +104,7 @@ void
NodeFactory::load_plugins()
{
assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS);
-
+
_world->rdf_world->mutex().lock();
// Only load if we havn't already, so every client connecting doesn't cause
@@ -114,7 +114,7 @@ NodeFactory::load_plugins()
_plugins.clear(); // FIXME: assert empty?
load_internal_plugins();
-
+
#ifdef HAVE_SLV2
load_lv2_plugins();
#endif
@@ -122,12 +122,12 @@ NodeFactory::load_plugins()
#ifdef HAVE_LADSPA_H
load_ladspa_plugins();
#endif
-
+
_has_loaded = true;
}
-
+
_world->rdf_world->mutex().unlock();
-
+
//cerr << "[NodeFactory] # Plugins: " << _plugins.size() << endl;
}
@@ -136,7 +136,7 @@ void
NodeFactory::load_internal_plugins()
{
// This is a touch gross...
-
+
PatchImpl* parent = new PatchImpl(*_world->local_engine, "dummy", 1, NULL, 1, 1, 1);
NodeImpl* n = NULL;
@@ -152,7 +152,7 @@ NodeFactory::load_internal_plugins()
n = new TransportNode("foo", 1, parent, 1, 1);
_plugins.insert(make_pair(n->plugin_impl()->uri(), n->plugin_impl()));
delete n;
-
+
delete parent;
}
@@ -176,7 +176,7 @@ NodeFactory::load_lv2_plugins()
#ifndef NDEBUG
assert(_plugins.find(uri) == _plugins.end());
#endif
-
+
LV2Plugin* const plugin = new LV2Plugin(_lv2_info, uri);
plugin->slv2_plugin(lv2_plug);
@@ -211,7 +211,7 @@ NodeFactory::load_ladspa_plugins()
ladspa_path = ladspa_path.substr(ladspa_path.find(':')+1);
else
ladspa_path = "";
-
+
DIR* pdir = opendir(dir.c_str());
if (pdir == NULL) {
//cerr << "[NodeFactory] Unreadable directory in LADSPA_PATH: " << dir.c_str() << endl;
@@ -228,22 +228,22 @@ NodeFactory::load_ladspa_plugins()
df.fp = NULL;
LADSPA_Descriptor* descriptor = NULL;
-
+
if (!strcmp(pfile->d_name, ".") || !strcmp(pfile->d_name, ".."))
continue;
-
+
const string lib_path = dir +"/"+ pfile->d_name;
-
+
// Ignore stupid libtool files. Kludge alert.
if (lib_path.substr(lib_path.length()-3) == ".la") {
//cerr << "WARNING: Skipping stupid libtool file " << pfile->d_name << endl;
continue;
}
-
+
Glib::Module* plugin_library = new Glib::Module(lib_path, Glib::MODULE_BIND_LOCAL);
if (!plugin_library || !(*plugin_library))
continue;
-
+
bool found = plugin_library->get_symbol("ladspa_descriptor", df.dp);
if (!found || !df.dp) {
cerr << "WARNING: Non-LADSPA library found in LADSPA path: " <<
@@ -257,9 +257,9 @@ NodeFactory::load_ladspa_plugins()
char id_str[11];
snprintf(id_str, 11, "%lu", descriptor->UniqueID);
const string uri = string("ladspa:").append(id_str);
-
+
const Plugins::const_iterator i = _plugins.find(uri);
-
+
if (i == _plugins.end()) {
LADSPAPlugin* plugin = new LADSPAPlugin(lib_path, uri,
descriptor->UniqueID,
diff --git a/src/engine/NodeFactory.hpp b/src/engine/NodeFactory.hpp
index 05fdf37a..b7c8a042 100644
--- a/src/engine/NodeFactory.hpp
+++ b/src/engine/NodeFactory.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -39,7 +39,7 @@ class LV2Info;
/** Loads plugins and creates Nodes from them.
*
- * NodeFactory's responsibility is to get enough information to allow the
+ * NodeFactory's responsibility is to get enough information to allow the
* loading of a plugin possible (ie finding/opening shared libraries etc)
*
* The constructor of various Node types (ie LADSPANode) are responsible
@@ -54,10 +54,10 @@ public:
~NodeFactory();
void load_plugins();
-
+
typedef std::map<Raul::URI, PluginImpl*> Plugins;
const Plugins& plugins() const { return _plugins; }
-
+
PluginImpl* plugin(const Raul::URI& uri);
/** DEPRECATED */
@@ -75,7 +75,7 @@ private:
#endif
void load_internal_plugins();
-
+
Plugins _plugins;
Ingen::Shared::World* _world;
bool _has_loaded;
diff --git a/src/engine/NodeImpl.hpp b/src/engine/NodeImpl.hpp
index 2a751f6b..ebc42655 100644
--- a/src/engine/NodeImpl.hpp
+++ b/src/engine/NodeImpl.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,10 +36,10 @@ class MessageContext;
/** A Node (or "module") in a Patch (which is also a Node).
- *
+ *
* A Node is a unit with input/output ports, a process() method, and some other
* things.
- *
+ *
* This is a pure abstract base class for any Node, it contains no
* implementation details/data whatsoever. This is the interface you need to
* implement to add a new Node type.
@@ -69,7 +69,7 @@ public:
* \return true on success.
*/
virtual bool prepare_poly(uint32_t poly) = 0;
-
+
/** Apply a new (external) polyphony value.
*
* Audio thread.
@@ -82,13 +82,13 @@ public:
/** Parallelism: Reset flags for start of a new cycle.
*/
virtual void reset_input_ready() = 0;
-
+
/** Parallelism: Claim this node (to wait on its input).
* Only one thread will ever take this lock on a particular Node.
* \return true if lock was aquired, false otherwise
*/
virtual bool process_lock() = 0;
-
+
/** Parallelism: Unclaim this node (let someone else wait on its input).
* Only a thread which successfully called process_lock may call this.
*/
@@ -98,7 +98,7 @@ public:
* Only a thread which successfully called process_lock may call this.
*/
virtual void wait_for_input(size_t num_providers) = 0;
-
+
/** Parallelism: Signal that input is ready. Realtime safe.
* Calling this will wake up the thread which blocked on wait_for_input
* if there is one, and otherwise cause it to return true the next call.
@@ -109,7 +109,7 @@ public:
/** Parallelism: Return the number of providers that have signalled.
*/
virtual unsigned n_inputs_ready() const = 0;
-
+
/** Run the node for one instant in the message thread.
*/
virtual void message_process(MessageContext& context, uint32_t* ins, uint32_t* outs) = 0;
@@ -127,23 +127,23 @@ public:
virtual Shared::Port* port(uint32_t index) const = 0;
virtual PortImpl* port_impl(uint32_t index) const = 0;
-
+
/** Used by the process order finding algorithm (ie during connections) */
virtual bool traversed() const = 0;
virtual void traversed(bool b) = 0;
-
+
/** Nodes that are connected to this Node's inputs.
* (This Node depends on them)
*/
virtual Raul::List<NodeImpl*>* providers() = 0;
virtual void providers(Raul::List<NodeImpl*>* l) = 0;
-
+
/** Nodes are are connected to this Node's outputs.
* (They depend on this Node)
*/
virtual Raul::List<NodeImpl*>* dependants() = 0;
virtual void dependants(Raul::List<NodeImpl*>* l) = 0;
-
+
/** The Patch this Node belongs to. */
virtual PatchImpl* parent_patch() const = 0;
@@ -151,7 +151,7 @@ public:
* Not the best name - not all nodes come from plugins (ie Patch)
*/
virtual PluginImpl* plugin_impl() const = 0;
-
+
/** Information about the Plugin this Node is an instance of.
* Not the best name - not all nodes come from plugins (ie Patch)
*/
diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp
index 9809c0dd..7473e4cd 100644
--- a/src/engine/OSCClientSender.cpp
+++ b/src/engine/OSCClientSender.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -80,7 +80,7 @@ OSCClientSender::response_ok(int32_t id)
<< lo_address_errstr(_address) << ")" << endl;
}
}
-
+
/** \page client_osc_namespace
* <p> \b /ingen/response - Respond to a user command
@@ -318,7 +318,7 @@ OSCClientSender::new_object(const Shared::GraphObject* object)
new_patch(patch->path(), patch->internal_polyphony());
return true;
}
-
+
const Node* node = dynamic_cast<const Node*>(object);
if (node) {
new_node(node->path(), node->plugin()->uri());
@@ -365,7 +365,7 @@ OSCClientSender::rename(const Path& old_path, const Path& new_path)
void
OSCClientSender::program_add(const Path& node_path, uint32_t bank, uint32_t program, const std::string& name)
{
- send("/ingen/program_add", "siis",
+ send("/ingen/program_add", "siis",
node_path.c_str(), bank, program, name.c_str(), LO_ARGS_END);
}
@@ -373,7 +373,7 @@ OSCClientSender::program_add(const Path& node_path, uint32_t bank, uint32_t prog
void
OSCClientSender::program_remove(const Path& node_path, uint32_t bank, uint32_t program)
{
- send("/ingen/program_remove", "sii",
+ send("/ingen/program_remove", "sii",
node_path.c_str(), bank, program, LO_ARGS_END);
}
diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp
index 3b677e6d..69c6d48c 100644
--- a/src/engine/OSCClientSender.hpp
+++ b/src/engine/OSCClientSender.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -47,19 +47,19 @@ public:
virtual ~OSCClientSender()
{ lo_address_free(_address); }
-
+
bool enabled() const { return _enabled; }
void enable() { _enabled = true; }
void disable() { _enabled = false; }
-
+
void bundle_begin() { OSCSender::bundle_begin(); }
void bundle_end() { OSCSender::bundle_end(); }
void transfer_begin() { OSCSender::transfer_begin(); }
void transfer_end() { OSCSender::transfer_end(); }
-
+
Raul::URI uri() const { return lo_address_get_url(_address); }
-
+
void subscribe(Shared::EngineInterface* engine) { }
/* *** ClientInterface Implementation Below *** */
@@ -70,59 +70,59 @@ public:
void response_error(int32_t id, const std::string& msg);
void error(const std::string& msg);
-
+
virtual bool new_object(const Shared::GraphObject* object);
virtual void new_plugin(const Raul::URI& uri,
const Raul::URI& type_uri,
const Raul::Symbol& symbol);
-
+
virtual void new_patch(const Raul::Path& path,
uint32_t poly);
-
+
virtual void new_node(const Raul::Path& path,
const Raul::URI& plugin_uri);
-
+
virtual void new_port(const Raul::Path& path,
const Raul::URI& type,
uint32_t index,
bool is_output);
-
+
virtual void clear_patch(const Raul::Path& path);
-
+
virtual void destroy(const Raul::Path& path);
-
+
virtual void rename(const Raul::Path& old_path,
const Raul::Path& new_path);
-
+
virtual void connect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void disconnect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void set_variable(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_port_value(const Raul::Path& port_path,
const Raul::Atom& value);
-
+
virtual void set_voice_value(const Raul::Path& port_path,
uint32_t voice,
const Raul::Atom& value);
-
+
virtual void activity(const Raul::Path& path);
-
+
virtual void program_add(const Raul::Path& node_path,
uint32_t bank,
uint32_t program,
const std::string& program_name);
-
+
virtual void program_remove(const Raul::Path& node_path,
uint32_t bank,
uint32_t program);
diff --git a/src/engine/OSCDriver.hpp b/src/engine/OSCDriver.hpp
index fe295df5..7c57d6cf 100644
--- a/src/engine/OSCDriver.hpp
+++ b/src/engine/OSCDriver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -55,24 +55,24 @@ public:
DummyOSCDriver() {
std::cout << "[DummyOSCDriver] Started Dummy OSC driver." << std::endl;
}
-
+
~DummyOSCDriver() {}
void activate() {}
void deactivate() {}
-
+
bool is_activated() const { return false; }
bool is_enabled() const { return false; }
-
+
void enable() {}
void disable() {}
-
+
DriverPort* create_port(DuplexPort* patch_port) { return NULL; }
-
+
void add_port(DriverPort* port) {}
-
+
Raul::List<DriverPort*>::Node* remove_port(const Raul::Path& path) { return NULL; }
-
+
void prepare_block(const SampleCount block_start, const SampleCount block_end) {}
};
diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp
index d5707720..fd9b6c1f 100644
--- a/src/engine/OSCEngineReceiver.cpp
+++ b/src/engine/OSCEngineReceiver.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -61,7 +61,7 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t
#ifdef ENABLE_AVAHI
lo_server_avahi_init(_server, "ingen");
#endif
-
+
if (_server == NULL) {
cerr << "[OSC] Could not start OSC server. Aborting." << endl;
exit(EXIT_FAILURE);
@@ -77,7 +77,7 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t
// Set response address for this message.
// It's important this is first and returns nonzero.
lo_server_add_method(_server, NULL, NULL, set_response_address_cb, this);
-
+
// Commands
lo_server_add_method(_server, "/ingen/ping", "i", ping_cb, this);
lo_server_add_method(_server, "/ingen/ping_queued", "i", ping_slow_cb, this);
@@ -180,12 +180,12 @@ OSCEngineReceiver::ReceiveThread::_run()
// Enqueue every other message that is here "now"
// (would this provide truly atomic bundles?)
- while (lo_server_recv_noblock(_receiver._server, 0) > 0)
+ while (lo_server_recv_noblock(_receiver._server, 0) > 0)
if (_receiver.unprepared_events())
_receiver.whip();
// No more unprepared events
- }
+ }
}
@@ -214,7 +214,7 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types,
const lo_address addr = lo_message_get_source(msg);
char* const url = lo_address_get_url(addr);
-
+
const SharedPtr<Responder> r = me->_responder;
/* Different address than last time, have to do a lookup */
@@ -225,7 +225,7 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types,
else
me->_responder = SharedPtr<Responder>(new Responder());
}
-
+
if (id != -1) {
me->set_next_response_id(id);
} else {
@@ -322,7 +322,7 @@ OSCEngineReceiver::_unregister_client_cb(const char* path, const char* types, lo
char* url = lo_address_get_url(addr);
unregister_client(url);
free(url);
-
+
return 0;
}
@@ -394,7 +394,7 @@ OSCEngineReceiver::_rename_cb(const char* path, const char* types, lo_arg** argv
{
const char* old_path = &argv[1]->s;
const char* new_path = &argv[2]->s;
-
+
rename(old_path, new_path);
return 0;
}
@@ -409,7 +409,7 @@ int
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;
-
+
clear_patch(patch_path);
return 0;
}
@@ -429,7 +429,7 @@ OSCEngineReceiver::_new_port_cb(const char* path, const char* types, lo_arg** ar
const char* port_path = &argv[1]->s;
const char* data_type = &argv[2]->s;
const int32_t direction = argv[3]->i;
-
+
new_port(port_path, data_type, 0, (direction == 1));
return 0;
}
@@ -445,7 +445,7 @@ OSCEngineReceiver::_new_node_by_uri_cb(const char* path, const char* types, lo_a
{
const char* node_path = &argv[1]->s;
const char* plug_uri = &argv[2]->s;
-
+
new_node(node_path, plug_uri);
return 0;
}
@@ -460,7 +460,7 @@ int
OSCEngineReceiver::_destroy_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
-
+
destroy(node_path);
return 0;
}
@@ -528,7 +528,7 @@ OSCEngineReceiver::_set_port_value_cb(const char* path, const char* types, lo_ar
{
if (argc < 3 || argc > 5 || strncmp(types, "is", 2))
return 1;
-
+
const char* port_path = &argv[1]->s;
using Raul::Atom;
@@ -627,7 +627,7 @@ OSCEngineReceiver::_all_notes_off_cb(const char* path, const char* types, lo_arg
* <p> \b /ingen/midi_learn - Initiate MIDI learn for a given (MIDI Control) Node
* \arg \b response-id (integer)
* \arg \b node-path (string) - Patch of the Node that should learn the next MIDI event.
- *
+ *
* \li This of course will only do anything for MIDI control nodes. The node will learn the next MIDI
* event that arrives at it's MIDI input port - no behind the scenes voodoo happens here. It is planned
* that a plugin specification supporting arbitrary OSC commands for plugins will exist one day, and this
@@ -637,7 +637,7 @@ int
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;
-
+
midi_learn(patch_path);
return 0;
}
@@ -658,9 +658,9 @@ OSCEngineReceiver::_variable_set_cb(const char* path, const char* types, lo_arg*
const char* object_path = &argv[1]->s;
const char* key = &argv[2]->s;
-
+
Raul::Atom value = Raul::AtomLiblo::lo_arg_to_atom(types[3], argv[3]);
-
+
set_variable(object_path, key, value);
return 0;
}
@@ -681,9 +681,9 @@ OSCEngineReceiver::_property_set_cb(const char* path, const char* types, lo_arg*
const char* object_path = &argv[1]->s;
const char* key = &argv[2]->s;
-
+
Raul::Atom value = Raul::AtomLiblo::lo_arg_to_atom(types[3], argv[3]);
-
+
set_property(object_path, key, value);
return 0;
}
@@ -774,7 +774,7 @@ int
OSCEngineReceiver::generic_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg, void* user_data)
{
printf("[OSCMsg] %s (%s)\t", path, types);
-
+
for (int i=0; i < argc; ++i) {
lo_arg_pp(lo_type(types[i]), argv[i]);
printf("\t");
diff --git a/src/engine/OSCEngineReceiver.hpp b/src/engine/OSCEngineReceiver.hpp
index 816d9542..3465d9cc 100644
--- a/src/engine/OSCEngineReceiver.hpp
+++ b/src/engine/OSCEngineReceiver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -76,7 +76,7 @@ private:
ReceiveThread* _receive_thread;
- static void error_cb(int num, const char* msg, const char* path);
+ static void error_cb(int num, const char* msg, const char* path);
static int set_response_address_cb(LO_HANDLER_ARGS, void* myself);
static int generic_cb(LO_HANDLER_ARGS, void* myself);
static int unknown_cb(LO_HANDLER_ARGS, void* myself);
diff --git a/src/engine/ObjectSender.cpp b/src/engine/ObjectSender.cpp
index 0f8f10b6..b86df5a7 100644
--- a/src/engine/ObjectSender.cpp
+++ b/src/engine/ObjectSender.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -43,7 +43,7 @@ ObjectSender::send_object(ClientInterface* client, const GraphObjectImpl* object
send_patch(client, patch, recursive);
return;
}
-
+
const NodeImpl* node = dynamic_cast<const NodeImpl*>(object);
if (node) {
send_node(client, node, recursive);
@@ -66,12 +66,12 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r
client->new_patch(patch->path(), patch->internal_polyphony());
client->set_variable(patch->path(), "ingen:polyphonic", bool(patch->polyphonic()));
-
+
// Send variable
const GraphObjectImpl::Properties& data = patch->variables();
for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j)
client->set_variable(patch->path(), (*j).first, (*j).second);
-
+
client->set_variable(patch->path(), "ingen:enabled", (bool)patch->enabled());
if (recursive) {
@@ -79,7 +79,7 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r
// Send nodes
for (Raul::List<NodeImpl*>::const_iterator j = patch->nodes().begin();
j != patch->nodes().end(); ++j) {
- const NodeImpl* const node = (*j);
+ const NodeImpl* const node = (*j);
send_node(client, node, true, false);
}
@@ -94,7 +94,7 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r
j != patch->connections().end(); ++j)
client->connect((*j)->src_port_path(), (*j)->dst_port_path());
}
-
+
if (bundle)
client->transfer_end();
}
@@ -115,29 +115,29 @@ ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recu
cerr << "Node " << node->path() << " plugin has no URI! Not sending." << endl;
return;
}
-
+
if (bundle)
client->transfer_begin();
-
+
client->new_node(node->path(), node->plugin()->uri());
client->set_variable(node->path(), "ingen:polyphonic", bool(node->polyphonic()));
-
+
// Send variables
const GraphObjectImpl::Properties& data = node->variables();
for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j)
client->set_variable(node->path(), (*j).first, (*j).second);
-
+
// Send properties
const GraphObjectImpl::Properties& prop = node->properties();
for (GraphObjectImpl::Properties::const_iterator j = prop.begin(); j != prop.end(); ++j)
client->set_property(node->path(), (*j).first, (*j).second);
-
+
if (recursive) {
// Send ports
for (size_t j=0; j < node->num_ports(); ++j)
send_port(client, node->port_impl(j), false);
}
-
+
if (bundle)
client->transfer_end();
}
@@ -147,7 +147,7 @@ void
ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bundle)
{
assert(port);
-
+
if (bundle)
client->bundle_begin();
@@ -155,24 +155,24 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bund
PatchImpl* graph_parent = dynamic_cast<PatchImpl*>(port->parent_node());
if (graph_parent && graph_parent->internal_polyphony() > 1)
client->set_variable(port->path(), "ingen:polyphonic", bool(port->polyphonic()));
-
+
// Send variable
const GraphObjectImpl::Properties& data = port->variables();
for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j)
client->set_variable(port->path(), (*j).first, (*j).second);
-
+
// Send properties
const GraphObjectImpl::Properties& prop = port->properties();
for (GraphObjectImpl::Properties::const_iterator j = prop.begin(); j != prop.end(); ++j)
client->set_property(port->path(), (*j).first, (*j).second);
-
+
// Send control value
if (port->type() == DataType::CONTROL) {
const Sample value = dynamic_cast<const AudioBuffer*>(port->buffer(0))->value_at(0);
//cerr << port->path() << " sending default value " << default_value << endl;
client->set_port_value(port->path(), value);
}
-
+
if (bundle)
client->bundle_end();
}
diff --git a/src/engine/ObjectSender.hpp b/src/engine/ObjectSender.hpp
index db10e8fc..d356dee3 100644
--- a/src/engine/ObjectSender.hpp
+++ b/src/engine/ObjectSender.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/OutputPort.cpp b/src/engine/OutputPort.cpp
index b0af3f6e..6cebf005 100644
--- a/src/engine/OutputPort.cpp
+++ b/src/engine/OutputPort.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/OutputPort.hpp b/src/engine/OutputPort.hpp
index 6e36d021..ea84c6e7 100644
--- a/src/engine/OutputPort.hpp
+++ b/src/engine/OutputPort.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -49,7 +49,7 @@ public:
void pre_process(ProcessContext& context);
void post_process(ProcessContext& context);
-
+
virtual ~OutputPort() {}
bool is_input() const { return false; }
diff --git a/src/engine/PatchImpl.cpp b/src/engine/PatchImpl.cpp
index ac053f31..18259816 100644
--- a/src/engine/PatchImpl.cpp
+++ b/src/engine/PatchImpl.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,7 +36,7 @@ namespace Ingen {
using namespace Shared;
-PatchImpl::PatchImpl(Engine& engine, const string& path, uint32_t poly, PatchImpl* parent, SampleRate srate, size_t buffer_size, uint32_t internal_poly)
+PatchImpl::PatchImpl(Engine& engine, const string& path, uint32_t poly, PatchImpl* parent, SampleRate srate, size_t buffer_size, uint32_t internal_poly)
: NodeBase(new PatchPlugin("http://example.org/FIXME", "patch", "Ingen Patch"),
path, poly, parent, srate, buffer_size)
, _engine(engine)
@@ -51,7 +51,7 @@ PatchImpl::PatchImpl(Engine& engine, const string& path, uint32_t poly, PatchImp
PatchImpl::~PatchImpl()
{
assert(!_activated);
-
+
delete _compiled_patch;
}
@@ -63,7 +63,7 @@ PatchImpl::activate()
for (List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i)
(*i)->activate();
-
+
assert(_activated);
}
@@ -72,9 +72,9 @@ void
PatchImpl::deactivate()
{
if (_activated) {
-
+
NodeBase::deactivate();
-
+
for (List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) {
if ((*i)->activated())
(*i)->deactivate();
@@ -96,7 +96,7 @@ PatchImpl::disable()
(*i)->clear_buffers();
}
-
+
bool
PatchImpl::prepare_internal_poly(uint32_t poly)
{
@@ -106,7 +106,7 @@ PatchImpl::prepare_internal_poly(uint32_t poly)
for (List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i)
(*i)->prepare_poly(poly);
-
+
for (Connections::iterator i = _connections.begin(); i != _connections.end(); ++i)
((ConnectionImpl*)i->get())->prepare_poly(poly);
@@ -125,15 +125,15 @@ PatchImpl::apply_internal_poly(Raul::Maid& maid, uint32_t poly)
for (List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i)
(*i)->apply_poly(maid, poly);
-
+
_internal_poly = poly;
-
+
return true;
}
/** Run the patch for the specified number of frames.
- *
+ *
* Calls all Nodes in (roughly, if parallel) the order _compiled_patch specifies.
*/
void
@@ -141,9 +141,9 @@ PatchImpl::process(ProcessContext& context)
{
if (!_process)
return;
-
+
NodeBase::pre_process(context);
-
+
/*if (_ports)
for (size_t i=0; i < _ports->size(); ++i)
if (_ports->at(i)->is_input() && _ports->at(i)->type() == DataType::MIDI)
@@ -182,7 +182,7 @@ PatchImpl::process_parallel(ProcessContext& context)
for (size_t i=0; i < n_slaves; ++i)
_engine.process_slaves()[i]->whip(cp, i+1, context);
}
-
+
/* Process ourself until everything is done
* This is analogous to ProcessSlave::_whipped(), but this is the master
@@ -220,7 +220,7 @@ PatchImpl::process_parallel(ProcessContext& context)
index = (index + 1) % cp->size();
}
-
+
/* Tell slaves we're done in case we beat them, and pray they're
* really done by the start of next cycle.
* FIXME: This probably breaks (race) at extremely small nframes where
@@ -230,7 +230,7 @@ PatchImpl::process_parallel(ProcessContext& context)
_engine.process_slaves()[i]->finish();
}
-
+
void
PatchImpl::process_single(ProcessContext& context)
{
@@ -239,14 +239,14 @@ PatchImpl::process_single(ProcessContext& context)
for (size_t i=0; i < cp->size(); ++i)
(*cp)[i].node()->process(context);
}
-
+
void
PatchImpl::set_buffer_size(size_t size)
{
NodeBase::set_buffer_size(size);
assert(_buffer_size == size);
-
+
CompiledPatch* const cp = _compiled_patch;
for (size_t i=0; i < cp->size(); ++i)
@@ -268,7 +268,7 @@ PatchImpl::add_node(List<NodeImpl*>::Node* ln)
assert(ln->elem() != NULL);
assert(ln->elem()->parent_patch() == this);
//assert(ln->elem()->polyphony() == _internal_poly);
-
+
_nodes.push_back(ln);
}
@@ -283,7 +283,7 @@ PatchImpl::remove_node(const string& symbol)
for (List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i)
if ((*i)->symbol() == symbol)
return _nodes.erase(i);
-
+
return NULL;
}
@@ -311,7 +311,7 @@ PatchImpl::remove_connection(const PortImpl* src_port, const PortImpl* dst_port)
return connection;
}
-
+
bool
PatchImpl::has_connection(const PortImpl* src_port, const PortImpl* dst_port) const
@@ -416,10 +416,10 @@ PatchImpl::build_ports_array() const
Raul::Array<PortImpl*>* const result = new Raul::Array<PortImpl*>(_input_ports.size() + _output_ports.size());
size_t i = 0;
-
+
for (List<PortImpl*>::const_iterator p = _input_ports.begin(); p != _input_ports.end(); ++p,++i)
result->at(i) = *p;
-
+
for (List<PortImpl*>::const_iterator p = _output_ports.begin(); p != _output_ports.end(); ++p,++i)
result->at(i) = *p;
@@ -445,24 +445,24 @@ PatchImpl::compile() const
//cerr << "*********** Compiling " << path() << endl;
CompiledPatch* const compiled_patch = new CompiledPatch();//_nodes.size());
-
+
for (Nodes::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i)
(*i)->traversed(false);
-
+
for (Nodes::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) {
NodeImpl* const node = (*i);
// Either a sink or connected to our output ports:
if ( ( ! node->traversed()) && node->dependants()->size() == 0)
compile_recursive(node, compiled_patch);
}
-
+
// Traverse any nodes we didn't hit yet
for (Nodes::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) {
NodeImpl* const node = (*i);
if ( ! node->traversed())
compile_recursive(node, compiled_patch);
}
-
+
/*cerr << "----------------------------------------\n";
for (size_t i=0; i < process_order->size(); ++i) {
assert(process_order->at(i));
diff --git a/src/engine/PatchImpl.hpp b/src/engine/PatchImpl.hpp
index 17600c4c..3f05e6df 100644
--- a/src/engine/PatchImpl.hpp
+++ b/src/engine/PatchImpl.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -61,16 +61,16 @@ public:
void deactivate();
void process(ProcessContext& context);
-
+
void set_buffer_size(size_t size);
-
+
/** Prepare for a new (internal) polyphony value.
*
* Preprocessor thread, poly is actually applied by apply_internal_poly.
* \return true on success.
*/
bool prepare_internal_poly(uint32_t poly);
-
+
/** Apply a new (internal) polyphony value.
*
* Audio thread.
@@ -79,42 +79,42 @@ public:
* \param maid Any objects no longer needed will be pushed to this
*/
bool apply_internal_poly(Raul::Maid& maid, uint32_t poly);
-
+
// Patch specific stuff not inherited from Node
-
+
typedef Raul::List<NodeImpl*> Nodes;
-
+
void add_node(Nodes::Node* tn);
Nodes::Node* remove_node(const std::string& name);
Nodes& nodes() { return _nodes; }
Connections& connections() { return _connections; }
-
+
const Nodes& nodes() const { return _nodes; }
const Connections& connections() const { return _connections; }
-
+
uint32_t num_ports() const;
-
+
PortImpl* create_port(const std::string& name, Shared::DataType type, size_t buffer_size, bool is_output);
void add_input(Raul::List<PortImpl*>::Node* port) { _input_ports.push_back(port); } ///< Preprocesser thread
void add_output(Raul::List<PortImpl*>::Node* port) { _output_ports.push_back(port); } ///< Preprocessor thread
Raul::List<PortImpl*>::Node* remove_port(const std::string& name);
void clear_ports();
-
+
void add_connection(Connections::Node* c) { _connections.push_back(c); }
Connections::Node* remove_connection(const PortImpl* src_port, const PortImpl* dst_port);
-
+
bool has_connection(const PortImpl* src_port, const PortImpl* dst_port) const;
-
+
CompiledPatch* compiled_patch() { return _compiled_patch; }
void compiled_patch(CompiledPatch* cp) { _compiled_patch = cp; }
-
+
Raul::Array<PortImpl*>* external_ports() { return _ports; }
void external_ports(Raul::Array<PortImpl*>* pa) { _ports = pa; }
CompiledPatch* compile() const;
Raul::Array<PortImpl*>* build_ports_array() const;
-
+
/** Whether to run this patch's DSP bits in the audio thread */
bool enabled() const { return _process; }
void enable() { _process = true; }
@@ -148,7 +148,7 @@ PatchImpl::compile_recursive(NodeImpl* n, CompiledPatch* output) const
n->traversed(true);
assert(output != NULL);
-
+
for (Raul::List<NodeImpl*>::iterator i = n->providers()->begin(); i != n->providers()->end(); ++i)
if ( ! (*i)->traversed() )
compile_recursive((*i), output);
diff --git a/src/engine/PatchPlugin.hpp b/src/engine/PatchPlugin.hpp
index 068329d0..6ead1ec0 100644
--- a/src/engine/PatchPlugin.hpp
+++ b/src/engine/PatchPlugin.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -40,7 +40,7 @@ public:
const std::string& name)
: PluginImpl(Plugin::Patch, uri)
{}
-
+
NodeImpl* instantiate(const std::string& name,
bool polyphonic,
Ingen::PatchImpl* parent,
@@ -48,7 +48,7 @@ public:
{
return NULL;
}
-
+
const std::string symbol() const { return "patch"; }
const std::string name() const { return "Ingen Patch"; }
diff --git a/src/engine/PluginImpl.cpp b/src/engine/PluginImpl.cpp
index 7370defc..f37de694 100644
--- a/src/engine/PluginImpl.cpp
+++ b/src/engine/PluginImpl.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -38,7 +38,7 @@ PluginImpl::load()
}
}
-
+
void
PluginImpl::unload()
{
diff --git a/src/engine/PluginImpl.hpp b/src/engine/PluginImpl.hpp
index 40f9c91f..4d56df01 100644
--- a/src/engine/PluginImpl.hpp
+++ b/src/engine/PluginImpl.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -49,19 +49,19 @@ public:
, _library_path(library_path)
, _module(NULL)
{}
-
+
virtual NodeImpl* instantiate(const std::string& name,
bool polyphonic,
Ingen::PatchImpl* parent,
Engine& engine) = 0;
-
+
virtual const std::string symbol() const = 0;
-
+
virtual const std::string& library_path() const { return _library_path; }
-
+
void load();
void unload();
-
+
Plugin::Type type() const { return _type; }
void type(Plugin::Type t) { _type = t; }
Glib::Module* module() const { return _module; }
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp
index 9c819e23..d207928f 100644
--- a/src/engine/PortImpl.cpp
+++ b/src/engine/PortImpl.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -64,7 +64,7 @@ PortImpl::PortImpl(NodeImpl* const node,
_polyphonic = false;
else
_polyphonic = true;
-
+
if (type == DataType::EVENT)
_broadcast = true; // send activity blips
@@ -81,7 +81,7 @@ PortImpl::~PortImpl()
delete _buffers;
}
-
+
bool
PortImpl::set_polyphonic(Raul::Maid& maid, bool p)
{
@@ -129,7 +129,7 @@ PortImpl::apply_poly(Raul::Maid& maid, uint32_t poly)
return true;
}
-
+
void
PortImpl::allocate_buffers()
@@ -162,14 +162,14 @@ PortImpl::connect_buffers()
PortImpl::parent_node()->set_port_buffer(i, _index, buffer(i));
}
-
+
void
PortImpl::clear_buffers()
{
for (uint32_t i=0; i < _poly; ++i)
buffer(i)->clear();
}
-
+
void
PortImpl::broadcast_value(ProcessContext& context, bool force)
diff --git a/src/engine/PortImpl.hpp b/src/engine/PortImpl.hpp
index d3aad1c3..a39d9358 100644
--- a/src/engine/PortImpl.hpp
+++ b/src/engine/PortImpl.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -53,15 +53,15 @@ public:
/** A port's parent is always a node, so static cast should be safe */
NodeImpl* parent_node() const { return (NodeImpl*)_parent; }
-
+
bool set_polyphonic(Raul::Maid& maid, bool p);
-
+
/** Prepare for a new (external) polyphony value.
*
* Preprocessor thread, poly is actually applied by apply_poly.
*/
virtual bool prepare_poly(uint32_t poly);
-
+
/** Apply a new polyphony value.
*
* Audio thread.
@@ -69,7 +69,7 @@ public:
* \a poly Must be < the most recent value passed to prepare_poly.
*/
virtual bool apply_poly(Raul::Maid& maid, uint32_t poly);
-
+
const Raul::Atom& value() const { return _value; }
void set_value(const Raul::Atom& v) { _value = v; }
@@ -90,7 +90,7 @@ public:
virtual void pre_process(ProcessContext& context) = 0;
virtual void process(ProcessContext& context) {};
virtual void post_process(ProcessContext& context) = 0;
-
+
/** Empty buffer contents completely (ie silence) */
virtual void clear_buffers();
@@ -105,10 +105,10 @@ public:
}
virtual void set_buffer_size(size_t size);
-
+
void fixed_buffers(bool b) { _fixed_buffers = b; }
bool fixed_buffers() { return _fixed_buffers; }
-
+
void broadcast(bool b) { _broadcast = b; }
bool broadcast() { return _broadcast; }
@@ -127,7 +127,7 @@ protected:
Shared::DataType type,
const Raul::Atom& value,
size_t buffer_size);
-
+
virtual void allocate_buffers();
virtual void connect_buffers();
virtual void broadcast(ProcessContext& context);
diff --git a/src/engine/PostProcessor.cpp b/src/engine/PostProcessor.cpp
index 1595ac38..0d525424 100644
--- a/src/engine/PostProcessor.cpp
+++ b/src/engine/PostProcessor.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -51,7 +51,7 @@ PostProcessor::process()
* broadcast event which will segfault if executed afterwards.
* If it's the other way around, broadcasts will be sent for
* ports the client doesn't even know about yet... */
-
+
/* FIXME: process events from all threads if parallel */
/* Process audio thread generated events */
diff --git a/src/engine/PostProcessor.hpp b/src/engine/PostProcessor.hpp
index bf4f557b..071b6ecf 100644
--- a/src/engine/PostProcessor.hpp
+++ b/src/engine/PostProcessor.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/ProcessContext.hpp b/src/engine/ProcessContext.hpp
index daf04463..158127d3 100644
--- a/src/engine/ProcessContext.hpp
+++ b/src/engine/ProcessContext.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/ProcessSlave.cpp b/src/engine/ProcessSlave.cpp
index 3b29d61b..fcbc047f 100644
--- a/src/engine/ProcessSlave.cpp
+++ b/src/engine/ProcessSlave.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -43,15 +43,15 @@ ProcessSlave::_whipped()
size_t num_finished = 0; // Number of consecutive finished nodes hit
while (_state == STATE_RUNNING) {
-
+
CompiledNode& n = (*cp)[_index];
-
+
if (n.node()->process_lock()) {
n.node()->wait_for_input(n.n_providers());
n.node()->process(_process_context);
-
+
/* Signal dependants their input is ready */
for (size_t i=0; i < n.dependants().size(); ++i)
n.dependants()[i]->signal_input_ready();
@@ -60,13 +60,13 @@ ProcessSlave::_whipped()
} else {
++num_finished;
}
-
+
_index = (_index + 1) % cp->size();
if (num_finished >= cp->size())
break;
}
-
+
_index = 0;
_compiled_patch = NULL;
_state = STATE_FINISHED;
diff --git a/src/engine/ProcessSlave.hpp b/src/engine/ProcessSlave.hpp
index 22c387c0..075fc411 100644
--- a/src/engine/ProcessSlave.hpp
+++ b/src/engine/ProcessSlave.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -43,13 +43,13 @@ public:
ss << "Process Slave ";
ss << _id;
set_name(ss.str());
-
+
start();
-
+
if (realtime)
set_scheduling(SCHED_FIFO, 40);
}
-
+
~ProcessSlave() {
stop();
}
@@ -72,7 +72,7 @@ public:
inline uint32_t id() const { return _id; }
inline const ProcessContext& context() const { return _process_context; }
inline ProcessContext& context() { return _process_context; }
-
+
private:
void _whipped();
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp
index 1ac41f38..2a42569a 100644
--- a/src/engine/QueuedEngineInterface.cpp
+++ b/src/engine/QueuedEngineInterface.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -117,19 +117,19 @@ QueuedEngineInterface::activate()
void
-QueuedEngineInterface::deactivate()
+QueuedEngineInterface::deactivate()
{
push_queued(new DeactivateEvent(_engine, _responder, now()));
}
void
-QueuedEngineInterface::quit()
+QueuedEngineInterface::quit()
{
_responder->respond_ok();
_engine.quit();
}
-
+
// Bundle commands
@@ -146,7 +146,7 @@ QueuedEngineInterface::bundle_end()
_in_bundle = false;
}
-
+
// Object commands
bool
@@ -203,7 +203,7 @@ QueuedEngineInterface::clear_patch(const Path& patch_path)
push_queued(new ClearPatchEvent(_engine, _responder, now(), this, patch_path));
}
-
+
void
QueuedEngineInterface::connect(const Path& src_port_path,
const Path& dst_port_path)
@@ -270,7 +270,7 @@ QueuedEngineInterface::set_variable(const URI& path,
push_queued(new SetMetadataEvent(_engine, _responder, now(), false, path, predicate, value));
}
-
+
void
QueuedEngineInterface::set_property(const URI& path,
const URI& predicate,
diff --git a/src/engine/QueuedEngineInterface.hpp b/src/engine/QueuedEngineInterface.hpp
index b4577850..299f1269 100644
--- a/src/engine/QueuedEngineInterface.hpp
+++ b/src/engine/QueuedEngineInterface.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -49,9 +49,9 @@ class QueuedEngineInterface : public QueuedEventSource, public Shared::EngineInt
public:
QueuedEngineInterface(Engine& engine, size_t queue_size);
virtual ~QueuedEngineInterface() {}
-
+
Raul::URI uri() const { return "ingen:internal"; }
-
+
void set_next_response_id(int32_t id);
// Client registration
@@ -63,67 +63,67 @@ public:
virtual void activate();
virtual void deactivate();
virtual void quit();
-
+
// Bundles
virtual void bundle_begin();
virtual void bundle_end();
-
+
// CommonInterface object commands
-
+
virtual bool new_object(const Shared::GraphObject* object);
virtual void new_patch(const Raul::Path& path,
uint32_t poly);
-
+
virtual void new_node(const Raul::Path& path,
const Raul::URI& plugin_uri);
-
+
virtual void new_port(const Raul::Path& path,
const Raul::URI& type,
uint32_t index,
bool is_output);
-
+
virtual void rename(const Raul::Path& old_path,
const Raul::Path& new_path);
-
+
virtual void connect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void disconnect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void set_variable(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_port_value(const Raul::Path& port_path,
const Raul::Atom& value);
-
+
virtual void set_voice_value(const Raul::Path& port_path,
uint32_t voice,
const Raul::Atom& value);
-
+
virtual void destroy(const Raul::Path& path);
-
+
virtual void clear_patch(const Raul::Path& patch_path);
-
+
// EngineInterface object commands
-
+
virtual void disconnect_all(const Raul::Path& parent_patch_path,
const Raul::Path& path);
-
+
virtual void set_program(const Raul::Path& node_path,
uint32_t bank,
uint32_t program);
virtual void midi_learn(const Raul::Path& node_path);
-
+
// Requests //
-
+
virtual void ping();
virtual void request_plugin(const Raul::URI& uri);
virtual void request_object(const Raul::Path& path);
@@ -133,7 +133,7 @@ public:
virtual void request_all_objects();
protected:
-
+
virtual void disable_responses();
SharedPtr<Responder> _responder; ///< NULL if responding disabled
diff --git a/src/engine/QueuedEvent.cpp b/src/engine/QueuedEvent.cpp
index 8ed6fa02..d102b8df 100644
--- a/src/engine/QueuedEvent.cpp
+++ b/src/engine/QueuedEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -44,7 +44,7 @@ QueuedEvent::execute(ProcessContext& context)
Event::execute(context);
}
-
+
} // namespace Ingen
diff --git a/src/engine/QueuedEvent.hpp b/src/engine/QueuedEvent.hpp
index e616d269..35eb1c82 100644
--- a/src/engine/QueuedEvent.hpp
+++ b/src/engine/QueuedEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -52,11 +52,11 @@ public:
bool is_blocking() { return _blocking; }
bool is_prepared() { return _pre_processed; }
-
+
protected:
QueuedEvent(Engine& engine,
SharedPtr<Responder> responder,
- FrameTime time,
+ FrameTime time,
bool blocking = false,
QueuedEventSource* source = NULL)
: Event(engine, responder, time)
@@ -65,7 +65,7 @@ protected:
if (blocking)
assert(_source);
}
-
+
// NULL event base (for internal events only!)
QueuedEvent(Engine& engine)
: Event(engine, SharedPtr<Responder>(), 0)
diff --git a/src/engine/QueuedEventSource.cpp b/src/engine/QueuedEventSource.cpp
index af9b270e..bf7cbf53 100644
--- a/src/engine/QueuedEventSource.cpp
+++ b/src/engine/QueuedEventSource.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -66,7 +66,7 @@ void
QueuedEventSource::process(PostProcessor& dest, ProcessContext& context)
{
assert(ThreadManager::current_thread_id() == THREAD_PROCESS);
-
+
if (_events.empty())
return;
@@ -75,7 +75,7 @@ QueuedEventSource::process(PostProcessor& dest, ProcessContext& context)
* choked by events coming in faster than they can be processed.
* FIXME: test this and figure out a good value */
const size_t MAX_QUEUED_EVENTS = context.nframes() / 32;
-
+
size_t num_events_processed = 0;
QueuedEvent* ev = (QueuedEvent*)_events.front();
@@ -112,7 +112,7 @@ QueuedEventSource::_whipped()
assert(ev);
if (!ev)
return;
-
+
assert(!ev->is_prepared());
ev->pre_process();
assert(ev->is_prepared());
diff --git a/src/engine/QueuedEventSource.hpp b/src/engine/QueuedEventSource.hpp
index 3054d910..cdcd1fa7 100644
--- a/src/engine/QueuedEventSource.hpp
+++ b/src/engine/QueuedEventSource.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -52,7 +52,7 @@ public:
void deactivate_source() { Slave::stop(); }
void process(PostProcessor& dest, ProcessContext& context);
-
+
/** Signal that the blocking event is finished.
* When this is called preparing will resume. This MUST be called by
* blocking events in their post_process() method. */
@@ -62,7 +62,7 @@ protected:
void push_queued(QueuedEvent* const ev);
inline bool unprepared_events() { return (_prepared_back.get() != NULL); }
-
+
virtual void _whipped(); ///< Prepare 1 event
private:
diff --git a/src/engine/Responder.hpp b/src/engine/Responder.hpp
index 1cff0d8c..a2e8c44f 100644
--- a/src/engine/Responder.hpp
+++ b/src/engine/Responder.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/ThreadManager.hpp b/src/engine/ThreadManager.hpp
index 199f80bb..96397a30 100644
--- a/src/engine/ThreadManager.hpp
+++ b/src/engine/ThreadManager.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events.hpp b/src/engine/events.hpp
index b8a344de..b9115875 100644
--- a/src/engine/events.hpp
+++ b/src/engine/events.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/AllNotesOffEvent.cpp b/src/engine/events/AllNotesOffEvent.cpp
index 0057c456..7a0dd71f 100644
--- a/src/engine/events/AllNotesOffEvent.cpp
+++ b/src/engine/events/AllNotesOffEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -53,7 +53,7 @@ AllNotesOffEvent::execute(ProcessContext& context)
if (!_patch)
_patch = _engine.engine_store()->find_patch(_patch_path);
-
+
//if (_patch != NULL)
// for (Raul::List<MidiInNode*>::iterator j = _patch->midi_in_nodes().begin(); j != _patch->midi_in_nodes().end(); ++j)
// (*j)->all_notes_off(offset);
diff --git a/src/engine/events/AllNotesOffEvent.hpp b/src/engine/events/AllNotesOffEvent.hpp
index 41f7e25b..a9b58c98 100644
--- a/src/engine/events/AllNotesOffEvent.hpp
+++ b/src/engine/events/AllNotesOffEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -34,7 +34,7 @@ class AllNotesOffEvent : public Event
public:
AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, PatchImpl* patch);
AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const Raul::Path& patch_path);
-
+
void execute(ProcessContext& context);
void post_process();
diff --git a/src/engine/events/ClearPatchEvent.cpp b/src/engine/events/ClearPatchEvent.cpp
index e68ee271..0fb6046b 100644
--- a/src/engine/events/ClearPatchEvent.cpp
+++ b/src/engine/events/ClearPatchEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -53,7 +53,7 @@ void
ClearPatchEvent::pre_process()
{
EngineStore::Objects::iterator patch_iterator = _engine.engine_store()->find(_patch_path);
-
+
if (patch_iterator != _engine.engine_store()->end()) {
_patch = PtrCast<PatchImpl>(patch_iterator->second);
if (_patch) {
@@ -65,7 +65,7 @@ ClearPatchEvent::pre_process()
_ports_array = _patch->build_ports_array();
if (_patch->enabled())
_compiled_patch = _patch->compile();
-
+
// Remove driver ports
if (_patch->parent() == NULL) {
size_t port_count = 0;
@@ -92,18 +92,18 @@ ClearPatchEvent::execute(ProcessContext& context)
if (_patch && _removed_table) {
_patch->disable();
-
+
if (_patch->compiled_patch() != NULL) {
_engine.maid()->push(_patch->compiled_patch());
_patch->compiled_patch(NULL);
}
-
+
_patch->connections().clear();
_patch->compiled_patch(_compiled_patch);
Raul::Array<PortImpl*>* old_ports = _patch->external_ports();
_patch->external_ports(_ports_array);
_ports_array = old_ports;
-
+
// Remove driver ports
if (_patch->parent() == NULL) {
for (EngineStore::Objects::iterator i = _removed_table->begin();
@@ -124,10 +124,10 @@ ClearPatchEvent::execute(ProcessContext& context)
void
ClearPatchEvent::post_process()
-{
+{
if (_patch != NULL) {
delete _ports_array;
-
+
// Restore patch's run state
if (_process)
_patch->enable();
@@ -138,7 +138,7 @@ ClearPatchEvent::post_process()
assert(_patch->nodes().size() == 0);
assert(_patch->num_ports() == 0);
assert(_patch->connections().size() == 0);
-
+
// Reply
_responder->respond_ok();
_engine.broadcaster()->send_clear_patch(_patch_path);
@@ -158,7 +158,7 @@ ClearPatchEvent::post_process()
} else {
_responder->respond_error(string("Patch ") + _patch_path.str() + " not found");
}
-
+
_source->unblock(); // FIXME: can be done earlier in execute?
}
diff --git a/src/engine/events/ClearPatchEvent.hpp b/src/engine/events/ClearPatchEvent.hpp
index 42b06658..c5cba705 100644
--- a/src/engine/events/ClearPatchEvent.hpp
+++ b/src/engine/events/ClearPatchEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -39,7 +39,7 @@ class ClearPatchEvent : public QueuedEvent
{
public:
ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const Raul::Path& patch_path);
-
+
void pre_process();
void execute(ProcessContext& context);
void post_process();
@@ -50,10 +50,10 @@ private:
bool _process;
Raul::Array<PortImpl*>* _ports_array; ///< New (external) ports for Patch
CompiledPatch* _compiled_patch; ///< Patch's new process order
-
+
typedef Raul::Array<Raul::List<DriverPort*>::Node*> DriverPorts;
DriverPorts* _driver_ports;
-
+
SharedPtr< Raul::Table<Raul::Path, SharedPtr<Shared::GraphObject> > > _removed_table;
};
diff --git a/src/engine/events/ConnectionEvent.cpp b/src/engine/events/ConnectionEvent.cpp
index 6a55f35b..ef5d5d00 100644
--- a/src/engine/events/ConnectionEvent.cpp
+++ b/src/engine/events/ConnectionEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -64,10 +64,10 @@ ConnectionEvent::pre_process()
QueuedEvent::pre_process();
return;
}
-
+
_src_port = _engine.engine_store()->find_port(_src_port_path);
_dst_port = _engine.engine_store()->find_port(_dst_port_path);
-
+
if (_src_port == NULL || _dst_port == NULL) {
_error = PORT_NOT_FOUND;
QueuedEvent::pre_process();
@@ -81,10 +81,10 @@ ConnectionEvent::pre_process()
QueuedEvent::pre_process();
return;
}
-
+
_dst_input_port = dynamic_cast<InputPort*>(_dst_port);
_src_output_port = dynamic_cast<OutputPort*>(_src_port);
-
+
if (!_dst_input_port || !_src_output_port) {
_error = DIRECTION_MISMATCH;
QueuedEvent::pre_process();
@@ -102,18 +102,18 @@ ConnectionEvent::pre_process()
_patch = dynamic_cast<PatchImpl*>(dst_node);
else
_patch = dynamic_cast<PatchImpl*>(src_node);
-
+
// Connection from a patch input to a patch output (pass through)
} else if (src_node == dst_node && dynamic_cast<PatchImpl*>(src_node)) {
_patch = dynamic_cast<PatchImpl*>(src_node);
-
+
// Normal connection between nodes with the same parent
} else {
_patch = src_node->parent_patch();
}
assert(_patch);
-
+
if (_patch->has_connection(_src_output_port, _dst_input_port)) {
_error = ALREADY_CONNECTED;
QueuedEvent::pre_process();
@@ -125,7 +125,7 @@ ConnectionEvent::pre_process()
QueuedEvent::pre_process();
return;
}
-
+
if (_patch != src_node && src_node->parent() != _patch && dst_node->parent() != _patch) {
_error = PARENTS_NOT_FOUND;
QueuedEvent::pre_process();
@@ -135,14 +135,14 @@ ConnectionEvent::pre_process()
_connection = SharedPtr<ConnectionImpl>(new ConnectionImpl(_src_port, _dst_port));
_patch_listnode = new PatchImpl::Connections::Node(_connection);
_port_listnode = new InputPort::Connections::Node(_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...
if (src_node != dst_node && src_node->parent() == dst_node->parent()) {
dst_node->providers()->push_back(new Raul::List<NodeImpl*>::Node(src_node));
src_node->dependants()->push_back(new Raul::List<NodeImpl*>::Node(dst_node));
}
-
+
_patch->add_connection(_patch_listnode);
if (_patch->enabled())
diff --git a/src/engine/events/ConnectionEvent.hpp b/src/engine/events/ConnectionEvent.hpp
index 53254e77..926c8ba8 100644
--- a/src/engine/events/ConnectionEvent.hpp
+++ b/src/engine/events/ConnectionEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,7 +30,7 @@ namespace Raul {
}
namespace Ingen {
-
+
class PatchImpl;
class NodeImpl;
class ConnectionImpl;
@@ -55,8 +55,8 @@ public:
void post_process();
private:
-
- enum ErrorType {
+
+ enum ErrorType {
NO_ERROR,
PARENT_PATCH_DIFFERENT,
PORT_NOT_FOUND,
@@ -65,10 +65,10 @@ private:
ALREADY_CONNECTED,
PARENTS_NOT_FOUND
};
-
+
Raul::Path _src_port_path;
Raul::Path _dst_port_path;
-
+
PatchImpl* _patch;
PortImpl* _src_port;
PortImpl* _dst_port;
@@ -76,7 +76,7 @@ private:
InputPort* _dst_input_port;
CompiledPatch* _compiled_patch; ///< New process order for Patch
-
+
SharedPtr<ConnectionImpl> _connection;
PatchImpl::Connections::Node* _patch_listnode;
InputPort::Connections::Node* _port_listnode;
diff --git a/src/engine/events/CreateNodeEvent.cpp b/src/engine/events/CreateNodeEvent.cpp
index e4663799..c38d24ad 100644
--- a/src/engine/events/CreateNodeEvent.cpp
+++ b/src/engine/events/CreateNodeEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -78,18 +78,18 @@ CreateNodeEvent::pre_process()
: _engine.node_factory()->plugin(_plugin_type, _plugin_lib, _plugin_label);
if (_patch && plugin) {
-
+
_node = plugin->instantiate(_path.name(), _polyphonic, _patch, _engine);
-
+
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
_patch->add_node(new PatchImpl::Nodes::Node(_node));
//_node->add_to_store(_engine.engine_store());
_engine.engine_store()->add(_node);
-
+
// FIXME: not really necessary to build process order since it's not connected,
// just append to the list
if (_patch->enabled())
diff --git a/src/engine/events/CreateNodeEvent.hpp b/src/engine/events/CreateNodeEvent.hpp
index cba84cd0..e475ecb4 100644
--- a/src/engine/events/CreateNodeEvent.hpp
+++ b/src/engine/events/CreateNodeEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -41,7 +41,7 @@ public:
const Raul::Path& node_path,
const Raul::URI& plugin_uri,
bool poly);
-
+
void pre_process();
void execute(ProcessContext& context);
void post_process();
diff --git a/src/engine/events/CreatePatchEvent.cpp b/src/engine/events/CreatePatchEvent.cpp
index 0b85dd89..5b83c3de 100644
--- a/src/engine/events/CreatePatchEvent.cpp
+++ b/src/engine/events/CreatePatchEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -59,7 +59,7 @@ CreatePatchEvent::pre_process()
QueuedEvent::pre_process();
return;
}
-
+
const Path& path = (const Path&)_path;
_parent = _engine.engine_store()->find_patch(path.parent());
@@ -68,26 +68,26 @@ CreatePatchEvent::pre_process()
QueuedEvent::pre_process();
return;
}
-
+
uint32_t poly = 1;
if (_parent != NULL && _poly > 1 && _poly == static_cast<int>(_parent->internal_polyphony()))
poly = _poly;
-
+
_patch = new PatchImpl(_engine, path.name(), poly, _parent, _engine.audio_driver()->sample_rate(), _engine.audio_driver()->buffer_size(), _poly);
-
+
if (_parent != NULL) {
_parent->add_node(new PatchImpl::Nodes::Node(_patch));
if (_parent->enabled())
_compiled_patch = _parent->compile();
}
-
+
_patch->activate();
-
+
// Insert into EngineStore
//_patch->add_to_store(_engine.engine_store());
_engine.engine_store()->add(_patch);
-
+
QueuedEvent::pre_process();
}
diff --git a/src/engine/events/CreatePatchEvent.hpp b/src/engine/events/CreatePatchEvent.hpp
index c2759341..9d21cc56 100644
--- a/src/engine/events/CreatePatchEvent.hpp
+++ b/src/engine/events/CreatePatchEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -21,7 +21,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
-
+
class PatchImpl;
class CompiledPatch;
@@ -41,7 +41,7 @@ public:
private:
enum ErrorType { NO_ERROR, OBJECT_EXISTS, PARENT_NOT_FOUND, INVALID_POLY };
-
+
const Raul::Path _path;
PatchImpl* _patch;
PatchImpl* _parent;
diff --git a/src/engine/events/CreatePortEvent.cpp b/src/engine/events/CreatePortEvent.cpp
index 8e2230eb..b0f8273d 100644
--- a/src/engine/events/CreatePortEvent.cpp
+++ b/src/engine/events/CreatePortEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -85,22 +85,22 @@ CreatePortEvent::pre_process()
if (_patch != NULL) {
assert(_patch->path() == _path.parent());
-
+
size_t buffer_size = 1;
if (_type.str() != "ingen:Float")
buffer_size = _engine.audio_driver()->buffer_size();
-
+
const uint32_t old_num_ports = _patch->num_ports();
_patch_port = _patch->create_port(_path.name(), _data_type, buffer_size, _is_output);
-
+
if (_patch_port) {
if (_is_output)
_patch->add_output(new Raul::List<PortImpl*>::Node(_patch_port));
else
_patch->add_input(new Raul::List<PortImpl*>::Node(_patch_port));
-
+
if (_patch->external_ports())
_ports_array = new Raul::Array<PortImpl*>(old_num_ports + 1, *_patch->external_ports());
else
@@ -138,7 +138,7 @@ CreatePortEvent::execute(ProcessContext& context)
_engine.maid()->push(_patch->external_ports());
_patch->external_ports(_ports_array);
}
-
+
if (_driver_port) {
if (_type.str() == "lv2:AudioPort") {
_engine.audio_driver()->add_port(_driver_port);
@@ -146,7 +146,7 @@ CreatePortEvent::execute(ProcessContext& context)
_engine.midi_driver()->add_port(_driver_port);
}
}
-
+
if (_source)
_source->unblock();
}
diff --git a/src/engine/events/CreatePortEvent.hpp b/src/engine/events/CreatePortEvent.hpp
index 1fe9b962..0c3e5cac 100644
--- a/src/engine/events/CreatePortEvent.hpp
+++ b/src/engine/events/CreatePortEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,8 +46,8 @@ public:
void post_process();
private:
-
- enum ErrorType {
+
+ enum ErrorType {
NO_ERROR,
UNKNOWN_TYPE,
CREATION_FAILED
diff --git a/src/engine/events/DeactivateEvent.hpp b/src/engine/events/DeactivateEvent.hpp
index eaa7e9cb..03d39721 100644
--- a/src/engine/events/DeactivateEvent.hpp
+++ b/src/engine/events/DeactivateEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -34,7 +34,7 @@ public:
DeactivateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(engine, responder, timestamp)
{}
-
+
void post_process() {
_responder->respond_ok();
_engine.deactivate();
diff --git a/src/engine/events/DestroyEvent.cpp b/src/engine/events/DestroyEvent.cpp
index d5611f03..9832b715 100644
--- a/src/engine/events/DestroyEvent.cpp
+++ b/src/engine/events/DestroyEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -70,7 +70,7 @@ DestroyEvent::pre_process()
if (!_node)
_port = PtrCast<PortImpl>(_store_iterator->second);
}
-
+
if (_store_iterator != _engine.engine_store()->end()) {
_removed_table = _engine.engine_store()->remove(_store_iterator);
}
@@ -80,10 +80,10 @@ DestroyEvent::pre_process()
_patch_node_listnode = _node->parent_patch()->remove_node(_path.name());
if (_patch_node_listnode) {
assert(_patch_node_listnode->elem() == _node.get());
-
+
_disconnect_event = new DisconnectAllEvent(_engine, _node->parent_patch(), _node.get());
_disconnect_event->pre_process();
-
+
if (_node->parent_patch()->enabled()) {
// FIXME: is this called multiple times?
_compiled_patch = _node->parent_patch()->compile();
@@ -101,10 +101,10 @@ DestroyEvent::pre_process()
_patch_port_listnode = _port->parent_patch()->remove_port(_path.name());
if (_patch_port_listnode) {
assert(_patch_port_listnode->elem() == _port.get());
-
+
_disconnect_event = new DisconnectAllEvent(_engine, _port->parent_patch(), _port.get());
_disconnect_event->pre_process();
-
+
if (_port->parent_patch()->enabled()) {
// FIXME: is this called multiple times?
_compiled_patch = _port->parent_patch()->compile();
@@ -129,28 +129,28 @@ DestroyEvent::execute(ProcessContext& context)
if (_disconnect_event)
_disconnect_event->execute(context);
-
+
if (_node->parent_patch()->compiled_patch())
_engine.maid()->push(_node->parent_patch()->compiled_patch());
_node->parent_patch()->compiled_patch(_compiled_patch);
-
+
} else if (_patch_port_listnode) {
assert(_port);
if (_disconnect_event)
_disconnect_event->execute(context);
-
+
if (_port->parent_patch()->compiled_patch())
_engine.maid()->push(_port->parent_patch()->compiled_patch());
-
+
_port->parent_patch()->compiled_patch(_compiled_patch);
-
+
if (_port->parent_patch()->external_ports())
_engine.maid()->push(_port->parent_patch()->external_ports());
-
+
_port->parent_patch()->external_ports(_ports_array);
-
+
if ( ! _port->parent_patch()->parent()) {
if (_port->type() == DataType::AUDIO)
_driver_port = _engine.audio_driver()->remove_port(_port->path());
@@ -162,7 +162,7 @@ DestroyEvent::execute(ProcessContext& context)
// _driver_port->elem()->unregister();
}
}
-
+
if (_source)
_source->unblock();
}
@@ -180,7 +180,7 @@ DestroyEvent::post_process()
}
}
- if (_patch_node_listnode) {
+ if (_patch_node_listnode) {
assert(_node);
_node->deactivate();
_responder->respond_ok();
@@ -190,7 +190,7 @@ DestroyEvent::post_process()
_engine.broadcaster()->send_destroyed(_path);
_engine.broadcaster()->bundle_end();
_engine.maid()->push(_patch_node_listnode);
- } else if (_patch_port_listnode) {
+ } else if (_patch_port_listnode) {
assert(_port);
_responder->respond_ok();
_engine.broadcaster()->bundle_begin();
diff --git a/src/engine/events/DestroyEvent.hpp b/src/engine/events/DestroyEvent.hpp
index 791a74ae..940d46e7 100644
--- a/src/engine/events/DestroyEvent.hpp
+++ b/src/engine/events/DestroyEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -62,7 +62,7 @@ private:
Raul::Array<PortImpl*>* _ports_array; ///< New (external) ports for Patch
CompiledPatch* _compiled_patch; ///< Patch's new process order
DisconnectAllEvent* _disconnect_event;
-
+
SharedPtr< Raul::Table<Raul::Path, SharedPtr<Shared::GraphObject> > > _removed_table;
};
diff --git a/src/engine/events/DisablePortMonitoringEvent.cpp b/src/engine/events/DisablePortMonitoringEvent.cpp
index 1c75f06c..6de1ffe9 100644
--- a/src/engine/events/DisablePortMonitoringEvent.cpp
+++ b/src/engine/events/DisablePortMonitoringEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -57,7 +57,7 @@ DisablePortMonitoringEvent::execute(ProcessContext& context)
if (_port != NULL && _port->type() == DataType::FLOAT)
_value = ((AudioBuffer*)_port->buffer(0))->value_at(0/*_time - start*/);
- else
+ else
_port = NULL; // triggers error response
#endif
}
diff --git a/src/engine/events/DisablePortMonitoringEvent.hpp b/src/engine/events/DisablePortMonitoringEvent.hpp
index 2ac802f6..d6298332 100644
--- a/src/engine/events/DisablePortMonitoringEvent.hpp
+++ b/src/engine/events/DisablePortMonitoringEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -22,7 +22,7 @@
#include "types.hpp"
namespace Ingen {
-
+
/** Disable sending of dynamic value change notifications for a port.
*
diff --git a/src/engine/events/DisconnectAllEvent.cpp b/src/engine/events/DisconnectAllEvent.cpp
index 190ed878..a6c761be 100644
--- a/src/engine/events/DisconnectAllEvent.cpp
+++ b/src/engine/events/DisconnectAllEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -80,21 +80,21 @@ DisconnectAllEvent::pre_process()
{
if (_lookup) {
_parent = _engine.engine_store()->find_patch(_parent_path);
-
+
if (_parent == NULL) {
_error = PARENT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
-
+
GraphObjectImpl* object = _engine.engine_store()->find_object(_path);
-
+
if (object == NULL) {
_error = OBJECT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
-
+
if (object->parent_patch() != _parent && object->parent()->parent_patch() != _parent) {
_error = INVALID_PARENT_PATH;
QueuedEvent::pre_process();
@@ -134,8 +134,8 @@ DisconnectAllEvent::pre_process()
}
}
}
-
- QueuedEvent::pre_process();
+
+ QueuedEvent::pre_process();
}
diff --git a/src/engine/events/DisconnectAllEvent.hpp b/src/engine/events/DisconnectAllEvent.hpp
index 5fff30d6..9dbe9d8a 100644
--- a/src/engine/events/DisconnectAllEvent.hpp
+++ b/src/engine/events/DisconnectAllEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -49,7 +49,7 @@ public:
void post_process();
private:
- enum ErrorType {
+ enum ErrorType {
NO_ERROR,
INVALID_PARENT_PATH,
PARENT_NOT_FOUND,
@@ -62,7 +62,7 @@ private:
NodeImpl* _node;
PortImpl* _port;
Raul::List<DisconnectionEvent*> _disconnection_events;
-
+
bool _lookup;
bool _disconnect_parent;
diff --git a/src/engine/events/DisconnectionEvent.cpp b/src/engine/events/DisconnectionEvent.cpp
index ec90480f..3bb0db89 100644
--- a/src/engine/events/DisconnectionEvent.cpp
+++ b/src/engine/events/DisconnectionEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -86,7 +86,7 @@ DisconnectionEvent::pre_process()
_src_port = _engine.engine_store()->find_port(_src_port_path);
_dst_port = _engine.engine_store()->find_port(_dst_port_path);
}
-
+
if (_src_port == NULL || _dst_port == NULL) {
_error = PORT_NOT_FOUND;
QueuedEvent::pre_process();
@@ -109,18 +109,18 @@ DisconnectionEvent::pre_process()
_patch = dynamic_cast<PatchImpl*>(dst_node);
else
_patch = dynamic_cast<PatchImpl*>(src_node);
-
+
// Connection from a patch input to a patch output (pass through)
} else if (src_node == dst_node && dynamic_cast<PatchImpl*>(src_node)) {
_patch = dynamic_cast<PatchImpl*>(src_node);
-
+
// Normal connection between nodes with the same parent
} else {
_patch = src_node->parent_patch();
}
assert(_patch);
-
+
if (!_patch->has_connection(_src_output_port, _dst_input_port)) {
_error = NOT_CONNECTED;
QueuedEvent::pre_process();
@@ -132,7 +132,7 @@ DisconnectionEvent::pre_process()
QueuedEvent::pre_process();
return;
}
-
+
for (Raul::List<NodeImpl*>::iterator i = dst_node->providers()->begin(); i != dst_node->providers()->end(); ++i)
if ((*i) == src_node) {
delete dst_node->providers()->erase(i);
@@ -144,12 +144,12 @@ DisconnectionEvent::pre_process()
delete src_node->dependants()->erase(i);
break;
}
-
+
_patch_connection = _patch->remove_connection(_src_port, _dst_port);
-
+
if (_patch->enabled())
_compiled_patch = _patch->compile();
-
+
QueuedEvent::pre_process();
}
@@ -162,7 +162,7 @@ DisconnectionEvent::execute(ProcessContext& context)
if (_error == NO_ERROR) {
InputPort::Connections::Node* const port_connection
= _dst_input_port->remove_connection(_src_output_port);
-
+
if (port_connection != NULL) {
assert(_patch_connection);
@@ -177,11 +177,11 @@ DisconnectionEvent::execute(ProcessContext& context)
<< " -> " << _patch_connection->elem()->dst_port_path() << endl;
}
assert(port_connection->elem() == _patch_connection->elem());
-
+
// Destroy list node, which will drop reference to connection itself
_engine.maid()->push(port_connection);
_engine.maid()->push(_patch_connection);
-
+
if (_patch->compiled_patch() != NULL)
_engine.maid()->push(_patch->compiled_patch());
_patch->compiled_patch(_compiled_patch);
diff --git a/src/engine/events/DisconnectionEvent.hpp b/src/engine/events/DisconnectionEvent.hpp
index afca463a..178e27fe 100644
--- a/src/engine/events/DisconnectionEvent.hpp
+++ b/src/engine/events/DisconnectionEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -29,7 +29,7 @@ namespace Raul {
}
namespace Ingen {
-
+
class NodeImpl;
class ConnectionImpl;
class MidiMessage;
@@ -54,7 +54,7 @@ public:
void post_process();
private:
-
+
enum ErrorType {
NO_ERROR,
PARENT_PATCH_DIFFERENT,
@@ -64,10 +64,10 @@ private:
PARENTS_NOT_FOUND,
CONNECTION_NOT_FOUND
};
-
+
Raul::Path _src_port_path;
Raul::Path _dst_port_path;
-
+
PatchImpl* _patch;
PortImpl* _src_port;
PortImpl* _dst_port;
@@ -75,10 +75,10 @@ private:
InputPort* _dst_input_port;
bool _lookup;
-
+
PatchImpl::Connections::Node* _patch_connection;
CompiledPatch* _compiled_patch; ///< New process order for Patch
-
+
ErrorType _error;
};
diff --git a/src/engine/events/LoadPluginsEvent.cpp b/src/engine/events/LoadPluginsEvent.cpp
index 67fbed79..fd3b078b 100644
--- a/src/engine/events/LoadPluginsEvent.cpp
+++ b/src/engine/events/LoadPluginsEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -35,7 +35,7 @@ void
LoadPluginsEvent::pre_process()
{
_engine.node_factory()->load_plugins();
-
+
QueuedEvent::pre_process();
}
@@ -44,7 +44,7 @@ LoadPluginsEvent::post_process()
{
if (_source)
_source->unblock();
-
+
_responder->respond_ok();
}
diff --git a/src/engine/events/LoadPluginsEvent.hpp b/src/engine/events/LoadPluginsEvent.hpp
index 476cf3ad..b002a486 100644
--- a/src/engine/events/LoadPluginsEvent.hpp
+++ b/src/engine/events/LoadPluginsEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -34,7 +34,7 @@ public:
SharedPtr<Responder> responder,
SampleCount timestamp,
QueuedEventSource* source);
-
+
void pre_process();
void post_process();
};
diff --git a/src/engine/events/MidiLearnEvent.cpp b/src/engine/events/MidiLearnEvent.cpp
index 337acca3..dee10f61 100644
--- a/src/engine/events/MidiLearnEvent.cpp
+++ b/src/engine/events/MidiLearnEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -42,16 +42,16 @@ void
MidiLearnEvent::pre_process()
{
_node = _engine.engine_store()->find_node(_node_path);
-
+
QueuedEvent::pre_process();
}
void
MidiLearnEvent::execute(ProcessContext& context)
-{
+{
QueuedEvent::execute(context);
-
+
if (_node != NULL) {
if (_node->plugin_impl()->type() == Shared::Plugin::Internal) {
((NodeBase*)_node)->learn();
diff --git a/src/engine/events/MidiLearnEvent.hpp b/src/engine/events/MidiLearnEvent.hpp
index 149b81b7..fd1c6171 100644
--- a/src/engine/events/MidiLearnEvent.hpp
+++ b/src/engine/events/MidiLearnEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,13 +36,13 @@ class MidiLearnEvent : public QueuedEvent
{
public:
MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const Raul::Path& node_path);
-
+
void pre_process();
void execute(ProcessContext& context);
void post_process();
private:
- enum ErrorType {
+ enum ErrorType {
NO_ERROR,
INVALID_NODE_TYPE
};
diff --git a/src/engine/events/NoteEvent.cpp b/src/engine/events/NoteEvent.cpp
index 62fdff13..e323dd24 100644
--- a/src/engine/events/NoteEvent.cpp
+++ b/src/engine/events/NoteEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -69,9 +69,9 @@ NoteEvent::execute(ProcessContext& context)
// Lookup if neccessary
if (!_node)
_node = _engine.engine_store()->find_node(_node_path);
-
+
// FIXME: barf
-
+
if (_node != NULL && _node->plugin()->type() == Shared::Plugin::Internal) {
if (_on) {
if (_node->plugin_impl()->uri().str() == NS_INTERNALS "Note")
diff --git a/src/engine/events/NoteEvent.hpp b/src/engine/events/NoteEvent.hpp
index eac5b1f5..5944768b 100644
--- a/src/engine/events/NoteEvent.hpp
+++ b/src/engine/events/NoteEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -48,7 +48,7 @@ public:
bool on,
uint8_t note_num,
uint8_t velocity);
-
+
void execute(ProcessContext& context);
void post_process();
diff --git a/src/engine/events/PingQueuedEvent.hpp b/src/engine/events/PingQueuedEvent.hpp
index 08897bfe..00e52099 100644
--- a/src/engine/events/PingQueuedEvent.hpp
+++ b/src/engine/events/PingQueuedEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/RegisterClientEvent.cpp b/src/engine/events/RegisterClientEvent.cpp
index e78d0577..f8b72357 100644
--- a/src/engine/events/RegisterClientEvent.cpp
+++ b/src/engine/events/RegisterClientEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -39,7 +39,7 @@ RegisterClientEvent::RegisterClientEvent(Engine& engine,
void
RegisterClientEvent::pre_process()
-{
+{
_engine.broadcaster()->register_client(_uri, _client);
QueuedEvent::pre_process();
diff --git a/src/engine/events/RegisterClientEvent.hpp b/src/engine/events/RegisterClientEvent.hpp
index d75c92e6..c8cc66a3 100644
--- a/src/engine/events/RegisterClientEvent.hpp
+++ b/src/engine/events/RegisterClientEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/RenameEvent.cpp b/src/engine/events/RenameEvent.cpp
index 3ff5d254..a8c18503 100644
--- a/src/engine/events/RenameEvent.cpp
+++ b/src/engine/events/RenameEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -75,11 +75,11 @@ RenameEvent::pre_process()
= _engine.engine_store()->remove(_store_iterator);
assert(removed->size() > 0);
-
+
for (Table<Path, SharedPtr<Shared::GraphObject> >::iterator i = removed->begin(); i != removed->end(); ++i) {
const Path& child_old_path = i->first;
assert(Path::descendant_comparator(_old_path, child_old_path));
-
+
Path child_new_path;
if (child_old_path == _old_path)
child_new_path = _new_path;
@@ -100,7 +100,7 @@ void
RenameEvent::execute(ProcessContext& context)
{
QueuedEvent::execute(context);
-
+
SharedPtr<PortImpl> port = PtrCast<PortImpl>(_store_iterator->second);
if (port && port->parent()->parent() == NULL) {
DriverPort* driver_port = NULL;
@@ -120,7 +120,7 @@ void
RenameEvent::post_process()
{
string msg = "Unable to rename object - ";
-
+
if (_error == NO_ERROR) {
_responder->respond_ok();
_engine.broadcaster()->send_rename(_old_path, _new_path);
diff --git a/src/engine/events/RenameEvent.hpp b/src/engine/events/RenameEvent.hpp
index 23dd47b3..2d95706f 100644
--- a/src/engine/events/RenameEvent.hpp
+++ b/src/engine/events/RenameEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/RequestAllObjectsEvent.cpp b/src/engine/events/RequestAllObjectsEvent.cpp
index a4dbc1f2..93d2eca4 100644
--- a/src/engine/events/RequestAllObjectsEvent.cpp
+++ b/src/engine/events/RequestAllObjectsEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/RequestAllObjectsEvent.hpp b/src/engine/events/RequestAllObjectsEvent.hpp
index 9e4701a0..18eb3739 100644
--- a/src/engine/events/RequestAllObjectsEvent.hpp
+++ b/src/engine/events/RequestAllObjectsEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/RequestMetadataEvent.cpp b/src/engine/events/RequestMetadataEvent.cpp
index 14cbcfb3..4470f16f 100644
--- a/src/engine/events/RequestMetadataEvent.cpp
+++ b/src/engine/events/RequestMetadataEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -73,7 +73,7 @@ RequestMetadataEvent::pre_process()
_value = _resource->get_property(_key);
else
_value = dynamic_cast<GraphObjectImpl*>(_resource)->get_variable(_key);
-
+
QueuedEvent::pre_process();
}
diff --git a/src/engine/events/RequestMetadataEvent.hpp b/src/engine/events/RequestMetadataEvent.hpp
index df1b1acd..b60558d2 100644
--- a/src/engine/events/RequestMetadataEvent.hpp
+++ b/src/engine/events/RequestMetadataEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -53,10 +53,10 @@ private:
NONE,
PORT_VALUE
} _special_type;
-
+
Raul::URI _uri;
Raul::URI _key;
- Raul::Atom _value;
+ Raul::Atom _value;
Shared::ResourceImpl* _resource;
bool _is_property;
};
diff --git a/src/engine/events/RequestObjectEvent.cpp b/src/engine/events/RequestObjectEvent.cpp
index 7cce6588..15d7a160 100644
--- a/src/engine/events/RequestObjectEvent.cpp
+++ b/src/engine/events/RequestObjectEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -62,7 +62,7 @@ RequestObjectEvent::post_process()
{
if (!_object) {
_responder->respond_error("Unable to find object requested.");
- } else if (_responder->client()) {
+ } else if (_responder->client()) {
ObjectSender::send_object(_responder->client(), _object, true);
} else {
_responder->respond_error("Unable to find client to send object.");
diff --git a/src/engine/events/RequestObjectEvent.hpp b/src/engine/events/RequestObjectEvent.hpp
index 79db5b19..1e754891 100644
--- a/src/engine/events/RequestObjectEvent.hpp
+++ b/src/engine/events/RequestObjectEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -22,7 +22,7 @@
#include "types.hpp"
namespace Ingen {
-
+
class GraphObjectImpl;
diff --git a/src/engine/events/RequestPluginEvent.cpp b/src/engine/events/RequestPluginEvent.cpp
index 89371a8b..4dab7f53 100644
--- a/src/engine/events/RequestPluginEvent.cpp
+++ b/src/engine/events/RequestPluginEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -61,7 +61,7 @@ RequestPluginEvent::post_process()
{
if (!_plugin) {
_responder->respond_error("Unable to find plugin requested.");
-
+
} else if (_responder->client()) {
_responder->respond_ok();
diff --git a/src/engine/events/RequestPluginEvent.hpp b/src/engine/events/RequestPluginEvent.hpp
index eece8610..0d811c2f 100644
--- a/src/engine/events/RequestPluginEvent.hpp
+++ b/src/engine/events/RequestPluginEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -23,7 +23,7 @@
#include "types.hpp"
namespace Ingen {
-
+
class PluginImpl;
diff --git a/src/engine/events/RequestPluginsEvent.cpp b/src/engine/events/RequestPluginsEvent.cpp
index 8d7fc1ba..317fbe72 100644
--- a/src/engine/events/RequestPluginsEvent.cpp
+++ b/src/engine/events/RequestPluginsEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/RequestPluginsEvent.hpp b/src/engine/events/RequestPluginsEvent.hpp
index f6b41d7a..3ed4bd0c 100644
--- a/src/engine/events/RequestPluginsEvent.hpp
+++ b/src/engine/events/RequestPluginsEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/SendPortActivityEvent.cpp b/src/engine/events/SendPortActivityEvent.cpp
index 3a408d8d..d414c2a2 100644
--- a/src/engine/events/SendPortActivityEvent.cpp
+++ b/src/engine/events/SendPortActivityEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/SendPortActivityEvent.hpp b/src/engine/events/SendPortActivityEvent.hpp
index 29c7f1a8..051c1f44 100644
--- a/src/engine/events/SendPortActivityEvent.hpp
+++ b/src/engine/events/SendPortActivityEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -52,7 +52,7 @@ public:
inline void operator=(const SendPortActivityEvent& ev) {
_port = ev._port;
}
-
+
void post_process();
private:
diff --git a/src/engine/events/SendPortValueEvent.cpp b/src/engine/events/SendPortValueEvent.cpp
index d3fb0d36..0adbc919 100644
--- a/src/engine/events/SendPortValueEvent.cpp
+++ b/src/engine/events/SendPortValueEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,7 +30,7 @@ void
SendPortValueEvent::post_process()
{
// FIXME...
-
+
if (_omni) {
_engine.broadcaster()->send_port_value(_port->path(), _value);
} else {
diff --git a/src/engine/events/SendPortValueEvent.hpp b/src/engine/events/SendPortValueEvent.hpp
index 8eaaee1a..dbd75337 100644
--- a/src/engine/events/SendPortValueEvent.hpp
+++ b/src/engine/events/SendPortValueEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -60,7 +60,7 @@ public:
_voice_num = ev._voice_num;
_value = ev._value;
}
-
+
void post_process();
private:
diff --git a/src/engine/events/SetMetadataEvent.cpp b/src/engine/events/SetMetadataEvent.cpp
index ea4e9129..9eb77779 100644
--- a/src/engine/events/SetMetadataEvent.cpp
+++ b/src/engine/events/SetMetadataEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -62,7 +62,7 @@ SetMetadataEvent::pre_process()
_object = _engine.engine_store()->find_object(Path(_subject.str()));
else
_object = _engine.node_factory()->plugin(_subject);
-
+
if (_object == NULL) {
_error = NOT_FOUND;
QueuedEvent::pre_process();
@@ -76,7 +76,7 @@ SetMetadataEvent::pre_process()
_object->set_property(_key, _value);
else
dynamic_cast<GraphObjectImpl*>(_object)->set_variable(_key, _value);
-
+
_patch = dynamic_cast<PatchImpl*>(_object);
if (_key.str() == "ingen:broadcast") {
@@ -143,7 +143,7 @@ SetMetadataEvent::execute(ProcessContext& context)
break;
default:
_success = true;
- }
+ }
QueuedEvent::execute(context);
}
diff --git a/src/engine/events/SetMetadataEvent.hpp b/src/engine/events/SetMetadataEvent.hpp
index 70292682..b57c2716 100644
--- a/src/engine/events/SetMetadataEvent.hpp
+++ b/src/engine/events/SetMetadataEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -44,7 +44,7 @@ public:
const Raul::URI& subject,
const Raul::URI& key,
const Raul::Atom& value);
-
+
void pre_process();
void execute(ProcessContext& context);
void post_process();
diff --git a/src/engine/events/SetPortValueEvent.cpp b/src/engine/events/SetPortValueEvent.cpp
index 1c07af95..1626c973 100644
--- a/src/engine/events/SetPortValueEvent.cpp
+++ b/src/engine/events/SetPortValueEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -52,7 +52,7 @@ SetPortValueEvent::SetPortValueEvent(Engine& engine,
, _omni(true)
, _voice_num(0)
, _port_path(port_path)
- , _value(value)
+ , _value(value)
, _port(NULL)
, _error(NO_ERROR)
{
@@ -72,7 +72,7 @@ SetPortValueEvent::SetPortValueEvent(Engine& engine,
, _omni(false)
, _voice_num(voice_num)
, _port_path(port_path)
- , _value(value)
+ , _value(value)
, _port(NULL)
, _error(NO_ERROR)
{
@@ -100,7 +100,7 @@ SetPortValueEvent::pre_process()
apply(0, 0);
_engine.message_context()->run(_port->parent_node());
}
-
+
QueuedEvent::pre_process();
}
@@ -110,10 +110,10 @@ SetPortValueEvent::execute(ProcessContext& context)
{
Event::execute(context);
assert(_time >= context.start() && _time <= context.end());
-
+
if (_port && _port->context() == Context::MESSAGE)
return;
-
+
apply(context.start(), context.nframes());
}
@@ -151,19 +151,19 @@ SetPortValueEvent::apply(uint32_t start, uint32_t nframes)
}
return;
}
-
+
EventBuffer* const ebuf = dynamic_cast<EventBuffer*>(buf);
const LV2Features::Feature* f = _engine.world()->lv2_features->feature(LV2_URI_MAP_URI);
LV2URIMap* map = (LV2URIMap*)f->controller;
-
+
// FIXME: eliminate lookups
// FIXME: need a proper prefix system
if (ebuf && _value.type() == Atom::BLOB) {
const uint32_t frames = std::max(
(uint32_t)(_time - start),
ebuf->latest_frames());
-
+
// Size 0 event, pass it along to the plugin as a typed but empty event
if (_value.data_size() == 0) {
cout << "BANG!" << endl;
diff --git a/src/engine/events/SetPortValueEvent.hpp b/src/engine/events/SetPortValueEvent.hpp
index f1385e26..200a9964 100644
--- a/src/engine/events/SetPortValueEvent.hpp
+++ b/src/engine/events/SetPortValueEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -28,7 +28,7 @@ class PortImpl;
/** An event to change the value of a port.
- *
+ *
* This event can either be queued or immediate, depending on the queued
* parameter passed to the constructor. It must be passed to the appropriate
* place (ie queued event passed to the event queue and non-queued event
@@ -45,7 +45,7 @@ public:
SampleCount timestamp,
const Raul::Path& port_path,
const Raul::Atom& value);
-
+
SetPortValueEvent(Engine& engine,
SharedPtr<Responder> responder,
bool queued,
@@ -68,9 +68,9 @@ private:
ILLEGAL_VOICE,
TYPE_MISMATCH
};
-
+
void apply(uint32_t start, uint32_t nframes);
-
+
bool _queued;
bool _omni;
uint32_t _voice_num;
diff --git a/src/engine/events/UnregisterClientEvent.cpp b/src/engine/events/UnregisterClientEvent.cpp
index 3a79adc1..d5591405 100644
--- a/src/engine/events/UnregisterClientEvent.cpp
+++ b/src/engine/events/UnregisterClientEvent.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/events/UnregisterClientEvent.hpp b/src/engine/events/UnregisterClientEvent.hpp
index f62940fa..96b72158 100644
--- a/src/engine/events/UnregisterClientEvent.hpp
+++ b/src/engine/events/UnregisterClientEvent.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/ingen.lv2/ingen_lv2.cpp b/src/engine/ingen.lv2/ingen_lv2.cpp
index 67b63fc5..d3693f6b 100644
--- a/src/engine/ingen.lv2/ingen_lv2.cpp
+++ b/src/engine/ingen.lv2/ingen_lv2.cpp
@@ -1,6 +1,6 @@
/* Ingen.LV2 - A thin wrapper which allows Ingen to run as an LV2 plugin.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
@@ -52,24 +52,24 @@ struct IngenLV2Driver : public Ingen::AudioDriver {
_root_patch->process(_context);
_frame_time += nframes;
}
-
+
virtual void set_root_patch(PatchImpl* patch) {}
virtual PatchImpl* root_patch() { return NULL; }
-
+
virtual void add_port(DriverPort* port) {}
virtual DriverPort* remove_port(const Raul::Path& path) { return NULL; }
-
+
virtual DriverPort* create_port(DuplexPort* patch_port) { return NULL; }
-
+
virtual DriverPort* driver_port(const Raul::Path& path) { return NULL; }
-
+
virtual SampleCount buffer_size() const { return _buffer_size; }
virtual SampleCount sample_rate() const { return _sample_rate; }
virtual SampleCount frame_time() const { return _frame_time;}
virtual bool is_realtime() const { return true; }
virtual ProcessContext& context() { return _context; }
-
+
private:
ProcessContext _context;
PatchImpl* _root_patch;
@@ -123,11 +123,11 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
plugin->world = Ingen::Shared::get_world();
plugin->engine = SharedPtr<Engine>(new Engine(plugin->world));
plugin->world->local_engine = plugin->engine;
-
+
// FIXME: fixed buffer size
plugin->engine->set_driver(DataType::AUDIO,
SharedPtr<Driver>(new IngenLV2Driver(*plugin->engine, rate, 4096)));
-
+
return (LV2_Handle)plugin;
}
diff --git a/src/engine/ingen_engine.cpp b/src/engine/ingen_engine.cpp
index f56392cf..c19f5954 100644
--- a/src/engine/ingen_engine.cpp
+++ b/src/engine/ingen_engine.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/ingen_engine.hpp b/src/engine/ingen_engine.hpp
index 93b426ac..6bb15a73 100644
--- a/src/engine/ingen_engine.hpp
+++ b/src/engine/ingen_engine.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/tuning.hpp b/src/engine/tuning.hpp
index 7ec55ae4..288cb484 100644
--- a/src/engine/tuning.hpp
+++ b/src/engine/tuning.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -22,9 +22,9 @@
#include <time.h>
namespace Ingen {
-
+
// FIXME: put this in a Config class
-
+
static const size_t event_queue_size = 1024;
static const size_t pre_processor_queue_size = 1024;
static const size_t post_processor_queue_size = 1024;
diff --git a/src/engine/types.hpp b/src/engine/types.hpp
index 52d423b9..7ff2b1c3 100644
--- a/src/engine/types.hpp
+++ b/src/engine/types.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/engine/util.hpp b/src/engine/util.hpp
index 7cca59d6..335da1d1 100644
--- a/src/engine/util.hpp
+++ b/src/engine/util.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA