13
0

Fix silent stem export channels (#9294)

When toggling a channel-configs the following happens:

 1. TrackExportChannelSelector::update_config
 2. ExportProfileManager::clear_channel_configs
 3. RouteExportChannel::create_from_route
[...] CriticalSelectionChanged
 4. ExportDialog::update_warnings_and_example_filename
 5. ARDOUR::ExportProfileManager::get_warnings
 6. ARDOUR::ExportProfileManager::build_filenames
 7. ARDOUR::ExportFilename::set_channel_config
[...]


Step 3 creates a RouteExportChannel, Step 7 retains a
shared-pointer to it in the config's ExportFilenamePtr.
When toggling another channel: step 2 release the reference
and step 3 creates a new RouteExportChannel.
This new channel reuses the existing Route::_capture_processor (!).

Now Step 7 releases the first RouteExportChannel in order
to get_warnings for the new one. Since ExportFilenamePtr holds the
the last reference, the d'tor of RouteExportChannel runs,
which removes the capture-processor from the route.

The newly created RouteExportChannel now has a reference
to a CaptureProcessor that is not in the signal-flow.


Note: the order of adding/removing RouteExportChannel matters.
With a two track session:
 * Disable "with track/bus processing
 * Enable Track 1
 * Enable Track 2
 * Disable Track 1
 * Enable Track 1 // << Track 2 becomes silent
This commit is contained in:
Robin Gareus 2023-04-03 15:45:18 +02:00
parent 9b23587886
commit a3a30e39df
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1076,6 +1076,11 @@ ExportProfileManager::build_filenames (std::list<std::string>& result, ExportFil
result.push_back (filename->get_path (format));
}
}
/* no not retain the channel config - otherwise this retains
* Route::_capturing_processor that may already be removed
* from the processor chain.
*/
filename->set_channel_config (ExportChannelConfigPtr());
}
};