13
0

Add a 1% speed deadzone around speed=1.0 for LTC, MTC slaves

trade-off constant re-sampling to achieve sample-delta ~0,
with trying to avoid resampling if the delta is within
1% of the sample-rate.

git-svn-id: svn://localhost/ardour2/branches/3.0@13300 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Robin Gareus 2012-10-17 15:57:53 +00:00
parent c4cb4fa141
commit f6eeb47482
2 changed files with 12 additions and 0 deletions

View File

@ -512,6 +512,12 @@ LTC_Slave::speed_and_position (double& speed, framepos_t& pos)
return true;
}
#if 1
/* provide a 1% deadzone to lock the speed */
if (fabs(speed - 1.0) <= 0.01)
speed = 1.0;
#endif
return true;
}

View File

@ -628,6 +628,12 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos)
queue_reset (false);
}
#if 1
/* provide a 1% deadzone to lock the speed */
if (fabs(speed - 1.0) <= 0.01)
speed = 1.0;
#endif
DEBUG_TRACE (DEBUG::MTC, string_compose ("MTCsync spd: %1 pos: %2 | last-pos: %3 elapsed: %4 delta: %5\n",
speed, pos, last.position, elapsed, pos - sess_pos));