From 89d8dc26ddffd7e4ac6bf8dde28f339d41f3821b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 6 Dec 2022 17:30:43 +0100 Subject: [PATCH] Resolve export format ambiguities This fixes an issue when switching formats. ExportFormatDialog::update_selection iterates e.g. WAV BWV. If BWV was selected and a user selects WAV the following happpens 1. WAV is selected 2. BWV is deselected 3. Since BWF and WAV are the same format, ExportFormatManager deselects WAV --- libs/ardour/export_format_manager.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/ardour/export_format_manager.cc b/libs/ardour/export_format_manager.cc index fa017887cf..623e0febb3 100644 --- a/libs/ardour/export_format_manager.cc +++ b/libs/ardour/export_format_manager.cc @@ -480,7 +480,11 @@ ExportFormatManager::change_format_selection (bool select, WeakExportFormatPtr c if (select) { select_format (ptr); - } else if (ptr->get_format_id() == current_selection->format_id()) { + } else if (ptr->get_format_id() == current_selection->format_id() && + // BWF has the same format id with wav, so we need to check this. + ptr->has_broadcast_info () == current_selection->has_broadcast_info () && + // Ogg can be Vorbis or OPUS + (ptr->get_format_id () != ExportFormatBase::F_Ogg || (ptr->get_explicit_sample_format () == current_selection->sample_format ()))) { ptr.reset(); select_format (ptr); }