mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Review changes
This commit is contained in:
parent
624f76b229
commit
cfb10eba35
2 changed files with 4 additions and 12 deletions
|
|
@ -137,8 +137,8 @@ class LIBARDOUR_API AudioSource : virtual public Source,
|
|||
virtual framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const = 0;
|
||||
virtual framecnt_t write_unlocked (Sample *dst, framecnt_t cnt) = 0;
|
||||
virtual std::string construct_peak_filepath(const std::string& audio_filepath) const = 0;
|
||||
virtual std::string find_broken_peakfile (std::string /* missing_peak_path */,
|
||||
std::string audio_path) { return construct_peak_filepath (audio_path); }
|
||||
virtual std::string find_broken_peakfile (const std::string& /* missing_peak_path */,
|
||||
const std::string& audio_path) { return construct_peak_filepath (audio_path); }
|
||||
|
||||
virtual int read_peaks_with_fpp (PeakData *peaks,
|
||||
framecnt_t npeaks, framepos_t start, framecnt_t cnt,
|
||||
|
|
|
|||
|
|
@ -4412,17 +4412,9 @@ Session::construct_peak_filepath (const string& filepath) const
|
|||
|
||||
string::size_type suffix = filename.find_last_of ('.');
|
||||
|
||||
std::string filename_unsuffixed;
|
||||
if (suffix != string::npos) {
|
||||
filename_unsuffixed = filename.substr (0, suffix);
|
||||
} else {
|
||||
warning << string_compose (_("Odd audio file path: %1"), filepath) << endmsg;
|
||||
filename_unsuffixed = filename;
|
||||
}
|
||||
std::string checksum = Glib::Checksum::compute_checksum(Glib::Checksum::CHECKSUM_SHA1, path + G_DIR_SEPARATOR + filename);
|
||||
|
||||
std::string checksum = "_" + Glib::Checksum::compute_checksum(Glib::Checksum::CHECKSUM_MD5, path + G_DIR_SEPARATOR + filename);
|
||||
|
||||
return Glib::build_filename (_session_dir->peak_path(), filename_unsuffixed + checksum + peakfile_suffix);
|
||||
return Glib::build_filename (_session_dir->peak_path(), checksum + peakfile_suffix);
|
||||
}
|
||||
|
||||
string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue