summaryrefslogtreecommitdiff
path: root/libs/ardour/audiofilesource.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-09-10 00:48:10 +0200
committerRobin Gareus <robin@gareus.org>2015-09-10 00:55:58 +0200
commit390ea007c5b6b647e33c924b3429bf49ae83b1ca (patch)
tree774a07a6132c8c211de95e43a53484be5007ddbf /libs/ardour/audiofilesource.cc
parent78ff3c05a3f5c5d532162b45bdd8857bc402011e (diff)
rework peakfile handling:
- copy old peak-files to new (do not require re-calc) - keep old peak-files (for now, backwards compat) - fix cleanup-sources to remove *new* peak-file - include channel-number in hash (like it was done before) see also 624f76b TODO: add Session > Cleanup > remove/re-create peaks
Diffstat (limited to 'libs/ardour/audiofilesource.cc')
-rw-r--r--libs/ardour/audiofilesource.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 45ec162f09..0c921dae8d 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -164,9 +164,17 @@ AudioFileSource::init (const string& pathstr, bool must_exist)
}
string
-AudioFileSource::construct_peak_filepath (const string& audio_path) const
+AudioFileSource::construct_peak_filepath (const string& audio_path, bool oldformat) const
{
- return _session.construct_peak_filepath (audio_path);
+ string base;
+ if (oldformat) {
+ base = audio_path.substr (0, audio_path.find_last_of ('.'));
+ } else {
+ base = audio_path;
+ }
+ base += '%';
+ base += (char) ('A' + _channel);
+ return _session.construct_peak_filepath (base, oldformat);
}
bool