GUI changes to follow TempoMap::sample_at() API changes
This commit is contained in:
parent
2aefb472e2
commit
c24cabead0
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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<ArdourCanvas::Ruler::Mark>& 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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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> ("ChanCount")
|
||||
|
|
Loading…
Reference in New Issue
Block a user