Force Disk-Reader channel count to match Disk-Writer I/O.
This handles some special cases where a plugin is added after
the disk-writer but before the disk-reader.
The plugin may add/remove ports (e.g. an instrument: MIDI to audio,
or some stereo to mono processors). However we need to ensure
that any data that is recorded will be played back.
This is a new take replacing b2bc934e2
.
This commit is contained in:
parent
c8f1146124
commit
89bd6cafa0
@ -464,6 +464,11 @@ Route::process_output_buffers (BufferSet& bufs,
|
||||
|
||||
bool re_inject_oob_data = false;
|
||||
if ((*i) == _disk_reader) {
|
||||
/* ignore port-count from prior plugins, use DR's count.
|
||||
* see also Route::try_configure_processors_unlocked
|
||||
*/
|
||||
bufs.set_count ((*i)->output_streams());
|
||||
|
||||
/* Well now, we've made it past the disk-writer and to the disk-reader.
|
||||
* Time to decide what to do about monitoring.
|
||||
*
|
||||
@ -1751,8 +1756,15 @@ Route::try_configure_processors_unlocked (ChanCount in, ProcessorStreams* err)
|
||||
DEBUG_TRACE (DEBUG::Processors, string_compose ("%1: configure processors\n", _name));
|
||||
DEBUG_TRACE (DEBUG::Processors, "{\n");
|
||||
|
||||
ChanCount disk_io = in;
|
||||
|
||||
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++index) {
|
||||
|
||||
if (boost::dynamic_pointer_cast<DiskReader> (*p)) {
|
||||
/* disk-reader has the same i/o as disk-writer */
|
||||
in = max (in, disk_io);
|
||||
}
|
||||
|
||||
if ((*p)->can_support_io_configuration(in, out)) {
|
||||
|
||||
if (boost::dynamic_pointer_cast<Delivery> (*p)
|
||||
@ -1822,6 +1834,14 @@ Route::try_configure_processors_unlocked (ChanCount in, ProcessorStreams* err)
|
||||
return list<pair<ChanCount, ChanCount> > ();
|
||||
}
|
||||
}
|
||||
|
||||
if (boost::dynamic_pointer_cast<DiskWriter> (*p)) {
|
||||
assert (in == out);
|
||||
disk_io = out;
|
||||
}
|
||||
|
||||
|
||||
/* next processor's in == this processor's out*/
|
||||
in = out;
|
||||
} else {
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user