13
0

create peak files in background when loading session

This commit is contained in:
Robin Gareus 2015-09-05 23:28:34 +02:00
parent bea9bf5387
commit 7f00c70f9f
2 changed files with 5 additions and 1 deletions

View File

@ -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) {

View File

@ -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<AudioFileSource> (
SourceFactory::createWritable (DataType::AUDIO, *this, path, destructive, frame_rate()));
SourceFactory::createWritable (DataType::AUDIO, *this, path, destructive, frame_rate(), true, true));
} else {
throw failed_constructor ();
}