Vapor: prevent export when there are more than 128 channels

This commit is contained in:
Robin Gareus 2024-02-26 22:13:07 +01:00
parent 5880e51e92
commit 80098c6a86
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -31,6 +31,7 @@
#include "ardour/export_timespan.h" #include "ardour/export_timespan.h"
#include "ardour/profile.h" #include "ardour/profile.h"
#include "ardour/session_directory.h" #include "ardour/session_directory.h"
#include "ardour/surround_return.h"
#include "nag.h" #include "nag.h"
#include "simple_export_dialog.h" #include "simple_export_dialog.h"
@ -159,6 +160,11 @@ SimpleExportDialog::set_session (ARDOUR::Session* s)
return; return;
} }
if (_vapor_export && (s->surround_master ()->surround_return ()->total_n_channels () > 128)) {
set_error ("Error: ADM/BWN files cannot contain more than 128 channels.");
return;
}
/* check range */ /* check range */
Location* srl (s->locations ()->session_range_location ()); Location* srl (s->locations ()->session_range_location ());
TimeSelection const& tsel (_editor.get_selection ().time); TimeSelection const& tsel (_editor.get_selection ().time);