13
0

terminate peak-file creation on session-close

This commit is contained in:
Robin Gareus 2015-09-06 11:49:47 +02:00
parent f5f11158aa
commit ef3a42faed
2 changed files with 10 additions and 0 deletions

View File

@ -335,6 +335,9 @@ AudioFileSource::is_empty (Session& /*s*/, string path)
int
AudioFileSource::setup_peakfile ()
{
if (_session.deletion_in_progress()) {
return 0;
}
if (!(_flags & NoPeakFile)) {
return initialize_peakfile (_path);
} else {

View File

@ -56,6 +56,7 @@
#include "ardour/audiosource.h"
#include "ardour/rc_configuration.h"
#include "ardour/runtime_functions.h"
#include "ardour/session.h"
#include "i18n.h"
@ -746,6 +747,12 @@ AudioSource::build_peaks_from_scratch ()
lp.release(); // allow butler to refill buffers
if (_session.deletion_in_progress()) {
cerr << "peak file creation interrupted: " << _name << endmsg;
done_with_peakfile_writes (false);
goto out;
}
if (compute_and_write_peaks (buf.get(), current_frame, frames_read, true, false, _FPP)) {
break;
}