Tempo ramps - fix crash with simplest case.
This commit is contained in:
@@ -109,7 +109,6 @@ class LIBARDOUR_API MetricSection {
|
||||
virtual ~MetricSection() {}
|
||||
|
||||
const double& pulse () const { return _pulse; }
|
||||
//const double tick () const { return _beat * Timecode::BBT_Time::ticks_per_beat; }
|
||||
void set_pulse (double pulse) { _pulse = pulse; }
|
||||
|
||||
framepos_t frame() const { return _frame; }
|
||||
@@ -155,7 +154,7 @@ class LIBARDOUR_API MeterSection : public MetricSection, public Meter {
|
||||
}
|
||||
|
||||
const Timecode::BBT_Time& bbt() const { return _bbt; }
|
||||
double beat () { return _beat; }
|
||||
const double& beat () const { return _beat; }
|
||||
void set_beat (double beat) { _beat = beat; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -2484,7 +2484,7 @@ TempoMap::meter_section_at_locked (framepos_t frame) const
|
||||
|
||||
if ((t = dynamic_cast<MeterSection*> (*i)) != 0) {
|
||||
|
||||
if ((*i)->frame() > frame_off) {
|
||||
if (prev && (*i)->frame() > frame) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2656,7 +2656,7 @@ TempoMap::dump (Metrics& metrics, std::ostream& o) const
|
||||
prev_ts = t;
|
||||
} else if ((m = dynamic_cast<const MeterSection*>(*i)) != 0) {
|
||||
o << "Meter @ " << *i << ' ' << m->divisions_per_bar() << '/' << m->note_divisor() << " at " << m->bbt() << " frame= " << m->frame()
|
||||
<< " pulse: " << m->pulse() << " pos lock: " << enum_2_string (m->position_lock_style()) << " (movable? " << m->movable() << ')' << endl;
|
||||
<< " pulse: " << m->pulse() << " beat : " << m->beat() << " pos lock: " << enum_2_string (m->position_lock_style()) << " (movable? " << m->movable() << ')' << endl;
|
||||
}
|
||||
}
|
||||
o << "------" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user