terminate peak-file creation on session-close
This commit is contained in:
parent
f5f11158aa
commit
ef3a42faed
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user