Adjust start delays, put an end point on sinusoid

This commit is contained in:
Chris Cannam
2024-06-28 18:08:57 +01:00
parent ad1811b8a1
commit 26618585c6
2 changed files with 57 additions and 17 deletions

View File

@@ -281,10 +281,9 @@ R3LiveShifter::getStartDelay() const
int total = outDelay;
int bs = getBlockSize();
if (m_pitchScale > 1.0) {
total += bs - 1;
total += bs * (m_pitchScale - 1.0);
} else if (m_pitchScale < 1.0) {
int scaled = int(ceil(bs / m_pitchScale));
total -= bs * (scaled - bs) / bs;
total -= bs * (1.0 / m_pitchScale - 1.0);
}
m_log.log(2, "R3LiveShifter::getStartDelay: inDelay, outDelay", inDelay, outDelay);