summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/PortImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-13 18:01:56 +0000
committerDavid Robillard <d@drobilla.net>2007-10-13 18:01:56 +0000
commit4d440f54870cd3934a49bab1ae98fad3f13f00d4 (patch)
treeca9d31bfc41215e2b80e4b6fd980a7ef5801a0a4 /src/libs/engine/PortImpl.cpp
parent7ca2e0c1a67c12954e04d2175cbb488efc426a85 (diff)
downloadingen-4d440f54870cd3934a49bab1ae98fad3f13f00d4.tar.gz
ingen-4d440f54870cd3934a49bab1ae98fad3f13f00d4.tar.bz2
ingen-4d440f54870cd3934a49bab1ae98fad3f13f00d4.zip
Send polyphonic state on object creation.
git-svn-id: http://svn.drobilla.net/lad/ingen@881 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/PortImpl.cpp')
-rw-r--r--src/libs/engine/PortImpl.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libs/engine/PortImpl.cpp b/src/libs/engine/PortImpl.cpp
index 7ef4a82a..800ba011 100644
--- a/src/libs/engine/PortImpl.cpp
+++ b/src/libs/engine/PortImpl.cpp
@@ -39,7 +39,7 @@ PortImpl::PortImpl(NodeImpl* const node,
uint32_t poly,
DataType type,
size_t buffer_size)
- : GraphObjectImpl(node, name, true)
+ : GraphObjectImpl(node, name, (type == DataType::AUDIO || type == DataType::CONTROL))
, _index(index)
, _poly(poly)
, _buffer_size(buffer_size)
@@ -73,6 +73,16 @@ PortImpl::~PortImpl()
delete _buffers;
}
+
+bool
+PortImpl::set_polyphonic(Raul::Maid& maid, bool p)
+{
+ if (_type == DataType::CONTROL || _type == DataType::AUDIO)
+ return GraphObjectImpl::set_polyphonic(maid, p);
+ else
+ return (!p);
+}
+
bool
PortImpl::prepare_poly(uint32_t poly)