diff options
author | David Robillard <d@drobilla.net> | 2018-09-23 19:39:56 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-23 19:39:56 +0200 |
commit | 3d117ed9a00c3fdbcb07327d6669aa26c3821720 (patch) | |
tree | abe73ae30112c9f9cd5c665bf618d84b6b8bf3bd /src/server/InputPort.cpp | |
parent | 5a42be72e788864736425fbf1fe0e884767a483f (diff) | |
download | ingen-3d117ed9a00c3fdbcb07327d6669aa26c3821720.tar.gz ingen-3d117ed9a00c3fdbcb07327d6669aa26c3821720.tar.bz2 ingen-3d117ed9a00c3fdbcb07327d6669aa26c3821720.zip |
Enforce that arc buffer can only be accessed in run context
Diffstat (limited to 'src/server/InputPort.cpp')
-rw-r--r-- | src/server/InputPort.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index a9ff1738..76382270 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -115,7 +115,7 @@ InputPort::setup_buffers(RunContext& ctx, BufferFactory& bufs, uint32_t poly) if (_arcs.size() == 1 && !is_a(PortType::ATOM) && !_arcs.front().must_mix()) { // Single non-mixing connection, use buffers directly for (uint32_t v = 0; v < poly; ++v) { - _voices->at(v).buffer = _arcs.front().buffer(v); + _voices->at(v).buffer = _arcs.front().buffer(ctx, v); } return false; } @@ -158,7 +158,7 @@ InputPort::pre_process(RunContext& context) } else if (direct_connect()) { // Directly connected, use source's buffer directly for (uint32_t v = 0; v < _poly; ++v) { - _voices->at(v).buffer = _arcs.front().buffer(v); + _voices->at(v).buffer = _arcs.front().buffer(context, v); } } else { // Mix down to local buffers in pre_run() @@ -194,13 +194,13 @@ InputPort::pre_run(RunContext& context) // P -> 1 or 1 -> 1: all tail voices => each head voice for (uint32_t w = 0; w < arc.tail()->poly(); ++w) { assert(n_srcs < max_n_srcs); - srcs[n_srcs++] = arc.buffer(w, context.offset()).get(); + srcs[n_srcs++] = arc.buffer(context, w).get(); assert(srcs[n_srcs - 1]); } } else { // P -> P or 1 -> P: tail voice => corresponding head voice assert(n_srcs < max_n_srcs); - srcs[n_srcs++] = arc.buffer(v, context.offset()).get(); + srcs[n_srcs++] = arc.buffer(context, v).get(); assert(srcs[n_srcs - 1]); } } |