13
0

fetch thread local tempo map in potential peak-building threads

This commit is contained in:
Paul Davis 2022-06-20 14:25:32 -06:00
parent 4825d67c4a
commit bbb0b78a50
3 changed files with 9 additions and 2 deletions

View File

@ -27,6 +27,8 @@
#include "pbd/convert.h"
#include "pbd/error.h"
#include "temporal/tempo.h"
#include "ardour/audio_playlist_source.h"
#include "ardour/audioplaylist.h"
#include "ardour/boost_debug.h"
@ -71,6 +73,7 @@ peak_thread_work ()
wait:
if (SourceFactory::files_with_peaks.empty () && SourceFactory::peak_thread_run) {
SourceFactory::PeaksToBuild.wait (SourceFactory::peak_building_lock);
(void) Temporal::TempoMap::fetch();
}
if (!SourceFactory::peak_thread_run) {

View File

@ -32,6 +32,8 @@
#include "pbd/convert.h"
#include "pbd/signals.h"
#include "temporal/tempo.h"
#include "ardour/types.h"
#include "ardour/dB.h"
#include "ardour/lmath.h"
@ -884,6 +886,8 @@ WaveView::process_draw_request (boost::shared_ptr<WaveViewDrawRequest> req)
return;
}
(void) Temporal::TempoMap::fetch();
WaveViewProperties const& props = req->image->props;
const int n_peaks = props.get_width_pixels ();

View File

@ -50,8 +50,8 @@ def build(bld):
obj.export_includes = ['.']
obj.includes = ['.']
obj.uselib = 'SIGCPP CAIROMM GTKMM BOOST XML'
obj.use = [ 'libpbd', 'libcanvas', 'libardour', 'libgtkmm2ext' ]
obj.uselib = 'SIGCPP CAIROMM GTKMM BOOST XML TEMPORAL'
obj.use = [ 'libpbd', 'libcanvas', 'libardour', 'libgtkmm2ext', 'libtemporal' ]
obj.name = 'libwaveview'
obj.target = 'waveview'
obj.vnum = WAVEVIEW_LIB_VERSION