diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-07-09 12:03:22 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-07-09 12:03:22 -0400 |
commit | 3fae5f15afb29ba059a7524f24feb1547272cd01 (patch) | |
tree | 97982f490cab68cf08dffeace031ee127d8ab30a /libs/ardour/audio_diskstream.cc | |
parent | f2699194d37112a98815332fdb1fcf7102bd0b92 (diff) |
fix crash initiated by never configuring track write sources when reloading a session, caused by earlier commits to avoid unnecessary write source resets
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index e0086fa295..ea5a7e6bfa 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,12 @@ AudioDiskstream::non_realtime_input_change () return; } + boost::shared_ptr<ChannelList> cr = channels.reader(); + if (!cr->empty() && !cr->front()->write_source) { + need_write_sources = true; + cerr << name() << " no write sources!\n"; + } + if (input_change_pending.type == IOChange::ConfigurationChanged) { RCUWriter<ChannelList> writer (channels); boost::shared_ptr<ChannelList> c = writer.get_copy(); @@ -169,7 +175,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 +189,7 @@ AudioDiskstream::non_realtime_input_change () /* implicit unlock */ } - if (need_new_write_sources) { + if (need_write_sources) { reset_write_sources (false); } |