allow zero-input (i.e. tone generator) processors to be added
git-svn-id: svn://localhost/ardour2/branches/3.0@8950 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0193803126
commit
e1905c1c29
@ -612,6 +612,20 @@ PluginInsert::can_support_io_configuration (const ChanCount& in, ChanCount& out)
|
|||||||
ChanCount inputs = _plugins[0]->get_info()->n_inputs;
|
ChanCount inputs = _plugins[0]->get_info()->n_inputs;
|
||||||
ChanCount outputs = _plugins[0]->get_info()->n_outputs;
|
ChanCount outputs = _plugins[0]->get_info()->n_outputs;
|
||||||
|
|
||||||
|
bool no_inputs = true;
|
||||||
|
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
|
||||||
|
if (inputs.get (*t) != 0) {
|
||||||
|
no_inputs = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (no_inputs) {
|
||||||
|
/* no inputs so we can take any input configuration since we throw it away */
|
||||||
|
out = outputs;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Plugin inputs match requested inputs exactly
|
// Plugin inputs match requested inputs exactly
|
||||||
if (inputs == in) {
|
if (inputs == in) {
|
||||||
out = outputs;
|
out = outputs;
|
||||||
@ -624,12 +638,15 @@ PluginInsert::can_support_io_configuration (const ChanCount& in, ChanCount& out)
|
|||||||
uint32_t f = 0;
|
uint32_t f = 0;
|
||||||
bool can_replicate = true;
|
bool can_replicate = true;
|
||||||
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
|
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
|
||||||
|
|
||||||
|
uint32_t nin = inputs.get (*t);
|
||||||
|
|
||||||
// No inputs of this type
|
// No inputs of this type
|
||||||
if (inputs.get(*t) == 0 && in.get(*t) == 0) {
|
if (nin == 0 && in.get(*t) == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputs.get(*t) != 1 || outputs.get (*t) != 1) {
|
if (nin != 1 || outputs.get (*t) != 1) {
|
||||||
can_replicate = false;
|
can_replicate = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -637,11 +654,11 @@ PluginInsert::can_support_io_configuration (const ChanCount& in, ChanCount& out)
|
|||||||
// Potential factor not set yet
|
// Potential factor not set yet
|
||||||
|
|
||||||
if (f == 0) {
|
if (f == 0) {
|
||||||
f = in.get(*t) / inputs.get(*t);;
|
f = in.get(*t) / nin;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Factor for this type does not match another type, can not replicate
|
// Factor for this type does not match another type, can not replicate
|
||||||
if (f != (in.get(*t) / inputs.get(*t))) {
|
if (f != (in.get(*t) / nin)) {
|
||||||
can_replicate = false;
|
can_replicate = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -503,13 +503,17 @@ Route::process_output_buffers (BufferSet& bufs,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bufs.count() != (*i)->input_streams()) {
|
#ifndef NDEBUG
|
||||||
cerr << _name << " bufs = " << bufs.count()
|
/* if it has any inputs, make sure they match */
|
||||||
<< " input for " << (*i)->name() << " = " << (*i)->input_streams()
|
if ((*i)->input_streams() != ChanCount::ZERO) {
|
||||||
<< endl;
|
if (bufs.count() != (*i)->input_streams()) {
|
||||||
}
|
cerr << _name << " bufs = " << bufs.count()
|
||||||
assert (bufs.count() == (*i)->input_streams());
|
<< " input for " << (*i)->name() << " = " << (*i)->input_streams()
|
||||||
|
<< endl;
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* should we NOT run plugins here if the route is inactive?
|
/* should we NOT run plugins here if the route is inactive?
|
||||||
do we catch route != active somewhere higher?
|
do we catch route != active somewhere higher?
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user