remove Session::bbt_time() and use TempoMap::use()->bbt_at() explicitly everywhere (GUI edition)
This commit is contained in:
parent
12847b0125
commit
91f38f9c4e
|
@ -45,6 +45,8 @@
|
|||
#include "ardour/tempo.h"
|
||||
#include "ardour/profile.h"
|
||||
|
||||
#include "temporal/tempo.h"
|
||||
|
||||
#include "gtkmm2ext/gtk_ui.h"
|
||||
#include "gtkmm2ext/keyboard.h"
|
||||
|
||||
|
@ -989,8 +991,8 @@ Editor::compute_bbt_ruler_scale (samplepos_t lower, samplepos_t upper)
|
|||
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);
|
||||
lower_beat = Temporal::TempoMap::use()->bbt_at (timepos_t (beat_before_lower_pos));
|
||||
upper_beat = Temporal::TempoMap::use()->bbt_at (timepos_t (beat_after_upper_pos));
|
||||
uint32_t beats = 0;
|
||||
|
||||
bbt_bar_helper_on = false;
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "ardour/export_format_specification.h"
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "temporal/tempo.h"
|
||||
|
||||
#include "widgets/tooltips.h"
|
||||
|
||||
#include "export_format_dialog.h"
|
||||
|
@ -1032,7 +1034,7 @@ ExportFormatDialog::update_time (AnyTime& time, AudioClock const& clock)
|
|||
break;
|
||||
case AudioClock::BBT:
|
||||
time.type = AnyTime::BBT;
|
||||
_session->bbt_time (timepos_t (samples), time.bbt);
|
||||
time.bbt = Temporal::TempoMap::use()->bbt_at (timepos_t (samples));
|
||||
break;
|
||||
case AudioClock::Seconds:
|
||||
case AudioClock::MinSec:
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#include "ardour/export_handler.h"
|
||||
#include "ardour/export_timespan.h"
|
||||
|
||||
#include "temporal/tempo.h"
|
||||
|
||||
#include "export_timespan_selector.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
@ -302,7 +304,7 @@ ExportTimespanSelector::bbt_str (samplepos_t samples) const
|
|||
|
||||
std::ostringstream oss;
|
||||
Temporal::BBT_Time time;
|
||||
_session->bbt_time (timepos_t (samples), time);
|
||||
time = Temporal::TempoMap::use()->bbt_at (timepos_t (samples));
|
||||
|
||||
time.print_padded (oss);
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ VerboseCursor::set_time (samplepos_t sample)
|
|||
|
||||
switch (m) {
|
||||
case AudioClock::BBT:
|
||||
_editor->_session->bbt_time (timepos_t (sample), bbt);
|
||||
bbt = TempoMap::use()->bbt_at (timepos_t (sample));
|
||||
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, bbt.bars, bbt.beats, bbt.ticks);
|
||||
break;
|
||||
|
||||
|
@ -156,8 +156,8 @@ VerboseCursor::set_duration (samplepos_t start, samplepos_t end)
|
|||
switch (m) {
|
||||
case AudioClock::BBT:
|
||||
{
|
||||
_editor->_session->bbt_time (timepos_t (start), sbbt);
|
||||
_editor->_session->bbt_time (timepos_t (end), ebbt);
|
||||
sbbt = TempoMap::use()->bbt_at (timepos_t (start));
|
||||
ebbt = TempoMap::use()->bbt_at (timepos_t (end));
|
||||
|
||||
/* subtract */
|
||||
/* XXX this computation won't work well if the
|
||||
|
|
Loading…
Reference in New Issue