From fc3be1d42c6400896a85edbc83bda38242cec30a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 27 Jan 2012 13:27:01 +0000 Subject: [PATCH] further simplification of midi clock ticker API git-svn-id: svn://localhost/ardour2/branches/3.0@11361 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/ticker.h | 4 +--- libs/ardour/session_process.cc | 13 +------------ libs/ardour/ticker.cc | 4 ++-- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/libs/ardour/ardour/ticker.h b/libs/ardour/ardour/ticker.h index 144d85f601..23d2ef2fe6 100644 --- a/libs/ardour/ardour/ticker.h +++ b/libs/ardour/ardour/ticker.h @@ -44,9 +44,7 @@ public: MidiClockTicker (); virtual ~MidiClockTicker() {}; - void tick (const framepos_t& transport_frames, - const Timecode::BBT_Time& transport_bbt, - const Timecode::Time& transport_timecode); + void tick (const framepos_t& transport_frames); bool has_midi_port() const { return _midi_port != 0; } diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 29f815d608..d79e2b2c67 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -89,18 +89,7 @@ Session::process (pframes_t nframes) try { if (Config->get_send_midi_clock() && transport_speed() == 1.0f && midi_clock->has_midi_port()) { - - /* As of january 26th 2012, MidiClockTicker::tick() - * doesn't actually these variables, so don't waste - * cycles computing them. - */ - - Timecode::BBT_Time transport_bbt; - Timecode::Time transport_timecode; - // _tempo_map->bbt_time_rt (transport_at_start, transport_bbt); - // timecode_time (transport_at_start, transport_timecode); - - midi_clock->tick (transport_at_start, transport_bbt, transport_timecode); + midi_clock->tick (transport_at_start); } } catch (...) { /* don't bother with a message */ diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc index a53f6ceda2..5152568022 100644 --- a/libs/ardour/ticker.cc +++ b/libs/ardour/ticker.cc @@ -104,7 +104,7 @@ void MidiClockTicker::transport_state_changed() send_stop_event(0); } - tick (position, *((Timecode::BBT_Time *) 0), *((Timecode::Time *)0)); + tick (position); } void MidiClockTicker::position_changed (framepos_t position) @@ -130,7 +130,7 @@ void MidiClockTicker::transport_looped() _last_tick = loop_location->start() - elapsed_since_last_tick; } -void MidiClockTicker::tick (const framepos_t& transport_frames, const Timecode::BBT_Time& /*transport_bbt*/, const Timecode::Time& /*transport_smpt*/) +void MidiClockTicker::tick (const framepos_t& transport_frames) { if (!Config->get_send_midi_clock() || _session == 0 || _session->transport_speed() != 1.0f || _midi_port == 0) return;