mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
channel config changes during ::configure_io() must be scoped to ensure they are complete before signals are sent
This commit is contained in:
parent
9ce5ac9678
commit
b8f16a16d0
1 changed files with 15 additions and 10 deletions
|
|
@ -147,11 +147,13 @@ DiskIOProcessor::configure_io (ChanCount in, ChanCount out)
|
|||
{
|
||||
DEBUG_TRACE (DEBUG::DiskIO, string_compose ("Configuring %1 for in:%2 out:%3\n", name(), in, out));
|
||||
|
||||
bool changed = false;
|
||||
|
||||
{
|
||||
RCUWriter<ChannelList> writer (channels);
|
||||
boost::shared_ptr<ChannelList> c = writer.get_copy();
|
||||
|
||||
uint32_t n_audio = in.n_audio();
|
||||
bool changed = false;
|
||||
|
||||
if (n_audio > c->size()) {
|
||||
add_channel_to (c, n_audio - c->size());
|
||||
|
|
@ -161,6 +163,9 @@ DiskIOProcessor::configure_io (ChanCount in, ChanCount out)
|
|||
changed = true;
|
||||
}
|
||||
|
||||
/* writer leaves scope, actual channel list is updated */
|
||||
}
|
||||
|
||||
if (in.n_midi() > 0 && !_midi_buf) {
|
||||
const size_t size = _session.butler()->midi_diskstream_buffer_size();
|
||||
_midi_buf = new MidiRingBuffer<framepos_t>(size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue