MIDClock_Slave: Introduce a 3% deadzone around speed 1.0 to lock in the speed
git-svn-id: svn://localhost/ardour2/branches/3.0@6593 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
43e15be62f
commit
706d6e8ff0
@ -346,6 +346,10 @@ MIDIClock_Slave::speed_and_position (double& speed, nframes64_t& pos)
|
||||
|
||||
// calculate speed
|
||||
speed = ((t1 - t0) * session->frame_rate()) / one_ppqn_in_frames;
|
||||
|
||||
// provide a 3% deadzone to lock the speed
|
||||
if (fabs(speed - 1.0) <= 0.03)
|
||||
speed = 1.0;
|
||||
|
||||
// calculate position
|
||||
if (engine_now > last_timestamp) {
|
||||
|
@ -15,9 +15,10 @@ MIDIClock_SlaveTest::testStepResponse ()
|
||||
MIDI::Parser* parser = 0;
|
||||
|
||||
TestSlaveSessionProxy *sess = (TestSlaveSessionProxy *) session;
|
||||
nframes64_t period_size = 1024;
|
||||
nframes64_t period_size = 4096;
|
||||
sess->set_period_size (period_size);
|
||||
|
||||
|
||||
bandwidth = 1.0 / 60.0;
|
||||
|
||||
nframes64_t start_time = 1000000;
|
||||
start (*parser, start_time);
|
||||
|
Loading…
Reference in New Issue
Block a user