diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index 95c20eed76..03a0495a53 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -819,7 +819,7 @@ LuaBindings::common (lua_State* L) .beginClass ("Point") .addFunction ("sclock", &Temporal::Point::sclock) .addFunction ("beats", &Temporal::Point::beats) - .addFunction ("sample", &Temporal::Point::sample) + .addFunction ("sample", &Temporal::Point::sample_is_dangerous) .addFunction ("bbt", &Temporal::Point::bbt) .addFunction ("time", &Temporal::Point::time) .endClass () diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index f159906e55..7dea250576 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -3005,9 +3005,9 @@ LV2Plugin::connect_and_run(BufferSet& bufs, } } - while (m != m_end || ((tempo_map_point != tempo_map_points.end()) && ((*tempo_map_point).sample(TEMPORAL_SAMPLE_RATE) < tend))) { + while (m != m_end || ((tempo_map_point != tempo_map_points.end()) && ((*tempo_map_point).sample_is_dangerous (TEMPORAL_SAMPLE_RATE) < tend))) { - if (m != m_end && ((tempo_map_point == tempo_map_points.end()) || (*tempo_map_point).sample(TEMPORAL_SAMPLE_RATE) > (*m).time() + offset)) { + if (m != m_end && ((tempo_map_point == tempo_map_points.end()) || (*tempo_map_point).sample_is_dangerous (TEMPORAL_SAMPLE_RATE) > (*m).time() + offset)) { const Evoral::Event ev (*m, false); @@ -3020,7 +3020,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs, } else { assert (tempo_map_point != tempo_map_points.end()); - const samplepos_t sample = tempo_map_point->sample (TEMPORAL_SAMPLE_RATE); + const samplepos_t sample = tempo_map_point->sample_is_dangerous (TEMPORAL_SAMPLE_RATE); const Temporal::BBT_Time bbt = tempo_map_point->bbt(); double bpm = (superclock_ticks_per_second() * 60) / tempo_map_point->superclocks_per_note_type_at_superclock (tempo_map_point->sclock()); diff --git a/libs/ardour/session_click.cc b/libs/ardour/session_click.cc index 9a64916191..cd08e78166 100644 --- a/libs/ardour/session_click.cc +++ b/libs/ardour/session_click.cc @@ -142,9 +142,9 @@ Session::click (samplepos_t cycle_start, samplecnt_t nframes) assert (superclock_to_samples (p.sclock(), sample_rate()) < end); if (p.bbt().is_bar() && (click_emphasis_data && Config->get_use_click_emphasis())) { - add_click (p.sample (sample_rate()), true); + add_click (p.sample_is_dangerous (sample_rate()), true); } else { - add_click (p.sample (sample_rate()), false); + add_click (p.sample_is_dangerous (sample_rate()), false); } } diff --git a/libs/temporal/tempo.cc b/libs/temporal/tempo.cc index 066773fdd7..aabd480c84 100644 --- a/libs/temporal/tempo.cc +++ b/libs/temporal/tempo.cc @@ -3325,7 +3325,7 @@ std::ostream& std::operator<<(std::ostream& str, TempoMapPoint const & tmp) { str << '@' << std::setw (12) << tmp.sclock() << ' ' << tmp.sclock() / (double) superclock_ticks_per_second() - << " secs " << tmp.sample (TEMPORAL_SAMPLE_RATE) << " samples" + << " secs " << tmp.sample_is_dangerous (TEMPORAL_SAMPLE_RATE) << " samples" << (tmp.is_explicit_tempo() ? " EXP-T" : " imp-t") << (tmp.is_explicit_meter() ? " EXP-M" : " imp-m") << (tmp.is_explicit_position() ? " EXP-P" : " imp-p") diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 3ef0eed702..ac76aff53b 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -102,7 +102,7 @@ class /*LIBTEMPORAL_API*/ Point : public point_hook, public MapOwned { LIBTEMPORAL_API superclock_t sclock() const { return _sclock; } LIBTEMPORAL_API Beats const & beats() const { return _quarters; } LIBTEMPORAL_API BBT_Time const & bbt() const { return _bbt; } - LIBTEMPORAL_API samplepos_t sample (int sr) const { return superclock_to_samples (sclock(), sr); } + LIBTEMPORAL_API samplepos_t sample_is_dangerous (int sr) const { return superclock_to_samples (sclock(), sr); } LIBTEMPORAL_API virtual timepos_t time() const = 0;