mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +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,18 +147,23 @@ DiskIOProcessor::configure_io (ChanCount in, ChanCount out)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::DiskIO, string_compose ("Configuring %1 for in:%2 out:%3\n", name(), in, out));
|
DEBUG_TRACE (DEBUG::DiskIO, string_compose ("Configuring %1 for in:%2 out:%3\n", name(), in, out));
|
||||||
|
|
||||||
RCUWriter<ChannelList> writer (channels);
|
|
||||||
boost::shared_ptr<ChannelList> c = writer.get_copy();
|
|
||||||
|
|
||||||
uint32_t n_audio = in.n_audio();
|
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
if (n_audio > c->size()) {
|
{
|
||||||
add_channel_to (c, n_audio - c->size());
|
RCUWriter<ChannelList> writer (channels);
|
||||||
changed = true;
|
boost::shared_ptr<ChannelList> c = writer.get_copy();
|
||||||
} else if (n_audio < c->size()) {
|
|
||||||
remove_channel_from (c, c->size() - n_audio);
|
uint32_t n_audio = in.n_audio();
|
||||||
changed = true;
|
|
||||||
|
if (n_audio > c->size()) {
|
||||||
|
add_channel_to (c, n_audio - c->size());
|
||||||
|
changed = true;
|
||||||
|
} else if (n_audio < c->size()) {
|
||||||
|
remove_channel_from (c, c->size() - n_audio);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* writer leaves scope, actual channel list is updated */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in.n_midi() > 0 && !_midi_buf) {
|
if (in.n_midi() > 0 && !_midi_buf) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue