1 #include <sigc++/sigc++.h>
2 #include "midi_clock_slave_test.h"
5 using namespace ARDOUR;
7 CPPUNIT_TEST_SUITE_REGISTRATION( MIDIClock_SlaveTest );
10 MIDIClock_SlaveTest::testStepResponse ()
13 nframes64_t position = 0;
15 MIDI::Parser* parser = 0;
17 TestSlaveSessionProxy *sess = (TestSlaveSessionProxy *) session;
18 nframes64_t period_size = 4096;
19 sess->set_period_size (period_size);
21 bandwidth = 1.0 / 60.0;
23 nframes64_t start_time = 1000000;
24 start (*parser, start_time);
26 update_midi_clock (*parser, start_time);
28 for (nframes64_t i = 1; i<= 100 * period_size; i++) {
29 if (i % nframes64_t(one_ppqn_in_frames) == 0) {
30 update_midi_clock (*parser, start_time + i);
33 if (i % period_size == 0) {
35 speed_and_position (speed, position);
36 sess->request_transport_speed (speed);