13
0

peak amplitude thread needs tempo map

This commit is contained in:
Paul Davis 2022-07-05 19:27:50 -06:00
parent 3ea5fd5d91
commit 6678cd74f4

View File

@ -28,6 +28,8 @@
#include "pbd/stateful_diff_command.h" #include "pbd/stateful_diff_command.h"
#include "pbd/pthread_utils.h" #include "pbd/pthread_utils.h"
#include "temporal/tempo.h"
#include "ardour/audioregion.h" #include "ardour/audioregion.h"
#include "ardour/session_event.h" #include "ardour/session_event.h"
#include "ardour/dB.h" #include "ardour/dB.h"
@ -154,6 +156,10 @@ AudioRegionEditor::peak_amplitude_thread ()
break; break;
} }
/* update thread-local tempo map */
Temporal::TempoMap::fetch ();
/* compute peak amplitude and signal the fact */ /* compute peak amplitude and signal the fact */
PeakAmplitudeFound (accurate_coefficient_to_dB (_audio_region->maximum_amplitude ())); /* EMIT SIGNAL */ PeakAmplitudeFound (accurate_coefficient_to_dB (_audio_region->maximum_amplitude ())); /* EMIT SIGNAL */
} }