diff options
author | David Robillard <d@drobilla.net> | 2010-02-25 20:40:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-25 20:40:13 +0000 |
commit | 77a9beca75debd2d87d735fc4fe847694eee6f13 (patch) | |
tree | ae03699b999e84bc4c283abfd215c8037ecddaf6 /src/engine/InputPort.cpp | |
parent | e22984efe9b82ab006494aea93814a592cd44ece (diff) | |
download | ingen-77a9beca75debd2d87d735fc4fe847694eee6f13.tar.gz ingen-77a9beca75debd2d87d735fc4fe847694eee6f13.tar.bz2 ingen-77a9beca75debd2d87d735fc4fe847694eee6f13.zip |
Work on contexts and polymorphic ports.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2492 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/InputPort.cpp')
-rw-r--r-- | src/engine/InputPort.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/InputPort.cpp b/src/engine/InputPort.cpp index f9ddbfe2..d5051865 100644 --- a/src/engine/InputPort.cpp +++ b/src/engine/InputPort.cpp @@ -93,7 +93,7 @@ InputPort::get_buffers(BufferFactory& bufs, Raul::Array<BufferFactory::Ref>* buf size_t num_connections = (ThreadManager::current_thread_id() == THREAD_PROCESS) ? _connections.size() : _num_connections; - if (_type == PortType::AUDIO && num_connections == 0) { + if (buffer_type() == PortType::AUDIO && num_connections == 0) { // Audio input with no connections, use shared zero buffer for (uint32_t v = 0; v < poly; ++v) buffers->at(v) = bufs.silent_buffer(); @@ -113,7 +113,7 @@ InputPort::get_buffers(BufferFactory& bufs, Raul::Array<BufferFactory::Ref>* buf // Use local buffers for (uint32_t v = 0; v < poly; ++v) { buffers->at(v) = NULL; // Release first (potential immediate recycling) - buffers->at(v) = _bufs.get(_type, _buffer_size); + buffers->at(v) = _bufs.get(buffer_type(), _buffer_size); buffers->at(v)->clear(); } } @@ -136,7 +136,7 @@ InputPort::add_connection(Connections::Node* const c) _connections.push_back(c); // Automatically broadcast connected control inputs - if (_type == PortType::CONTROL) + if (is_a(PortType::CONTROL)) _broadcast = true; } @@ -170,7 +170,7 @@ InputPort::remove_connection(ProcessContext& context, const OutputPort* src_port } // Turn off broadcasting if we're no longer connected - if (_type == PortType::CONTROL && _connections.size() == 0) + if (is_a(PortType::CONTROL) && _connections.size() == 0) _broadcast = false; return connection; |