Tempo ramps - more code cleanup, fix cross-marker jumping using tempo dialog bbt

This commit is contained in:
nick_m
2016-05-21 04:48:42 +10:00
parent 6894f468d4
commit d1a075110a
4 changed files with 14 additions and 12 deletions

View File

@@ -392,7 +392,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
void remove_meter (const MeterSection&, bool send_signal);
framepos_t predict_tempo_frame (TempoSection* section, const Timecode::BBT_Time& bbt);
double predict_tempo_pulse (TempoSection* section, const framepos_t& frame);
double predict_tempo_pulse (TempoSection* section, const Timecode::BBT_Time& bbt);
void replace_tempo (const TempoSection&, const Tempo&, const double& pulse, const framepos_t& frame
, TempoSection::Type type, PositionLockStyle pls);

View File

@@ -2339,14 +2339,15 @@ TempoMap::predict_tempo_frame (TempoSection* section, const BBT_Time& bbt)
}
double
TempoMap::predict_tempo_pulse (TempoSection* section, const framepos_t& frame)
TempoMap::predict_tempo_pulse (TempoSection* section, const BBT_Time& bbt)
{
Glib::Threads::RWLock::ReaderLock lm (lock);
Metrics future_map;
double ret = 0.0;
TempoSection* tempo_copy = copy_metrics_and_point (_metrics, future_map, section);
const double beat = bbt_to_beats_locked (future_map, bbt);
if (solve_map_frame (future_map, tempo_copy, frame)) {
if (solve_map_pulse (future_map, tempo_copy, pulse_at_beat_locked (future_map, beat))) {
ret = tempo_copy->pulse();
} else {
ret = section->pulse();