diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index acc1ba3132..25b96c3ff9 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -2106,7 +2106,7 @@ AudioClock::samples_from_bbt_string (timepos_t const & pos, const string& str) c bbt.beats++; return TempoMap::use()->bbt_duration_at (pos, bbt).samples(); } else { - return TempoMap::use()->sample_at (bbt, _session->sample_rate()); + return TempoMap::use()->sample_at (bbt); } } diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 4653b9a367..8d5f7a010c 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3455,7 +3455,7 @@ MeterMarkerDrag::motion (GdkEvent* event, bool first_move) timepos_t pos; if (map->time_domain() == AudioTime) { - pos = timepos_t (map->sample_at (bbt, AudioEngine::instance()->sample_rate())); + pos = timepos_t (map->sample_at (bbt)); } else { pos = timepos_t (map->quarters_at (bbt)); } @@ -3632,7 +3632,7 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move) timepos_t pos; if (map->time_domain() == AudioTime) { - pos = timepos_t (map->sample_at (bbt, _editor->session()->sample_rate())); + pos = timepos_t (map->sample_at (bbt)); } else { pos = timepos_t (map->quarters_at (bbt)); } diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index 76749fa166..7d3a73d53a 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -986,8 +986,8 @@ Editor::compute_bbt_ruler_scale (samplepos_t lower, samplepos_t upper) floor_lower_beat = Temporal::Beats(); } - const samplepos_t beat_before_lower_pos = tmap->sample_at (floor_lower_beat, _session->sample_rate()); - const samplepos_t beat_after_upper_pos = tmap->sample_at ((std::max (Beats(), tmap->quarters_at_sample (upper)).round_down_to_beat()) + Beats (1, 0), _session->sample_rate()); + const samplepos_t beat_before_lower_pos = tmap->sample_at (floor_lower_beat); + const samplepos_t beat_after_upper_pos = tmap->sample_at ((std::max (Beats(), tmap->quarters_at_sample (upper)).round_down_to_beat()) + Beats (1, 0)); _session->bbt_time (timepos_t (beat_before_lower_pos), lower_beat); _session->bbt_time (timepos_t (beat_after_upper_pos), upper_beat); @@ -1385,7 +1385,7 @@ Editor::metric_get_bbt (std::vector& marks, int64_t l next_beat.beats = bbt.beats; next_beat.bars = bbt.bars; next_beat.ticks = tick; - pos = TempoMap::use()->sample_at (next_beat, sr); + pos = TempoMap::use()->sample_at (next_beat); if (t % bbt_accent_modulo == (bbt_accent_modulo - 1)) { i_am_accented = true; diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 43263ce8ea..f2d1c17799 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -448,7 +448,7 @@ Editor::mouse_add_new_meter_event (timepos_t pos) if (map->time_domain() == BeatTime) { pos = timepos_t (map->quarters_at (requested)); } else { - pos = timepos_t (map->sample_at (requested, _session->sample_rate())); + pos = timepos_t (map->sample_at (requested)); } map->set_meter (Meter (bpb, note_type), pos); diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index 74c889143f..9ec2e774a4 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -1895,7 +1895,7 @@ LuaBindings::common (lua_State* L) .addFunction ("meter_at", (Temporal::MeterPoint const & (Temporal::TempoMap::*)(timepos_t const &) const) &TempoMap::meter_at) .addFunction ("bbt_at", (Temporal::BBT_Time (Temporal::TempoMap::*)(timepos_t const &) const) &TempoMap::bbt_at) .addFunction ("quarters_at", (Temporal::Beats (Temporal::TempoMap::*)(timepos_t const &) const) &TempoMap::quarters_at) - .addFunction ("sample_at", (samplepos_t (Temporal::TempoMap::*)(timepos_t const &, samplecnt_t) const) &TempoMap::sample_at) + .addFunction ("sample_at", (samplepos_t (Temporal::TempoMap::*)(timepos_t const &) const) &TempoMap::sample_at) .endClass () .beginClass ("ChanCount")