$Id$
*/
-#include <sigc++/sigc++.h>
+
+#include "pbd/signals.h"
#include "ardour/types.h"
-#include "midi++/jack.h"
+#include "ardour/session_handle.h"
+
#ifndef TICKER_H_
#define TICKER_H_
+namespace MIDI {
+ class Port;
+}
+
namespace ARDOUR
{
class Session;
-class Ticker : public sigc::trackable
+class Ticker : public SessionHandlePtr
{
public:
- Ticker() : _session(0) {};
- virtual ~Ticker() {};
+ Ticker() {};
+ virtual ~Ticker() {}
- virtual void tick(
- const nframes_t& transport_frames,
+ virtual void tick (
+ const framepos_t& transport_frames,
const BBT_Time& transport_bbt,
- const SMPTE::Time& transport_smpte) = 0;
-
- virtual void set_session(Session& s);
- virtual void going_away() { _session = 0; }
+ const Timecode::Time& transport_timecode) = 0;
-protected:
- Session* _session;
+ void set_session (Session* s);
};
class MidiClockTicker : public Ticker
}
void tick(
- const nframes_t& transport_frames,
+ const framepos_t& transport_frames,
const BBT_Time& transport_bbt,
- const SMPTE::Time& transport_smpte);
+ const Timecode::Time& transport_timecode);
- void set_session(Session& s);
- void going_away() { _midi_port = 0; Ticker::going_away(); }
+ void set_session (Session* s);
+ void session_going_away();
/// slot for the signal session::MIDIClock_PortChanged
void update_midi_clock_port();
void transport_state_changed();
/// slot for the signal session::PositionChanged
- void position_changed(nframes_t position);
+ void position_changed (framepos_t position);
/// slot for the signal session::TransportLooped
void transport_looped();
int _ppqn;
double _last_tick;
- double one_ppqn_in_frames(nframes_t transport_position);
+ double one_ppqn_in_frames (framepos_t transport_position);
- void send_midi_clock_event(nframes_t offset);
- void send_start_event(nframes_t offset);
- void send_continue_event(nframes_t offset);
- void send_stop_event(nframes_t offset);
+ void send_midi_clock_event (framecnt_t offset);
+ void send_start_event (framecnt_t offset);
+ void send_continue_event (framecnt_t offset);
+ void send_stop_event (framecnt_t offset);
};
}