summaryrefslogtreecommitdiff
path: root/libs/ardour/audiofilesource.cc
diff options
context:
space:
mode:
authorMathias Buhr <napcode@apparatus.de>2015-08-29 13:48:05 +0200
committerMathias Buhr <mathias.buhr@citrix.com>2015-09-03 09:54:23 +0200
commit624f76b229b8e71f9c57aa60da1ac2046b0578cd (patch)
treea16708eee0c4590f08b9899c9ec7c46e218ca533 /libs/ardour/audiofilesource.cc
parent95b144ee583e49d8532749a1e820f93c5f701381 (diff)
Fixes case where audiofiles used wrong peakfiles
Diffstat (limited to 'libs/ardour/audiofilesource.cc')
-rw-r--r--libs/ardour/audiofilesource.cc23
1 files changed, 3 insertions, 20 deletions
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 0fd7ec9ec3..a6942e678b 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -164,26 +164,9 @@ AudioFileSource::init (const string& pathstr, bool must_exist)
}
string
-AudioFileSource::generate_peak_path (const string& audio_path)
+AudioFileSource::construct_peak_filepath (const string& audio_path) const
{
- string base;
-
- string::size_type suffix = audio_path.find_last_of ('.');
-
- if (suffix != string::npos) {
- base = audio_path.substr (0, suffix);
- } else {
- warning << string_compose (_("Odd audio file path: %1"), audio_path) << endmsg;
- base = audio_path;
- }
-
- base += '%';
- base += (char) ('A' + _channel);
-
- /* pass in the name/path of the source, with no audio file type suffix
- */
-
- return _session.peak_path (base);
+ return _session.construct_peak_filepath (audio_path);
}
string
@@ -230,7 +213,7 @@ AudioFileSource::find_broken_peakfile (const string& peak_path, const string& au
string
AudioFileSource::broken_peak_path (const string& audio_path)
{
- return _session.peak_path (basename_nosuffix (audio_path));
+ return _session.construct_peak_filepath (basename_nosuffix (audio_path));
}
string