diff options
author | David Robillard <d@drobilla.net> | 2008-08-13 23:12:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-13 23:12:52 +0000 |
commit | ef22788409473e8fbc04b41c90027bbd7f34a9df (patch) | |
tree | 1e12db1e7eeb473d8678fb8f7b47a7d52af4c58d /src/libs/engine/InputPort.cpp | |
parent | 6d9179c30b56bb7be97e702951c393727d96cf05 (diff) | |
download | ingen-ef22788409473e8fbc04b41c90027bbd7f34a9df.tar.gz ingen-ef22788409473e8fbc04b41c90027bbd7f34a9df.tar.bz2 ingen-ef22788409473e8fbc04b41c90027bbd7f34a9df.zip |
Fix race condition resulting in duplicate connections if several identical requests come in rapid succession.
git-svn-id: http://svn.drobilla.net/lad/ingen@1359 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/InputPort.cpp')
-rw-r--r-- | src/libs/engine/InputPort.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp index 8aa73e2c..b778579d 100644 --- a/src/libs/engine/InputPort.cpp +++ b/src/libs/engine/InputPort.cpp @@ -55,6 +55,19 @@ InputPort::set_buffer_size(size_t size) } + +bool +InputPort::apply_poly(Raul::Maid& maid, uint32_t poly) +{ + if (!_polyphonic || !_parent->polyphonic()) + return true; + + for (Connections::iterator c = _connections.begin(); c != _connections.end(); ++c) + ((ConnectionImpl*)c->get())->apply_poly(maid, poly); + + return PortImpl::apply_poly(maid, poly); +} + /** Add a connection. Realtime safe. * @@ -138,7 +151,7 @@ InputPort::remove_connection(const OutputPort* src_port) /** Returns whether this port is connected to the passed port. */ -bool +/*bool InputPort::is_connected_to(const OutputPort* port) const { for (Connections::const_iterator i = _connections.begin(); i != _connections.end(); ++i) @@ -146,7 +159,7 @@ InputPort::is_connected_to(const OutputPort* port) const return true; return false; -} +}*/ /** Prepare buffer for access, mixing if necessary. Realtime safe. |