diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-07-09 10:09:14 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-07-09 10:09:14 -0400 |
commit | b37e3229f79afdda9a37021f5dd8d4655b754be6 (patch) | |
tree | 80b3212cc12eeddfe8738b24bcd26f927ae0ae10 /libs/ardour/audio_diskstream.cc | |
parent | d99b6f0662c9cda80ab3c2ff6b01da153c03e02f (diff) |
only reset AudioDiskstream write sources if the I/O configuration changed. Do not do this for connection changes etc.
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 0d2c664e48..e0086fa295 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -148,6 +148,8 @@ AudioDiskstream::free_working_buffers() void AudioDiskstream::non_realtime_input_change () { + bool need_new_write_sources = false; + { Glib::Threads::Mutex::Lock lm (state_lock); @@ -166,6 +168,8 @@ AudioDiskstream::non_realtime_input_change () } else if (_io->n_ports().n_audio() < _n_channels.n_audio()) { remove_channel_from (c, _n_channels.n_audio() - _io->n_ports().n_audio()); } + + need_new_write_sources = true; } if (input_change_pending.type & IOChange::ConnectionsChanged) { @@ -179,9 +183,9 @@ AudioDiskstream::non_realtime_input_change () /* implicit unlock */ } - /* reset capture files */ - - reset_write_sources (false); + if (need_new_write_sources) { + reset_write_sources (false); + } /* now refill channel buffers */ |