temporal: hide superclock_t variant of TempoMap::metric_at()

This fixes several callsites that were passing samplepos_t to get a TempoMetric,
some of them somewhat significant (e.g. VST plugins that want tempo information).

Bad API design on my part, apologies.

This commit combines libs/ and gtk2_ardour because the new private status
of the ::metric_at() call would be a blocking point for git bisect
This commit is contained in:
Paul Davis 2023-06-12 12:36:16 -06:00
parent 12c3daa46b
commit 50232a23a7
11 changed files with 20 additions and 14 deletions

View file

@ -284,7 +284,7 @@ AutomationController::set_freq_beats(double beats)
const ARDOUR::ParameterDescriptor& desc = _controllable->desc();
const ARDOUR::Session& session = _controllable->session();
const samplepos_t pos = session.transport_sample();
const Temporal::Tempo& tempo = Temporal::TempoMap::use()->metric_at (pos).tempo();
const Temporal::Tempo& tempo = Temporal::TempoMap::use()->metric_at (timepos_t (pos)).tempo();
const double bpm = tempo.note_types_per_minute();
const double bps = bpm / 60.0;
const double freq = bps / beats;