-
- return peak_path;
-}
-
-string
-AudioFileSource::broken_peak_path (string audio_path)
-{
- return _session.peak_path (basename_nosuffix (audio_path));
-}
-
-string
-AudioFileSource::old_peak_path (string audio_path)
-{
- /* XXX hardly bombproof! fix me */
-
- struct stat stat_file;
- struct stat stat_mount;
-
- string mp = mountpoint (audio_path);
-
- stat (audio_path.c_str(), &stat_file);
- stat (mp.c_str(), &stat_mount);
-
- char buf[32];
-#ifdef __APPLE__
- snprintf (buf, sizeof (buf), "%llu-%llu-%d.peak",
- (unsigned long long)stat_mount.st_ino,
- (unsigned long long)stat_file.st_ino,
- _channel);
-#else
- snprintf (buf, sizeof (buf), "%" PRId64 "-%" PRId64 "-%d.peak", (int64_t) stat_mount.st_ino, (int64_t) stat_file.st_ino, _channel);
-#endif
-
- string res = peak_dir;
- res += buf;
- res += peakfile_suffix;
-
- return res;
+ base += '%';
+ base += (char) ('A' + _channel);
+ return _session.construct_peak_filepath (base, in_session, old_peak_name);