13
0

Remove ASCII limit when naming files/regions

This commit is contained in:
Robin Gareus 2021-12-24 00:30:33 +01:00
parent d78364f90b
commit 7a8775382f
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 9 additions and 2 deletions

View File

@ -184,7 +184,11 @@ AudioFileSource::construct_peak_filepath (const string& audio_path, const bool i
base = audio_path; base = audio_path;
} }
base += '%'; 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); return _session.construct_peak_filepath (base, in_session, old_peak_name);
} }

View File

@ -323,9 +323,12 @@ ARDOUR::region_name_from_path (string path, bool strip_channels, bool add_channe
if (add_channel_suffix) { if (add_channel_suffix) {
/* compare to Session::format_audio_source_name */
path += '%'; path += '%';
if (total > 2) { if (total > 25) {
path += string_compose ("%1", this_one + 1);
} else if (total > 2) {
path += (char) ('a' + this_one); path += (char) ('a' + this_one);
} else { } else {
path += (char) (this_one == 0 ? 'L' : 'R'); path += (char) (this_one == 0 ? 'L' : 'R');