From 7f00c70f9ffc8f112b70cb5159a9aa435deb2daf Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 5 Sep 2015 23:28:34 +0200 Subject: create peak files in background when loading session --- libs/ardour/audiosource.cc | 4 ++++ libs/ardour/session.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'libs/ardour') diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 01a030914d..bfc2d9e4ab 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -744,12 +744,16 @@ AudioSource::build_peaks_from_scratch () goto out; } + lp.release(); // allow butler to refill buffers + if (compute_and_write_peaks (buf.get(), current_frame, frames_read, true, false, _FPP)) { break; } current_frame += frames_read; cnt -= frames_read; + + lp.acquire(); } if (cnt == 0) { diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index b0fbe8f4d1..f8bd39fe33 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -4694,7 +4694,7 @@ Session::create_audio_source_for_session (size_t n_chans, string const & base, u if (!path.empty()) { return boost::dynamic_pointer_cast ( - SourceFactory::createWritable (DataType::AUDIO, *this, path, destructive, frame_rate())); + SourceFactory::createWritable (DataType::AUDIO, *this, path, destructive, frame_rate(), true, true)); } else { throw failed_constructor (); } -- cgit v1.2.3