mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
remove Session::bbt_time() and use TempoMap::use()->bbt_at() explicitly everywhere (GUI edition)
This commit is contained in:
parent
12847b0125
commit
91f38f9c4e
4 changed files with 13 additions and 7 deletions
|
|
@ -45,6 +45,8 @@
|
||||||
#include "ardour/tempo.h"
|
#include "ardour/tempo.h"
|
||||||
#include "ardour/profile.h"
|
#include "ardour/profile.h"
|
||||||
|
|
||||||
|
#include "temporal/tempo.h"
|
||||||
|
|
||||||
#include "gtkmm2ext/gtk_ui.h"
|
#include "gtkmm2ext/gtk_ui.h"
|
||||||
#include "gtkmm2ext/keyboard.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_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));
|
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);
|
lower_beat = Temporal::TempoMap::use()->bbt_at (timepos_t (beat_before_lower_pos));
|
||||||
_session->bbt_time (timepos_t (beat_after_upper_pos), upper_beat);
|
upper_beat = Temporal::TempoMap::use()->bbt_at (timepos_t (beat_after_upper_pos));
|
||||||
uint32_t beats = 0;
|
uint32_t beats = 0;
|
||||||
|
|
||||||
bbt_bar_helper_on = false;
|
bbt_bar_helper_on = false;
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@
|
||||||
#include "ardour/export_format_specification.h"
|
#include "ardour/export_format_specification.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
|
|
||||||
|
#include "temporal/tempo.h"
|
||||||
|
|
||||||
#include "widgets/tooltips.h"
|
#include "widgets/tooltips.h"
|
||||||
|
|
||||||
#include "export_format_dialog.h"
|
#include "export_format_dialog.h"
|
||||||
|
|
@ -1032,7 +1034,7 @@ ExportFormatDialog::update_time (AnyTime& time, AudioClock const& clock)
|
||||||
break;
|
break;
|
||||||
case AudioClock::BBT:
|
case AudioClock::BBT:
|
||||||
time.type = AnyTime::BBT;
|
time.type = AnyTime::BBT;
|
||||||
_session->bbt_time (timepos_t (samples), time.bbt);
|
time.bbt = Temporal::TempoMap::use()->bbt_at (timepos_t (samples));
|
||||||
break;
|
break;
|
||||||
case AudioClock::Seconds:
|
case AudioClock::Seconds:
|
||||||
case AudioClock::MinSec:
|
case AudioClock::MinSec:
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@
|
||||||
#include "ardour/export_handler.h"
|
#include "ardour/export_handler.h"
|
||||||
#include "ardour/export_timespan.h"
|
#include "ardour/export_timespan.h"
|
||||||
|
|
||||||
|
#include "temporal/tempo.h"
|
||||||
|
|
||||||
#include "export_timespan_selector.h"
|
#include "export_timespan_selector.h"
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
@ -302,7 +304,7 @@ ExportTimespanSelector::bbt_str (samplepos_t samples) const
|
||||||
|
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
Temporal::BBT_Time time;
|
Temporal::BBT_Time time;
|
||||||
_session->bbt_time (timepos_t (samples), time);
|
time = Temporal::TempoMap::use()->bbt_at (timepos_t (samples));
|
||||||
|
|
||||||
time.print_padded (oss);
|
time.print_padded (oss);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ VerboseCursor::set_time (samplepos_t sample)
|
||||||
|
|
||||||
switch (m) {
|
switch (m) {
|
||||||
case AudioClock::BBT:
|
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);
|
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, bbt.bars, bbt.beats, bbt.ticks);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -156,8 +156,8 @@ VerboseCursor::set_duration (samplepos_t start, samplepos_t end)
|
||||||
switch (m) {
|
switch (m) {
|
||||||
case AudioClock::BBT:
|
case AudioClock::BBT:
|
||||||
{
|
{
|
||||||
_editor->_session->bbt_time (timepos_t (start), sbbt);
|
sbbt = TempoMap::use()->bbt_at (timepos_t (start));
|
||||||
_editor->_session->bbt_time (timepos_t (end), ebbt);
|
ebbt = TempoMap::use()->bbt_at (timepos_t (end));
|
||||||
|
|
||||||
/* subtract */
|
/* subtract */
|
||||||
/* XXX this computation won't work well if the
|
/* XXX this computation won't work well if the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue