mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 06:36:29 +01:00
Remove dangling plugin thru-connections
fixes crash when removing a thru-connected output
This commit is contained in:
parent
277893b130
commit
8f367ddaa0
1 changed files with 12 additions and 1 deletions
|
|
@ -1172,7 +1172,7 @@ PluginInsert::sanitize_maps ()
|
|||
/* strip dead wood */
|
||||
PinMappings new_ins;
|
||||
PinMappings new_outs;
|
||||
ChanMapping new_thru (_thru_map);
|
||||
ChanMapping new_thru;
|
||||
|
||||
for (uint32_t pc = 0; pc < get_count(); ++pc) {
|
||||
ChanMapping new_in;
|
||||
|
|
@ -1216,6 +1216,17 @@ PluginInsert::sanitize_maps ()
|
|||
}
|
||||
}
|
||||
|
||||
/* remove excess thru */
|
||||
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
|
||||
for (uint32_t o = 0; o < _configured_out.get (*t); ++o) {
|
||||
bool valid;
|
||||
uint32_t idx = _thru_map.get (*t, o, &valid);
|
||||
if (valid && idx < _configured_internal.get (*t)) {
|
||||
new_thru.set (*t, o, idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* prevent out + thru, existing plugin outputs override thru */
|
||||
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
|
||||
for (uint32_t o = 0; o < _configured_out.get (*t); ++o) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue