Introduce getPreferredStartPad(), deprecate getLatency() and replace with getStartDelay(); document and test both

This commit is contained in:
Chris Cannam
2022-07-05 17:53:36 +01:00
parent 31984af826
commit 72654b04ea
8 changed files with 255 additions and 70 deletions

View File

@@ -829,7 +829,14 @@ R2Stretcher::reconfigure()
}
size_t
R2Stretcher::getLatency() const
R2Stretcher::getPreferredStartPad() const
{
if (!m_realtime) return 0;
return m_aWindowSize/2;
}
size_t
R2Stretcher::getStartDelay() const
{
if (!m_realtime) return 0;
return lrint((m_aWindowSize/2) / m_pitchScale);