From c0af61632938f161dd2e15dec3c5260a3d5427ca Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Sep 2007 21:39:53 +0000 Subject: Work towards port monitoring and better (higher utilization) parallel execution. git-svn-id: http://svn.drobilla.net/lad/ingen@784 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/OutputPort.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/libs/engine/OutputPort.cpp') diff --git a/src/libs/engine/OutputPort.cpp b/src/libs/engine/OutputPort.cpp index 9724c4c7..b7da8956 100644 --- a/src/libs/engine/OutputPort.cpp +++ b/src/libs/engine/OutputPort.cpp @@ -16,7 +16,8 @@ */ #include "OutputPort.hpp" -#include "Buffer.hpp" +#include "AudioBuffer.hpp" +#include "ProcessContext.hpp" namespace Ingen { @@ -29,6 +30,15 @@ OutputPort::pre_process(SampleCount nframes, FrameTime start, FrameTime end) } +void +OutputPort::process(ProcessContext& context, SampleCount nframes, FrameTime start, FrameTime end) +{ + if (_monitor && _type == DataType::FLOAT && _buffer_size == 1) { + context.event_sink().control_change(this, ((AudioBuffer*)(*_buffers)[0])->value_at(0)); + } +} + + void OutputPort::post_process(SampleCount nframes, FrameTime start, FrameTime end) { -- cgit v1.2.1