X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=blobdiff_plain;f=libs%2Fardour%2Fplugin_insert.cc;fp=libs%2Fardour%2Fplugin_insert.cc;h=b24d065b5bc3ad275334d3e49244bbb449d12c1a;hp=23c9f8eb7ade080209ad41ec68da242375b5a150;hb=8d6d0b323268fc779e796e36a4ad69d2ca965324;hpb=e4c7cb1e750f835854797d0b765353f187e9f148 diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 23c9f8eb7a..b24d065b5b 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -824,14 +824,14 @@ PluginInsert::inplace_silence_unconnected (BufferSet& bufs, const PinMappings& o void PluginInsert::connect_and_run (BufferSet& bufs, samplepos_t start, samplepos_t end, double speed, pframes_t nframes, samplecnt_t offset, bool with_auto) { - // TODO: atomically copy maps & _no_inplace - PinMappings in_map (_in_map); - PinMappings out_map (_out_map); - ChanMapping thru_map (_thru_map); - if (_mapping_changed) { // ToDo use a counters, increment until match. + if (_mapping_changed) { // ToDo use a counter, increment until match _no_inplace = check_inplace (); _mapping_changed = false; } + // TODO: atomically copy maps & _no_inplace + PinMappings in_map (_in_map); // TODO Split case below overrides, use const& in_map + PinMappings const& out_map (_out_map); + ChanMapping const& thru_map (_thru_map); if (_latency_changed) { /* delaylines are configured with the max possible latency (as reported by the plugin) @@ -1081,14 +1081,13 @@ PluginInsert::bypass (BufferSet& bufs, pframes_t nframes) /* bypass the plugin(s) not the whole processor. * -> use mappings just like connect_and_run */ - - // TODO: atomically copy maps & _no_inplace - const ChanMapping in_map (no_sc_input_map ()); - const ChanMapping out_map (output_map ()); if (_mapping_changed) { _no_inplace = check_inplace (); _mapping_changed = false; } + // TODO: atomically copy maps & _no_inplace + ChanMapping const& in_map (no_sc_input_map ()); + ChanMapping const& out_map (output_map ()); bufs.set_count(ChanCount::max(bufs.count(), _configured_internal)); bufs.set_count(ChanCount::max(bufs.count(), _configured_out)); @@ -1198,8 +1197,8 @@ PluginInsert::silence (samplecnt_t nframes, samplepos_t start_sample) _delaybuffers.flush (); - ChanMapping in_map (natural_input_streams ()); - ChanMapping out_map (natural_output_streams ()); + const ChanMapping in_map (natural_input_streams ()); + const ChanMapping out_map (natural_output_streams ()); ChanCount maxbuf = ChanCount::max (natural_input_streams (), natural_output_streams()); #ifdef MIXBUS if (is_channelstrip ()) { @@ -1646,7 +1645,7 @@ PluginInsert::check_inplace () * * but allows in-port 1 -> sink-pin 2 || source-pin 2 -> out port 1 */ - ChanMapping in_map (input_map ()); + ChanMapping const& in_map (input_map ()); const ChanMapping::Mappings out_m (output_map ().mappings ()); for (ChanMapping::Mappings::const_iterator t = out_m.begin (); t != out_m.end () && inplace_ok; ++t) { for (ChanMapping::TypeMapping::const_iterator c = (*t).second.begin (); c != (*t).second.end () ; ++c) {