Point::sample() rename, but for the GUI
This commit is contained in:
@@ -1839,7 +1839,7 @@ CueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sample
|
||||
}
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1863,7 +1863,7 @@ CueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sample
|
||||
}
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample(sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1883,7 +1883,7 @@ CueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sample
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Minor;
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1897,7 +1897,7 @@ CueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sample
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, bbt.bars);
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1914,7 +1914,7 @@ CueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sample
|
||||
|
||||
BBT_Time bbt ((*i).bbt());
|
||||
|
||||
if ((*i).sample (sr) < leftmost && (bbt_bar_helper_on)) {
|
||||
if ((*i).sample_is_dangerous (sr) < leftmost && (bbt_bar_helper_on)) {
|
||||
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, bbt.bars, bbt.beats);
|
||||
edit_last_mark_label (marks, buf);
|
||||
} else {
|
||||
@@ -1930,7 +1930,7 @@ CueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sample
|
||||
buf[0] = '\0';
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1953,7 +1953,7 @@ CueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sample
|
||||
|
||||
BBT_Time bbt ((*i).bbt());
|
||||
|
||||
if ((*i).sample (sr) < leftmost && (bbt_bar_helper_on)) {
|
||||
if ((*i).sample_is_dangerous (sr) < leftmost && (bbt_bar_helper_on)) {
|
||||
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, bbt.bars, bbt.beats);
|
||||
edit_last_mark_label (marks, buf);
|
||||
helper_active = true;
|
||||
@@ -1970,11 +1970,11 @@ CueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sample
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
if (((*i).sample(sr) < bbt_position_of_helper) && helper_active) {
|
||||
if (((*i).sample_is_dangerous (sr) < bbt_position_of_helper) && helper_active) {
|
||||
buf[0] = '\0';
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3141,7 +3141,7 @@ MeterMarkerDrag::motion (GdkEvent* event, bool first_move)
|
||||
/* it was moved */
|
||||
_editor.mid_tempo_change (Editor::MeterChanged);
|
||||
show_verbose_cursor_time (timepos_t (_marker->meter ().beats ()));
|
||||
editing_context.set_snapped_cursor_position (timepos_t (_marker->meter ().sample (editing_context.session ()->sample_rate ())));
|
||||
editing_context.set_snapped_cursor_position (timepos_t (_marker->meter ().sample_is_dangerous (editing_context.session ()->sample_rate ())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3806,7 +3806,7 @@ TempoEndDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
||||
if ((prev = map->previous_tempo (*_tempo)) != 0) {
|
||||
_editor.tempo_curve_selected (prev, true);
|
||||
const samplecnt_t sr = _editor.session ()->sample_rate ();
|
||||
sstr << "end: " << fixed << setprecision (3) << map->tempo_at (samples_to_superclock (_tempo->sample (sr) - 1, sr)).end_note_types_per_minute () << "\n";
|
||||
sstr << "end: " << fixed << setprecision (3) << map->tempo_at (samples_to_superclock (_tempo->sample_is_dangerous (sr) - 1, sr)).end_note_types_per_minute () << "\n";
|
||||
}
|
||||
|
||||
if (_tempo->continuing ()) {
|
||||
@@ -3846,7 +3846,7 @@ TempoEndDrag::motion (GdkEvent* event, bool first_move)
|
||||
|
||||
ostringstream sstr;
|
||||
const samplecnt_t sr = editing_context.session ()->sample_rate ();
|
||||
sstr << "end: " << fixed << setprecision (3) << map->tempo_at (samples_to_superclock (_tempo->sample (sr) - 1, sr)).end_note_types_per_minute () << "\n";
|
||||
sstr << "end: " << fixed << setprecision (3) << map->tempo_at (samples_to_superclock (_tempo->sample_is_dangerous (sr) - 1, sr)).end_note_types_per_minute () << "\n";
|
||||
|
||||
if (_tempo->continuing ()) {
|
||||
sstr << "start: " << fixed << setprecision (3) << _tempo->note_types_per_minute ();
|
||||
|
||||
@@ -1087,7 +1087,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
|
||||
#if 0 // DEBUG GRID
|
||||
for (auto const& g : grid) {
|
||||
std::cout << "Grid " << g.time() << " Beats: " << g.beats() << " BBT: " << g.bbt() << " sample: " << g.sample(_session->nominal_sample_rate ()) << "\n";
|
||||
std::cout << "Grid " << g.time() << " Beats: " << g.beats() << " BBT: " << g.bbt() << " sample: " << g.sample_is_dangerous (_session->nominal_sample_rate ()) << "\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1122,7 +1122,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
}
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1146,7 +1146,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
}
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample(sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1166,7 +1166,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Minor;
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1180,7 +1180,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, bbt.bars);
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1197,7 +1197,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
|
||||
BBT_Time bbt ((*i).bbt());
|
||||
|
||||
if ((*i).sample (sr) < lower && (bbt_bar_helper_on)) {
|
||||
if ((*i).sample_is_dangerous (sr) < lower && (bbt_bar_helper_on)) {
|
||||
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, bbt.bars, bbt.beats);
|
||||
edit_last_mark_label (marks, buf);
|
||||
} else {
|
||||
@@ -1213,7 +1213,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
buf[0] = '\0';
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
@@ -1236,7 +1236,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
|
||||
BBT_Time bbt ((*i).bbt());
|
||||
|
||||
if ((*i).sample (sr) < lower && (bbt_bar_helper_on)) {
|
||||
if ((*i).sample_is_dangerous (sr) < lower && (bbt_bar_helper_on)) {
|
||||
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, bbt.bars, bbt.beats);
|
||||
edit_last_mark_label (marks, buf);
|
||||
helper_active = true;
|
||||
@@ -1253,11 +1253,11 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
if (((*i).sample(sr) < bbt_position_of_helper) && helper_active) {
|
||||
if (((*i).sample_is_dangerous (sr) < bbt_position_of_helper) && helper_active) {
|
||||
buf[0] = '\0';
|
||||
}
|
||||
mark.label = buf;
|
||||
mark.position = (*i).sample (sr);
|
||||
mark.position = (*i).sample_is_dangerous (sr);
|
||||
marks.push_back (mark);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ Editor::make_tempo_marker (Temporal::TempoPoint const * ts, TempoPoint const *&
|
||||
const std::string tname (X_(""));
|
||||
char const * color_name = X_("tempo marker");
|
||||
|
||||
tempo_marks.insert (before, new TempoMarker (*this, *tempo_group, color_name, tname, *ts, ts->sample (sr), tc_color));
|
||||
tempo_marks.insert (before, new TempoMarker (*this, *tempo_group, color_name, tname, *ts, ts->sample_is_dangerous (sr), tc_color));
|
||||
|
||||
/* XXX the point of this code was "a jump in tempo by more than 1 ntpm results in a red
|
||||
tempo mark pointer." (3a7bc1fd3f32f0)
|
||||
@@ -278,7 +278,7 @@ Editor::update_tempo_curves (double min_tempo, double max_tempo, samplecnt_t sr)
|
||||
|
||||
if (tmp != tempo_marks.end()) {
|
||||
TempoMarker* nxt = static_cast<TempoMarker*>(*tmp);
|
||||
curve.set_duration (nxt->tempo().sample(sr) - tm->tempo().sample(sr));
|
||||
curve.set_duration (nxt->tempo().sample_is_dangerous (sr) - tm->tempo().sample_is_dangerous (sr));
|
||||
} else {
|
||||
curve.set_duration (samplecnt_t (UINT32_MAX));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user