#include <vector>
#include <glibmm/thread.h>
+#include <boost/signals2.hpp>
#include <jack/jack.h>
-#include <sigc++/signal.h>
+#include "pbd/signals.h"
+
#include "ardour/types.h"
#include "midi++/parser.h"
#include "midi++/types.h"
* and after the method call they should
*
* Session::follow_slave will then try to follow the given
- * <emph>position</emph> using a delay locked loop (DLL),
+ * <em>position</em> using a delay locked loop (DLL),
* starting with the first given transport speed.
* If the values of speed and position contradict each other,
* ARDOUR will always follow the position and disregard the speed.
/**
* @return the number of frames that this slave wants to seek ahead. Relevant
- * only if @func requires_seekahead() returns true.
+ * only if requires_seekahead() returns true.
*/
virtual nframes64_t seekahead_distance() const { return 0; }
}
};
-class MTC_Slave : public Slave, public sigc::trackable {
+class MTC_Slave : public Slave {
public:
MTC_Slave (Session&, MIDI::Port&);
~MTC_Slave ();
private:
Session& session;
MIDI::Port* port;
- std::vector<sigc::connection> connections;
+ PBD::ScopedConnectionList port_connections;
bool can_notify_on_unknown_rate;
PIChaser* pic;
bool have_first_speed_accumulator;
double average_speed;
Glib::Mutex reset_lock;
- bool reset_pending;
+ uint32_t reset_pending;
+ bool reset_position;
- void reset ();
- void queue_reset ();
+ void reset (bool with_pos);
+ void queue_reset (bool with_pos);
void maybe_reset ();
void update_mtc_qtr (MIDI::Parser&, int, nframes_t);
void process_apparent_speed (double);
};
-class MIDIClock_Slave : public Slave, public sigc::trackable {
+class MIDIClock_Slave : public Slave {
public:
MIDIClock_Slave (Session&, MIDI::Port&, int ppqn = 24);
/// Constructor for unit tests
- MIDIClock_Slave (ISlaveSessionProxy* session_proxy, int ppqn = 24);
+ MIDIClock_Slave (ISlaveSessionProxy* session_proxy = 0, int ppqn = 24);
~MIDIClock_Slave ();
void rebind (MIDI::Port&);
void set_bandwidth (double a_bandwith) { bandwidth = a_bandwith; }
- private:
+ protected:
ISlaveSessionProxy* session;
MIDI::Port* port;
- std::vector<sigc::connection> connections;
+ PBD::ScopedConnectionList port_connections;
/// pulses per quarter note for one MIDI clock frame (default 24)
int ppqn;