diff options
author | David Robillard <d@drobilla.net> | 2006-11-19 16:45:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-11-19 16:45:16 +0000 |
commit | ef6b25432d9c46d71b08c0f7d5f2686df428c4e8 (patch) | |
tree | 9b30d87b6670aadce365c9b112321dd674a0bab4 /libs/ardour/audiosource.cc | |
parent | af105afe6cde5b0088647cea7d5e4e3314f8478b (diff) |
Merged with trunk R1141
git-svn-id: svn://localhost/ardour2/branches/midi@1142 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audiosource.cc')
-rw-r--r-- | libs/ardour/audiosource.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 419fe9240c..93165b7fe4 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -368,26 +368,29 @@ AudioSource::initialize_peakfile (bool newfile, string audio_path) error << string_compose(_("AudioSource: cannot stat peakfile \"%1\""), peakpath) << endmsg; return -1; } - } else { - /* we found it in the peaks dir */ - } - - if (statbuf.st_size == 0) { _peaks_built = false; + } else { - // Check if the audio file has changed since the peakfile was built. - struct stat stat_file; - int err = stat (audio_path.c_str(), &stat_file); - if (!err && stat_file.st_mtime > statbuf.st_mtime){ + /* we found it in the peaks dir, so check it out */ + + if (statbuf.st_size == 0) { _peaks_built = false; } else { - _peaks_built = true; + // Check if the audio file has changed since the peakfile was built. + struct stat stat_file; + int err = stat (audio_path.c_str(), &stat_file); + + if (!err && stat_file.st_mtime > statbuf.st_mtime){ + _peaks_built = false; + } else { + _peaks_built = true; + } } } } - + if (!newfile && !_peaks_built && _build_missing_peakfiles && _build_peakfiles) { build_peaks_from_scratch (); } |