diff options
author | David Robillard <d@drobilla.net> | 2012-08-12 05:16:58 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-12 05:16:58 +0000 |
commit | 65a81eec8943dc0504b8b8755f9866ee4993372c (patch) | |
tree | 65ba6d09f13bee9c40fe5f82185174ce388134b0 /src | |
parent | e49cb96073f514edbe1b7a9854b49c47af35463c (diff) | |
download | ingen-65a81eec8943dc0504b8b8755f9866ee4993372c.tar.gz ingen-65a81eec8943dc0504b8b8755f9866ee4993372c.tar.bz2 ingen-65a81eec8943dc0504b8b8755f9866ee4993372c.zip |
Remove message context cruft.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4668 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/server/BufferFactory.cpp | 6 | ||||
-rw-r--r-- | src/server/BufferFactory.hpp | 5 | ||||
-rw-r--r-- | src/server/DuplexPort.cpp | 10 | ||||
-rw-r--r-- | src/server/DuplexPort.hpp | 6 | ||||
-rw-r--r-- | src/server/EdgeImpl.cpp | 1 | ||||
-rw-r--r-- | src/server/Engine.cpp | 8 | ||||
-rw-r--r-- | src/server/Engine.hpp | 4 | ||||
-rw-r--r-- | src/server/InputPort.cpp | 13 | ||||
-rw-r--r-- | src/server/InputPort.hpp | 6 | ||||
-rw-r--r-- | src/server/JackDriver.cpp | 7 | ||||
-rw-r--r-- | src/server/MessageContext.cpp | 112 | ||||
-rw-r--r-- | src/server/MessageContext.hpp | 103 | ||||
-rw-r--r-- | src/server/NodeFactory.cpp | 6 | ||||
-rw-r--r-- | src/server/NodeImpl.cpp | 2 | ||||
-rw-r--r-- | src/server/NodeImpl.hpp | 4 | ||||
-rw-r--r-- | src/server/OutputPort.cpp | 10 | ||||
-rw-r--r-- | src/server/OutputPort.hpp | 6 | ||||
-rw-r--r-- | src/server/PatchImpl.cpp | 4 | ||||
-rw-r--r-- | src/server/PortImpl.cpp | 6 | ||||
-rw-r--r-- | src/server/PortImpl.hpp | 10 | ||||
-rw-r--r-- | src/server/Worker.cpp | 1 | ||||
-rw-r--r-- | src/server/events/Connect.cpp | 7 | ||||
-rw-r--r-- | src/server/events/Disconnect.cpp | 12 | ||||
-rw-r--r-- | src/server/events/SetPortValue.cpp | 10 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 1 | ||||
-rw-r--r-- | src/server/wscript | 1 |
26 files changed, 60 insertions, 301 deletions
diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp index 98bb0def..a295611f 100644 --- a/src/server/BufferFactory.cpp +++ b/src/server/BufferFactory.cpp @@ -89,9 +89,9 @@ BufferFactory::default_size(LV2_URID type) const } BufferRef -BufferFactory::get(Context& context, - LV2_URID type, +BufferFactory::get(LV2_URID type, uint32_t capacity, + bool real_time, bool force_create) { Raul::AtomicPtr<Buffer>& head_ptr = free_list(type); @@ -108,7 +108,7 @@ BufferFactory::get(Context& context, } if (!try_head) { - if (!_engine.is_process_context(context)) { + if (!real_time) { return create(type, capacity); } else { assert(false); diff --git a/src/server/BufferFactory.hpp b/src/server/BufferFactory.hpp index 242cf31a..e466e969 100644 --- a/src/server/BufferFactory.hpp +++ b/src/server/BufferFactory.hpp @@ -39,7 +39,6 @@ class URIs; namespace Server { -class Context; class Engine; class BufferFactory { @@ -50,9 +49,9 @@ public: static uint32_t audio_buffer_size(SampleCount nframes); uint32_t default_size(LV2_URID type) const; - BufferRef get(Context& context, - LV2_URID type, + BufferRef get(LV2_URID type, uint32_t capacity, + bool real_time, bool force_create = false); BufferRef silent_buffer(); diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp index c7b81dc8..bbfdbd11 100644 --- a/src/server/DuplexPort.cpp +++ b/src/server/DuplexPort.cpp @@ -49,15 +49,15 @@ DuplexPort::DuplexPort(BufferFactory& bufs, } bool -DuplexPort::get_buffers(Context& context, - BufferFactory& bufs, +DuplexPort::get_buffers(BufferFactory& bufs, Raul::Array<BufferRef>* buffers, - uint32_t poly) const + uint32_t poly, + bool real_time) const { if (_is_output) { - return InputPort::get_buffers(context, bufs, buffers, poly); + return InputPort::get_buffers(bufs, buffers, poly, real_time); } else { - return OutputPort::get_buffers(context, bufs, buffers, poly); + return OutputPort::get_buffers(bufs, buffers, poly, real_time); } } diff --git a/src/server/DuplexPort.hpp b/src/server/DuplexPort.hpp index 5371680d..f52d1494 100644 --- a/src/server/DuplexPort.hpp +++ b/src/server/DuplexPort.hpp @@ -55,10 +55,10 @@ public: uint32_t max_tail_poly(Context& context) const; - bool get_buffers(Context& context, - BufferFactory& bufs, + bool get_buffers(BufferFactory& bufs, Raul::Array<BufferRef>* buffers, - uint32_t poly) const; + uint32_t poly, + bool real_time) const; void pre_process(Context& context); void post_process(Context& context); diff --git a/src/server/EdgeImpl.cpp b/src/server/EdgeImpl.cpp index 4a3c5ce9..b044e5c5 100644 --- a/src/server/EdgeImpl.cpp +++ b/src/server/EdgeImpl.cpp @@ -23,7 +23,6 @@ #include "EdgeImpl.hpp" #include "Engine.hpp" #include "InputPort.hpp" -#include "MessageContext.hpp" #include "NodeImpl.hpp" #include "OutputPort.hpp" #include "PortImpl.hpp" diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 9779ef90..e89bb3ea 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -33,7 +33,6 @@ #include "EngineStore.hpp" #include "Event.hpp" #include "EventWriter.hpp" -#include "MessageContext.hpp" #include "NodeFactory.hpp" #include "PatchImpl.hpp" #include "PostProcessor.hpp" @@ -61,7 +60,6 @@ Engine::Engine(Ingen::World* a_world) , _event_writer(new EventWriter(*this)) , _root_patch(NULL) , _worker(new Worker(event_queue_size())) - , _message_context(*this) , _process_context(*this) , _quit_flag(false) , _direct_driver(true) @@ -183,7 +181,6 @@ Engine::activate() _buffer_factory->set_block_length(_driver->block_length()); _pre_processor->start(); - _message_context.Thread::start(); const Ingen::URIs& uris = world()->uris(); Forge& forge = world()->forge(); @@ -297,11 +294,6 @@ Engine::run(uint32_t sample_count) control_bindings()->post_process( _process_context, _root_patch->port_impl(1)->buffer(0).get()); - // Signal message context to run if necessary - if (_message_context.has_requests()) { - _message_context.signal(_process_context); - } - return n_processed_events; } diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp index c4290d60..a54367d3 100644 --- a/src/server/Engine.hpp +++ b/src/server/Engine.hpp @@ -24,7 +24,6 @@ #include "raul/SharedPtr.hpp" #include "ProcessContext.hpp" -#include "MessageContext.hpp" namespace Raul { class Maid; } @@ -41,7 +40,6 @@ class Driver; class EngineStore; class Event; class EventWriter; -class MessageContext; class NodeFactory; class PostProcessor; class PreProcessor; @@ -104,7 +102,6 @@ public: PatchImpl* root_patch() const { return _root_patch; } Worker* worker() const { return _worker; } - MessageContext& message_context() { return _message_context; } ProcessContext& process_context() { return _process_context; } SharedPtr<EngineStore> engine_store() const; @@ -126,7 +123,6 @@ private: PatchImpl* _root_patch; Worker* _worker; - MessageContext _message_context; ProcessContext _process_context; bool _quit_flag; diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index 6ac2eb5e..8e50e3b8 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -75,13 +75,12 @@ InputPort::apply_poly(ProcessContext& context, Raul::Maid& maid, uint32_t poly) * @return true iff buffers are locally owned by the port */ bool -InputPort::get_buffers(Context& context, - BufferFactory& bufs, +InputPort::get_buffers(BufferFactory& bufs, Raul::Array<BufferRef>* buffers, - uint32_t poly) const + uint32_t poly, + bool real_time) const { - const bool is_process_context = bufs.engine().is_process_context(context); - size_t num_edges = is_process_context ? _edges.size() : _num_edges; + const size_t num_edges = real_time ? _edges.size() : _num_edges; if (is_a(PortType::AUDIO) && num_edges == 0) { // Audio input with no edges, use shared zero buffer @@ -91,7 +90,7 @@ InputPort::get_buffers(Context& context, return false; } else if (num_edges == 1) { - if (is_process_context) { + if (real_time) { if (!_edges.front().must_mix()) { // Single non-mixing connection, use buffers directly for (uint32_t v = 0; v < poly; ++v) { @@ -105,7 +104,7 @@ InputPort::get_buffers(Context& context, // Otherwise, allocate local buffers for (uint32_t v = 0; v < poly; ++v) { buffers->at(v).reset(); - buffers->at(v) = bufs.get(context, buffer_type(), _buffer_size); + buffers->at(v) = bufs.get(buffer_type(), _buffer_size, real_time); buffers->at(v)->clear(); } return true; diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp index d933344a..f26ad78e 100644 --- a/src/server/InputPort.hpp +++ b/src/server/InputPort.hpp @@ -76,10 +76,10 @@ public: bool apply_poly(ProcessContext& context, Raul::Maid& maid, uint32_t poly); - bool get_buffers(Context& context, - BufferFactory& bufs, + bool get_buffers(BufferFactory& bufs, Raul::Array<BufferRef>* buffers, - uint32_t poly) const; + uint32_t poly, + bool real_time) const; void pre_process(Context& context); void post_process(Context& context); diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index 3f6ed5c0..8d4c13cc 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -37,7 +37,6 @@ #include "DuplexPort.hpp" #include "Engine.hpp" #include "JackDriver.hpp" -#include "MessageContext.hpp" #include "PatchImpl.hpp" #include "PortImpl.hpp" #include "ThreadManager.hpp" @@ -60,9 +59,9 @@ JackPort::JackPort(JackDriver* driver, DuplexPort* patch_port) , _driver(driver) , _jack_port(NULL) { - patch_port->setup_buffers(driver->_engine.message_context(), - *driver->_engine.buffer_factory(), - patch_port->poly()); + patch_port->setup_buffers(*driver->_engine.buffer_factory(), + patch_port->poly(), + false); create(); } diff --git a/src/server/MessageContext.cpp b/src/server/MessageContext.cpp deleted file mode 100644 index fd43596c..00000000 --- a/src/server/MessageContext.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - This file is part of Ingen. - Copyright 2007-2012 David Robillard <http://drobilla.net/> - - Ingen is free software: you can redistribute it and/or modify it under the - terms of the GNU Affero General Public License as published by the Free - Software Foundation, either version 3 of the License, or 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 Affero General Public License for details. - - You should have received a copy of the GNU Affero General Public License - along with Ingen. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <algorithm> - -#include "raul/log.hpp" - -#include "Engine.hpp" -#include "MessageContext.hpp" -#include "NodeImpl.hpp" -#include "ThreadManager.hpp" - -using namespace std; - -namespace Ingen { -namespace Server { - -MessageContext::MessageContext(Engine& engine) - : Context(engine, MESSAGE) - , Raul::Thread("MessageContext") - , _sem(0) - , _requests(engine.event_queue_size()) - , _end_time(0) -{ -} - -void -MessageContext::run(Context& context, NodeImpl* node, FrameTime time) -{ - if (_engine.is_process_context(context)) { - const Request r(time, node); - _requests.write(sizeof(Request), &r); - // signal() will be called at the end of this process cycle - } else { - assert(node); - Glib::Mutex::Lock lock(_mutex); - _non_rt_request = Request(time, node); - _sem.post(); - _cond.wait(_mutex); - } -} - -void -MessageContext::_run() -{ - ThreadManager::set_flag(THREAD_MESSAGE); - - Request req; - while (true) { - _sem.wait(); - - // Enqueue a request from the pre-process thread - { - Glib::Mutex::Lock lock(_mutex); - const Request req = _non_rt_request; - if (req.node) { - _queue.insert(req); - _end_time = std::max(_end_time, req.time); - _cond.broadcast(); // Notify caller we got the message - } - } - - // Enqueue (and thereby sort) requests from audio thread - while (has_requests()) { - _requests.read(sizeof(Request), &req); - if (req.node) { - _queue.insert(req); - } else { - _end_time = req.time; - break; - } - } - - // Run events in time increasing order - // Note that executing nodes may insert further events into the queue - while (!_queue.empty()) { - const Request req = *_queue.begin(); - - // Break if all events during this cycle have been consumed - // (the queue may contain generated events with later times) - if (req.time > _end_time) { - break; - } - - _queue.erase(_queue.begin()); - execute(req); - } - } -} - -void -MessageContext::execute(const Request& req) -{ - NodeImpl* node = req.node; - node->message_process(*this); -} - -} // namespace Server -} // namespace Ingen diff --git a/src/server/MessageContext.hpp b/src/server/MessageContext.hpp deleted file mode 100644 index 1ec238d4..00000000 --- a/src/server/MessageContext.hpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - This file is part of Ingen. - Copyright 2007-2012 David Robillard <http://drobilla.net/> - - Ingen is free software: you can redistribute it and/or modify it under the - terms of the GNU Affero General Public License as published by the Free - Software Foundation, either version 3 of the License, or 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 Affero General Public License for details. - - You should have received a copy of the GNU Affero General Public License - along with Ingen. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef INGEN_ENGINE_MESSAGECONTEXT_HPP -#define INGEN_ENGINE_MESSAGECONTEXT_HPP - -#include <set> -#include <glibmm/thread.h> -#include "raul/Thread.hpp" -#include "raul/Semaphore.hpp" -#include "raul/AtomicPtr.hpp" -#include "lv2/lv2plug.in/ns/ext/atom/atom.h" -#include "Context.hpp" -#include "ProcessContext.hpp" -#include "ThreadManager.hpp" - -namespace Ingen { -namespace Server { - -class NodeImpl; - -/** Context of a work() call. - * - * The message context is a non-hard-realtime thread used to execute things - * that can take too long to execute in an audio thread, and do sloppy timed - * event propagation and scheduling. - * - * \ingroup engine - */ -class MessageContext : public Context, public Raul::Thread -{ -public: - explicit MessageContext(Engine& engine); - - /** Schedule a message context run at a certain time. - * Safe to call from either process thread or pre-process thread. - */ - void run(Context& context, NodeImpl* node, FrameTime time); - -protected: - struct Request { - Request(FrameTime t=0, NodeImpl* n=0) : time(t), node(n) {} - FrameTime time; - NodeImpl* node; - }; - -public: - /** Signal the end of a cycle that has produced messages. - * AUDIO THREAD ONLY. - */ - inline void signal(ProcessContext& context) { - const Request cycle_end_request(context.end(), NULL); - _requests.write(sizeof(Request), &cycle_end_request); - _sem.post(); - } - - /** Return true iff requests are pending. Safe from any thread. */ - inline bool has_requests() const { - return _requests.read_space() >= sizeof(Request); - } - -protected: - /** Thread run method (wait for and execute requests from process thread */ - void _run(); - - /** Execute a request (possibly enqueueing more requests) */ - void execute(const Request& req); - - Raul::Semaphore _sem; - Raul::RingBuffer _requests; - Glib::Mutex _mutex; - Glib::Cond _cond; - Request _non_rt_request; - - struct RequestEarlier { - bool operator()(const Request& r1, const Request& r2) { - return r1.time < r2.time; - } - }; - - typedef std::set<Request, RequestEarlier> Queue; - Queue _queue; - FrameTime _end_time; -}; - -} // namespace Server -} // namespace Ingen - -#endif // INGEN_ENGINE_MESSAGECONTEXT_HPP - diff --git a/src/server/NodeFactory.cpp b/src/server/NodeFactory.cpp index 1544b98b..4bf19036 100644 --- a/src/server/NodeFactory.cpp +++ b/src/server/NodeFactory.cpp @@ -59,6 +59,7 @@ NodeFactory::plugins() { ThreadManager::assert_thread(THREAD_PRE_PROCESS); if (!_has_loaded) { + _has_loaded = true; // TODO: Plugin list refreshing load_lv2_plugins(); _has_loaded = true; @@ -120,7 +121,10 @@ NodeFactory::load_lv2_plugins() const string uri(lilv_node_as_uri(lilv_plugin_get_uri(lv2_plug))); - assert(_plugins.find(uri) == _plugins.end()); + if (_plugins.find(uri) != _plugins.end()) { + Raul::warn(Raul::fmt("Already discovered <%s>\n") % uri); + continue; + } LV2Plugin* const plugin = new LV2Plugin(_lv2_info, uri); diff --git a/src/server/NodeImpl.cpp b/src/server/NodeImpl.cpp index bf17d325..f3277a2d 100644 --- a/src/server/NodeImpl.cpp +++ b/src/server/NodeImpl.cpp @@ -80,7 +80,7 @@ NodeImpl::activate(BufferFactory& bufs) for (uint32_t p = 0; p < num_ports(); ++p) { PortImpl* const port = _ports->at(p); - port->setup_buffers(bufs.engine().message_context(), bufs, port->poly()); + port->setup_buffers(bufs, port->poly(), false); port->connect_buffers(); port->clear_buffers(); } diff --git a/src/server/NodeImpl.hpp b/src/server/NodeImpl.hpp index 0b44e58e..4649cdaa 100644 --- a/src/server/NodeImpl.hpp +++ b/src/server/NodeImpl.hpp @@ -43,7 +43,6 @@ namespace Server { class Buffer; class BufferFactory; class Context; -class MessageContext; class PatchImpl; class PluginImpl; class PortImpl; @@ -90,9 +89,6 @@ public: /** Learn the next incoming MIDI event (for internals) */ virtual void learn() {} - /** Run the node for one instant in the non-realtime worker thread. */ - virtual void message_process(MessageContext& context) {} - /** Do whatever needs doing in the process thread before process() is called */ virtual void pre_process(ProcessContext& context); diff --git a/src/server/OutputPort.cpp b/src/server/OutputPort.cpp index 6b5ba5ed..7558dda3 100644 --- a/src/server/OutputPort.cpp +++ b/src/server/OutputPort.cpp @@ -44,17 +44,17 @@ OutputPort::OutputPort(BufferFactory& bufs, _broadcast = true; - setup_buffers(bufs.engine().message_context(), bufs, poly); + setup_buffers(bufs, poly, false); } bool -OutputPort::get_buffers(Context& context, - BufferFactory& bufs, +OutputPort::get_buffers(BufferFactory& bufs, Raul::Array<BufferRef>* buffers, - uint32_t poly) const + uint32_t poly, + bool real_time) const { for (uint32_t v = 0; v < poly; ++v) - buffers->at(v) = bufs.get(context, buffer_type(), _buffer_size); + buffers->at(v) = bufs.get(buffer_type(), _buffer_size, real_time); return true; } diff --git a/src/server/OutputPort.hpp b/src/server/OutputPort.hpp index 0ca62d5d..d2e6672e 100644 --- a/src/server/OutputPort.hpp +++ b/src/server/OutputPort.hpp @@ -51,10 +51,10 @@ public: virtual ~OutputPort() {} - bool get_buffers(Context& context, - BufferFactory& bufs, + bool get_buffers(BufferFactory& bufs, Raul::Array<BufferRef>* buffers, - uint32_t poly) const; + uint32_t poly, + bool real_time) const; void pre_process(Context& context); void post_process(Context& context); diff --git a/src/server/PatchImpl.cpp b/src/server/PatchImpl.cpp index 1cda21a0..35badeb6 100644 --- a/src/server/PatchImpl.cpp +++ b/src/server/PatchImpl.cpp @@ -126,14 +126,14 @@ PatchImpl::apply_internal_poly(ProcessContext& context, for (uint32_t j = 0; j < (*i)->num_ports(); ++j) { PortImpl* const port = (*i)->port_impl(j); if (port->is_input() && dynamic_cast<InputPort*>(port)->direct_connect()) - port->setup_buffers(context, bufs, port->poly()); + port->setup_buffers(bufs, port->poly(), true); port->connect_buffers(); } } const bool polyphonic = parent_patch() && (poly == parent_patch()->internal_poly_process()); for (Ports::iterator i = _outputs.begin(); i != _outputs.end(); ++i) - (*i)->setup_buffers(context, bufs, polyphonic ? poly : 1); + (*i)->setup_buffers(bufs, polyphonic ? poly : 1, true); _poly_process = poly; return true; diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index 61d358c7..b7eaa5d4 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -230,10 +230,10 @@ PortImpl::prepare_poly(BufferFactory& bufs, uint32_t poly) if (!_prepared_set_states) _prepared_set_states = new Raul::Array<SetState>(poly, *_set_states, SetState()); - get_buffers(bufs.engine().message_context(), - bufs, + get_buffers(bufs, _prepared_buffers, - _prepared_buffers->size()); + _prepared_buffers->size(), + false); return true; } diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index e55448f5..8a38e261 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -115,13 +115,13 @@ public: /** Empty buffer contents completely (ie silence) */ virtual void clear_buffers(); - virtual bool get_buffers(Context& context, - BufferFactory& bufs, + virtual bool get_buffers(BufferFactory& bufs, Raul::Array<BufferRef>* buffers, - uint32_t poly) const = 0; + uint32_t poly, + bool real_time) const = 0; - void setup_buffers(Context& context, BufferFactory& bufs, uint32_t poly) { - get_buffers(context, bufs, _buffers, poly); + void setup_buffers(BufferFactory& bufs, uint32_t poly, bool real_time) { + get_buffers(bufs, _buffers, poly, real_time); } virtual void connect_buffers(); diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp index 4664eb06..d17482bf 100644 --- a/src/server/Worker.cpp +++ b/src/server/Worker.cpp @@ -20,7 +20,6 @@ #include "Driver.hpp" #include "Engine.hpp" -#include "MessageContext.hpp" #include "LV2Node.hpp" #include "PatchImpl.hpp" #include "Worker.hpp" diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index e4468c3a..39252a13 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -125,9 +125,10 @@ Connect::pre_process() } _buffers = new Raul::Array<BufferRef>(_head->poly()); - _head->get_buffers(_engine.message_context(), - *_engine.buffer_factory(), - _buffers, _head->poly()); + _head->get_buffers(*_engine.buffer_factory(), + _buffers, + _head->poly(), + false); if (_patch->enabled()) { _compiled_patch = _patch->compile(); diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index a3d472eb..7823a709 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -91,10 +91,10 @@ Disconnect::Impl::Impl(Engine& e, if (_dst_input_port->num_edges() == 0) { _buffers = new Raul::Array<BufferRef>(_dst_input_port->poly()); - _dst_input_port->get_buffers(_engine.message_context(), - *_engine.buffer_factory(), + _dst_input_port->get_buffers(*_engine.buffer_factory(), _buffers, - _dst_input_port->poly()); + _dst_input_port->poly(), + false); const bool is_control = _dst_input_port->is_a(PortType::CONTROL) || _dst_input_port->is_a(PortType::CV); @@ -183,9 +183,9 @@ Disconnect::Impl::execute(ProcessContext& context, bool set_dst_buffers) if (_buffers) { _engine.maid()->push(_dst_input_port->set_buffers(context, _buffers)); } else { - _dst_input_port->setup_buffers(context, - *_engine.buffer_factory(), - _dst_input_port->poly()); + _dst_input_port->setup_buffers(*_engine.buffer_factory(), + _dst_input_port->poly(), + true); } _dst_input_port->connect_buffers(); } else { diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp index 139bbd78..f3d68f9b 100644 --- a/src/server/events/SetPortValue.cpp +++ b/src/server/events/SetPortValue.cpp @@ -25,7 +25,6 @@ #include "Driver.hpp" #include "Engine.hpp" #include "EngineStore.hpp" -#include "MessageContext.hpp" #include "NodeImpl.hpp" #include "PortImpl.hpp" #include "ProcessContext.hpp" @@ -59,15 +58,6 @@ SetPortValue::pre_process() return Event::pre_process_done(DIRECTION_MISMATCH, _port->path()); } - // Port is on a message context node, set value and run - if (_port->parent_node()->context() == Context::MESSAGE) { - apply(_engine.message_context()); - _engine.message_context().run( - _engine.message_context(), - _port->parent_node(), - _engine.driver()->frame_time() + _engine.driver()->block_length()); - } - // Set value metadata (does not affect buffers) _port->set_value(_value); _port->set_property(_engine.world()->uris().ingen_value, _value); diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index 9c688b18..bb566113 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -38,6 +38,7 @@ #include "ingen/Store.hpp" #include "ingen/World.hpp" #include "ingen/runtime_paths.hpp" +#include "raul/Semaphore.hpp" #include "raul/SharedPtr.hpp" #include "raul/Thread.hpp" #include "raul/log.hpp" diff --git a/src/server/wscript b/src/server/wscript index a0c26bff..0ca0a90a 100644 --- a/src/server/wscript +++ b/src/server/wscript @@ -19,7 +19,6 @@ def build(bld): LV2Info.cpp LV2Node.cpp LV2Plugin.cpp - MessageContext.cpp NodeFactory.cpp NodeImpl.cpp OutputPort.cpp |