summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Connect.cpp8
-rw-r--r--src/server/events/Connect.hpp24
-rw-r--r--src/server/events/Disconnect.cpp16
-rw-r--r--src/server/events/Disconnect.hpp10
4 files changed, 29 insertions, 29 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index 75659452..13faabd4 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -46,7 +46,7 @@ Connect::Connect(Engine& engine,
, _graph(NULL)
, _head(NULL)
, _compiled_graph(NULL)
- , _buffers(NULL)
+ , _voices(NULL)
{}
bool
@@ -129,9 +129,9 @@ Connect::pre_process()
_head->inherit_neighbour(tail_output, _head_remove, _head_add);
}
- _buffers = new Raul::Array<BufferRef>(_head->poly());
+ _voices = new Raul::Array<PortImpl::Voice>(_head->poly());
_head->get_buffers(*_engine.buffer_factory(),
- _buffers,
+ _voices,
_head->poly(),
false);
@@ -147,7 +147,7 @@ Connect::execute(ProcessContext& context)
{
if (_status == Status::SUCCESS) {
_head->add_arc(context, _arc.get());
- _engine.maid()->dispose(_head->set_buffers(context, _buffers));
+ _engine.maid()->dispose(_head->set_voices(context, _voices));
_head->connect_buffers();
_graph->set_compiled_graph(_compiled_graph);
}
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp
index d5e58a99..0750fbdc 100644
--- a/src/server/events/Connect.hpp
+++ b/src/server/events/Connect.hpp
@@ -20,8 +20,8 @@
#include "raul/Path.hpp"
#include "Event.hpp"
+#include "PortImpl.hpp"
#include "types.hpp"
-#include "BufferRef.hpp"
namespace Raul {
template <typename T> class Array;
@@ -57,17 +57,17 @@ public:
void post_process();
private:
- const Raul::Path _tail_path;
- const Raul::Path _head_path;
- GraphImpl* _graph;
- InputPort* _head;
- CompiledGraph* _compiled_graph;
- SPtr<ArcImpl> _arc;
- Raul::Array<BufferRef>* _buffers;
- Resource::Properties _tail_remove;
- Resource::Properties _tail_add;
- Resource::Properties _head_remove;
- Resource::Properties _head_add;
+ const Raul::Path _tail_path;
+ const Raul::Path _head_path;
+ GraphImpl* _graph;
+ InputPort* _head;
+ CompiledGraph* _compiled_graph;
+ SPtr<ArcImpl> _arc;
+ Raul::Array<PortImpl::Voice>* _voices;
+ Resource::Properties _tail_remove;
+ Resource::Properties _tail_add;
+ Resource::Properties _head_remove;
+ Resource::Properties _head_add;
};
} // namespace Events
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index a9b30a60..3ea94796 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -62,7 +62,7 @@ Disconnect::Impl::Impl(Engine& e,
, _src_output_port(s)
, _dst_input_port(d)
, _arc(graph->remove_arc(_src_output_port, _dst_input_port))
- , _buffers(NULL)
+ , _voices(NULL)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
@@ -88,21 +88,21 @@ Disconnect::Impl::Impl(Engine& e,
_dst_input_port->decrement_num_arcs();
if (_dst_input_port->num_arcs() == 0) {
- _buffers = new Raul::Array<BufferRef>(_dst_input_port->poly());
+ _voices = new Raul::Array<PortImpl::Voice>(_dst_input_port->poly());
_dst_input_port->get_buffers(*_engine.buffer_factory(),
- _buffers,
+ _voices,
_dst_input_port->poly(),
false);
const bool is_control = _dst_input_port->is_a(PortType::CONTROL) ||
_dst_input_port->is_a(PortType::CV);
const float value = is_control ? _dst_input_port->value().get<float>() : 0;
- for (uint32_t i = 0; i < _buffers->size(); ++i) {
+ for (uint32_t i = 0; i < _voices->size(); ++i) {
if (is_control) {
- Buffer* buf = _buffers->at(i).get();
+ Buffer* buf = _voices->at(i).buffer.get();
buf->set_block(value, 0, buf->nframes());
} else {
- _buffers->at(i)->clear();
+ _voices->at(i).buffer->clear();
}
}
}
@@ -179,8 +179,8 @@ Disconnect::Impl::execute(ProcessContext& context, bool set_dst_buffers)
}
if (set_dst_buffers) {
- if (_buffers) {
- _engine.maid()->dispose(_dst_input_port->set_buffers(context, _buffers));
+ if (_voices) {
+ _engine.maid()->dispose(_dst_input_port->set_voices(context, _voices));
} else {
_dst_input_port->setup_buffers(*_engine.buffer_factory(),
_dst_input_port->poly(),
diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp
index de176d34..058104f6 100644
--- a/src/server/events/Disconnect.hpp
+++ b/src/server/events/Disconnect.hpp
@@ -68,11 +68,11 @@ public:
inline InputPort* head() { return _dst_input_port; }
private:
- Engine& _engine;
- OutputPort* _src_output_port;
- InputPort* _dst_input_port;
- SPtr<ArcImpl> _arc;
- Raul::Array<BufferRef>* _buffers;
+ Engine& _engine;
+ OutputPort* _src_output_port;
+ InputPort* _dst_input_port;
+ SPtr<ArcImpl> _arc;
+ Raul::Array<PortImpl::Voice>* _voices;
};
private: