X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudio_diskstream.cc;h=60b21bbc22c1fa5c24a2acc1f9ca96d851a1ae0c;hb=c95c221493e03ee029223531d459c14b4d4d392d;hp=e0086fa2950d5b0919b0d39741999d1444584927;hpb=b37e3229f79afdda9a37021f5dd8d4655b754be6;p=ardour.git diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index e0086fa295..60b21bbc22 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -148,7 +148,7 @@ AudioDiskstream::free_working_buffers() void AudioDiskstream::non_realtime_input_change () { - bool need_new_write_sources = false; + bool need_write_sources = false; { Glib::Threads::Mutex::Lock lm (state_lock); @@ -157,6 +157,11 @@ AudioDiskstream::non_realtime_input_change () return; } + boost::shared_ptr cr = channels.reader(); + if (!cr->empty() && !cr->front()->write_source) { + need_write_sources = true; + } + if (input_change_pending.type == IOChange::ConfigurationChanged) { RCUWriter writer (channels); boost::shared_ptr c = writer.get_copy(); @@ -169,7 +174,7 @@ AudioDiskstream::non_realtime_input_change () remove_channel_from (c, _n_channels.n_audio() - _io->n_ports().n_audio()); } - need_new_write_sources = true; + need_write_sources = true; } if (input_change_pending.type & IOChange::ConnectionsChanged) { @@ -183,7 +188,7 @@ AudioDiskstream::non_realtime_input_change () /* implicit unlock */ } - if (need_new_write_sources) { + if (need_write_sources) { reset_write_sources (false); }