From 7a8775382f2cc820615920d9b83eefdaab213f3b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 24 Dec 2021 00:30:33 +0100 Subject: [PATCH] Remove ASCII limit when naming files/regions --- libs/ardour/audiofilesource.cc | 6 +++++- libs/ardour/utils.cc | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc index fc9ca3cc70..13b08a53d4 100644 --- a/libs/ardour/audiofilesource.cc +++ b/libs/ardour/audiofilesource.cc @@ -184,7 +184,11 @@ AudioFileSource::construct_peak_filepath (const string& audio_path, const bool i base = audio_path; } base += '%'; - base += (char) ('A' + _channel); + if (_channel < 26) { + base += (char) ('A' + _channel); + } else { + base += string_compose ("%1", _channel + 1); + } return _session.construct_peak_filepath (base, in_session, old_peak_name); } diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index ec526637ef..0d64d94376 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -323,9 +323,12 @@ ARDOUR::region_name_from_path (string path, bool strip_channels, bool add_channe if (add_channel_suffix) { + /* compare to Session::format_audio_source_name */ path += '%'; - if (total > 2) { + if (total > 25) { + path += string_compose ("%1", this_one + 1); + } else if (total > 2) { path += (char) ('a' + this_one); } else { path += (char) (this_one == 0 ? 'L' : 'R');