13
0

add back some missing logic to can-replicate

git-svn-id: svn://localhost/ardour2/branches/3.0@8743 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-02-07 17:14:40 +00:00
parent eb012ac243
commit a9d331aa98

View File

@ -621,7 +621,7 @@ PluginInsert::can_support_io_configuration (const ChanCount& in, ChanCount& out)
// See if replication is possible
// We allow replication only for plugins with either zero or 1 inputs and outputs
// for every valid data type.
uint32_t f = 1;
uint32_t f = 0;
bool can_replicate = true;
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
// No inputs of this type
@ -633,6 +633,18 @@ PluginInsert::can_support_io_configuration (const ChanCount& in, ChanCount& out)
can_replicate = false;
break;
}
// Potential factor not set yet
if (f == 0) {
f = in.get(*t) / inputs.get(*t);;
}
// Factor for this type does not match another type, can not replicate
if (f != (in.get(*t) / inputs.get(*t))) {
can_replicate = false;
break;
}
}
if (can_replicate) {