From 29e0b2e5bfa0b1d107ee5644bddea06aa9cdaf8a Mon Sep 17 00:00:00 2001 From: nick_m Date: Mon, 18 Apr 2016 07:00:19 +1000 Subject: Tempo ramps - make moving music-locked meters less flakey, remove some code. --- libs/ardour/ardour/tempo.h | 2 +- libs/ardour/tempo.cc | 36 ++---------------------------------- 2 files changed, 3 insertions(+), 35 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index 68e7481d1f..c8c6af5247 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -391,7 +391,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible void gui_move_tempo_frame (TempoSection*, const framepos_t& frame); void gui_move_tempo_beat (TempoSection*, const double& frame); void gui_move_meter (MeterSection*, const framepos_t& frame); - void gui_move_meter (MeterSection*, const double& beat); + void gui_move_meter (MeterSection*, const double& pulse); bool gui_change_tempo (TempoSection*, const Tempo& bpm); bool can_solve_bbt (TempoSection* section, const Timecode::BBT_Time& bbt); diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 46761153b7..b37d5efb93 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1932,23 +1932,7 @@ TempoMap::solve_map (Metrics& imaginary, TempoSection* section, const framepos_t recompute_meters (imaginary); return true; } -#if (0) - MetricSectionSorter cmp; - imaginary.sort (cmp); - if (section->position_lock_style() == MusicTime) { - /* we're setting the frame */ - section->set_position_lock_style (AudioTime); - recompute_tempos (imaginary); - section->set_position_lock_style (MusicTime); - } else { - recompute_tempos (imaginary); - } - if (check_solved (imaginary, true)) { - recompute_meters (imaginary); - return true; - } -#endif //dump (imaginary, std::cerr); return false; @@ -2023,23 +2007,7 @@ TempoMap::solve_map (Metrics& imaginary, TempoSection* section, const double& pu recompute_meters (imaginary); return true; } -#if (0) - MetricSectionFrameSorter fcmp; - imaginary.sort (fcmp); - if (section->position_lock_style() == AudioTime) { - /* we're setting the pulse */ - section->set_position_lock_style (MusicTime); - recompute_tempos (imaginary); - section->set_position_lock_style (AudioTime); - } else { - recompute_tempos (imaginary); - } - if (check_solved (imaginary, false)) { - recompute_meters (imaginary); - return true; - } -#endif //dump (imaginary, std::cerr); return false; @@ -2347,11 +2315,11 @@ TempoMap::gui_move_meter (MeterSection* ms, const framepos_t& frame) } void -TempoMap::gui_move_meter (MeterSection* ms, const double& beat) +TempoMap::gui_move_meter (MeterSection* ms, const double& pulse) { { Glib::Threads::RWLock::WriterLock lm (lock); - solve_map (_metrics, ms, pulse_at_beat_locked (_metrics, beat)); + solve_map (_metrics, ms, pulse); } MetricPositionChanged (); // Emit Signal -- cgit v1.2.3