summaryrefslogtreecommitdiffstats
path: root/src/server/BlockImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/BlockImpl.cpp')
-rw-r--r--src/server/BlockImpl.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp
index 26e83eb8..d4285832 100644
--- a/src/server/BlockImpl.cpp
+++ b/src/server/BlockImpl.cpp
@@ -25,6 +25,7 @@
#include "lv2/urid/urid.h"
#include "raul/Array.hpp"
+#include "raul/Maid.hpp"
#include "raul/Symbol.hpp"
#include <cassert>
@@ -32,8 +33,7 @@
#include <initializer_list>
#include <string>
-namespace ingen {
-namespace server {
+namespace ingen::server {
BlockImpl::BlockImpl(PluginImpl* plugin,
const raul::Symbol& symbol,
@@ -43,10 +43,7 @@ BlockImpl::BlockImpl(PluginImpl* plugin,
: NodeImpl(plugin->uris(), parent, symbol)
, _plugin(plugin)
, _polyphony((polyphonic && parent) ? parent->internal_poly() : 1)
- , _mark(Mark::UNVISITED)
, _polyphonic(polyphonic)
- , _activated(false)
- , _enabled(true)
{
assert(_plugin);
assert(_polyphony > 0);
@@ -204,13 +201,15 @@ BlockImpl::bypass(RunContext& ctx)
}
// Dumb bypass
- for (PortType t : { PortType::AUDIO, PortType::CV, PortType::ATOM }) {
+ for (const PortType t : { PortType::AUDIO, PortType::CV, PortType::ATOM }) {
for (uint32_t i = 0;; ++i) {
PortImpl* in = nth_port_by_type(i, true, t);
PortImpl* out = nth_port_by_type(i, false, t);
if (!out) {
- break; // Finished writing all outputs
- } else if (in) {
+ break; // Finished writing all outputs
+ }
+
+ if (in) {
// Copy corresponding input to output
for (uint32_t v = 0; v < _polyphony; ++v) {
out->buffer(v)->copy(ctx, in->buffer(v).get());
@@ -298,5 +297,4 @@ BlockImpl::set_port_buffer(uint32_t, uint32_t, const BufferRef&, SampleCount)
<< " buffer " << buf << " offset " << offset << std::endl;*/
}
-} // namespace server
-} // namespace ingen
+} // namespace ingen::server