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');