diff options
author | Robin Gareus <robin@gareus.org> | 2012-10-17 15:57:53 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-10-17 15:57:53 +0000 |
commit | f6eeb474824224638dad592e4776823e633b4329 (patch) | |
tree | ff7a67b450d4a3a46e6f4c5963f28d13cf6197d7 /libs/ardour/ltc_slave.cc | |
parent | c4cb4fa1417bd2c19654e449b285b171e2130eca (diff) |
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
Diffstat (limited to 'libs/ardour/ltc_slave.cc')
-rw-r--r-- | libs/ardour/ltc_slave.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index 0247a5168f..cbb53c1aad 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -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; } |