mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
terminate peak-file creation on session-close
This commit is contained in:
parent
f5f11158aa
commit
ef3a42faed
2 changed files with 10 additions and 0 deletions
|
|
@ -335,6 +335,9 @@ AudioFileSource::is_empty (Session& /*s*/, string path)
|
||||||
int
|
int
|
||||||
AudioFileSource::setup_peakfile ()
|
AudioFileSource::setup_peakfile ()
|
||||||
{
|
{
|
||||||
|
if (_session.deletion_in_progress()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (!(_flags & NoPeakFile)) {
|
if (!(_flags & NoPeakFile)) {
|
||||||
return initialize_peakfile (_path);
|
return initialize_peakfile (_path);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@
|
||||||
#include "ardour/audiosource.h"
|
#include "ardour/audiosource.h"
|
||||||
#include "ardour/rc_configuration.h"
|
#include "ardour/rc_configuration.h"
|
||||||
#include "ardour/runtime_functions.h"
|
#include "ardour/runtime_functions.h"
|
||||||
|
#include "ardour/session.h"
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
|
|
@ -746,6 +747,12 @@ AudioSource::build_peaks_from_scratch ()
|
||||||
|
|
||||||
lp.release(); // allow butler to refill buffers
|
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)) {
|
if (compute_and_write_peaks (buf.get(), current_frame, frames_read, true, false, _FPP)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue