13
0

only reset AudioDiskstream write sources if the I/O configuration changed. Do not do this for connection changes etc.

This commit is contained in:
Paul Davis 2014-07-09 10:09:14 -04:00
parent d99b6f0662
commit b37e3229f7

View File

@ -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 */