diff options
author | Robin Gareus <robin@gareus.org> | 2019-04-07 19:36:35 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-04-07 19:52:12 +0200 |
commit | 1ba391ab110dc1623171168e60016de8f21c2e30 (patch) | |
tree | 2cde3040c644f0ad02603dcb1550dec99bc46fb2 /libs/ardour | |
parent | 73816d3e384219cebf27c1bcedb7cf30d732026a (diff) |
Fix bounce-process: skip all processors before disk-reader
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/route.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 2f3f53306f..793c18d20c 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -543,12 +543,21 @@ Route::bounce_process (BufferSet& buffers, samplepos_t start, samplecnt_t nframe _trim->setup_gain_automation (start, start + nframes, nframes); latency = 0; + bool seen_disk_io = false; for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { if (!include_endpoint && (*i) == endpoint) { break; } + if (!for_export && !seen_disk_io) { + if (boost::dynamic_pointer_cast<DiskReader> (*i)) { + seen_disk_io = true; + buffers.set_count ((*i)->output_streams()); + } + continue; + } + /* if we're *not* exporting, stop processing if we come across a routing processor. */ if (!for_export && boost::dynamic_pointer_cast<PortInsert>(*i)) { break; @@ -593,10 +602,17 @@ Route::bounce_get_latency (boost::shared_ptr<Processor> endpoint, return latency; } + bool seen_disk_io = false; for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) { if (!include_endpoint && (*i) == endpoint) { break; } + if (!for_export && !seen_disk_io) { + if (boost::dynamic_pointer_cast<DiskReader> (*i)) { + seen_disk_io = true; + } + continue; + } if (!for_export && boost::dynamic_pointer_cast<PortInsert>(*i)) { break; } |