Avoid resetting m_prevOuthop on every set-ratio call (client may call this very repeatedly)
This commit is contained in:
@@ -90,6 +90,8 @@ R3StretcherImpl::R3StretcherImpl(Parameters parameters,
|
|||||||
(new Resampler(resamplerParameters, m_parameters.channels));
|
(new Resampler(resamplerParameters, m_parameters.channels));
|
||||||
|
|
||||||
calculateHop();
|
calculateHop();
|
||||||
|
|
||||||
|
m_prevOuthop = int(round(m_inhop * getEffectiveRatio()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -124,13 +126,6 @@ R3StretcherImpl::calculateHop()
|
|||||||
double inhop = std::min(proposedOuthop / ratio, 340.0);
|
double inhop = std::min(proposedOuthop / ratio, 340.0);
|
||||||
m_inhop = int(round(inhop));
|
m_inhop = int(round(inhop));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_prevOuthop = int(round(m_inhop * ratio));
|
|
||||||
|
|
||||||
std::ostringstream str;
|
|
||||||
str << "R3StretcherImpl::calculateHop: for effective ratio " << ratio
|
|
||||||
<< " calculated (typical) inhop of " << m_inhop << std::endl;
|
|
||||||
m_parameters.logger(str.str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
|
|||||||
Reference in New Issue
Block a user