From 2aefb472e2e2394566cd4850866eb9960d236fb9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 17 Nov 2021 15:56:06 -0700 Subject: [PATCH] temporal: change API of TempoMap::sample_at() to not require an explicit sample rate We have a mechanism to get the engine sample rate and use that widely. We should use it here also. --- libs/temporal/temporal/tempo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 0608a134b1..26784b42f1 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -823,9 +823,9 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible LIBTEMPORAL_API superclock_t superclock_at (BBT_Time const &) const; LIBTEMPORAL_API superclock_t superclock_at (timepos_t const &) const; - LIBTEMPORAL_API samplepos_t sample_at (Beats const & b, samplecnt_t sr) const { return superclock_to_samples (superclock_at (b), sr); } - LIBTEMPORAL_API samplepos_t sample_at (BBT_Time const & b, samplecnt_t sr) const { return superclock_to_samples (superclock_at (b), sr); } - LIBTEMPORAL_API samplepos_t sample_at (timepos_t const & t, samplecnt_t sr) const { return superclock_to_samples (superclock_at (t), sr); } + LIBTEMPORAL_API samplepos_t sample_at (Beats const & b) const { return superclock_to_samples (superclock_at (b), TEMPORAL_SAMPLE_RATE); } + LIBTEMPORAL_API samplepos_t sample_at (BBT_Time const & b) const { return superclock_to_samples (superclock_at (b), TEMPORAL_SAMPLE_RATE); } + LIBTEMPORAL_API samplepos_t sample_at (timepos_t const & t) const { return superclock_to_samples (superclock_at (t), TEMPORAL_SAMPLE_RATE); } /* ways to walk along the tempo map, measure distance between points, * etc.