X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fticker.cc;h=e53d31bff8f5ec791cf16c99142178f722a23730;hb=60872a8504cccc0d7e6c2485af8c0362577f5723;hp=7cbaf066b54de98ae33f13e8c25fd03f06484176;hpb=110311e1860d6fb18b1985ca47f33126ae69f678;p=ardour.git diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc index 7cbaf066b5..e53d31bff8 100644 --- a/libs/ardour/ticker.cc +++ b/libs/ardour/ticker.cc @@ -53,8 +53,8 @@ void MidiClockTicker::set_session (Session* s) void MidiClockTicker::session_going_away () { - SessionHandlePtr::session_going_away(); - _midi_port = 0; + SessionHandlePtr::session_going_away(); + _midi_port = 0; } void MidiClockTicker::update_midi_clock_port() @@ -75,7 +75,7 @@ void MidiClockTicker::transport_state_changed() DEBUG_TRACE (PBD::DEBUG::MidiClock, string_compose ("Transport state change, speed: %1 position: %2 play loop: %3\n", speed, position, _session->get_play_loop()) ); - + if (speed == 1.0f) { _last_tick = position; @@ -157,10 +157,7 @@ void MidiClockTicker::tick (const framepos_t& transport_frames, const Timecode:: double MidiClockTicker::one_ppqn_in_frames (framepos_t transport_position) { const Tempo& current_tempo = _session->tempo_map().tempo_at(transport_position); - const Meter& current_meter = _session->tempo_map().meter_at(transport_position); - double frames_per_beat = - current_tempo.frames_per_beat(_session->nominal_frame_rate(), - current_meter); + double frames_per_beat = current_tempo.frames_per_beat(_session->nominal_frame_rate()); double quarter_notes_per_beat = 4.0 / current_tempo.note_type(); double frames_per_quarter_note = frames_per_beat / quarter_notes_per_beat; @@ -185,7 +182,7 @@ void MidiClockTicker::send_start_event (pframes_t offset) if (!_midi_port) { return; } - + static uint8_t _midi_clock_tick[1] = { MIDI_CMD_COMMON_START }; _midi_port->write (_midi_clock_tick, 1, offset); } @@ -195,7 +192,7 @@ void MidiClockTicker::send_continue_event (pframes_t offset) if (!_midi_port) { return; } - + static uint8_t _midi_clock_tick[1] = { MIDI_CMD_COMMON_CONTINUE }; _midi_port->write (_midi_clock_tick, 1, offset); } @@ -205,7 +202,7 @@ void MidiClockTicker::send_stop_event (pframes_t offset) if (!_midi_port) { return; } - + static uint8_t _midi_clock_tick[1] = { MIDI_CMD_COMMON_STOP }; _midi_port->write (_midi_clock_tick, 1, offset); }