Further work on end state with long process sizes in R2. This passes tests but is not the minimal necessary change I think - review.
This commit is contained in:
@@ -307,7 +307,10 @@ R2Stretcher::setExpectedInputDuration(size_t samples)
|
||||
void
|
||||
R2Stretcher::setMaxProcessSize(size_t samples)
|
||||
{
|
||||
m_log.log(2, "R2Stretcher::setMaxProcessSize", samples);
|
||||
if (samples <= m_maxProcessSize) return;
|
||||
|
||||
m_log.log(2, "R2Stretcher::setMaxProcessSize: increasing from, to", m_maxProcessSize, samples);
|
||||
m_maxProcessSize = samples;
|
||||
|
||||
reconfigure();
|
||||
@@ -1232,6 +1235,8 @@ R2Stretcher::process(const float *const *input, size_t samples, bool final)
|
||||
{
|
||||
Profiler profiler("R2Stretcher::process");
|
||||
|
||||
m_log.log(2, "process entering, samples and final", samples, final);
|
||||
|
||||
if (m_mode == Finished) {
|
||||
m_log.log(0, "R2Stretcher::process: Cannot process again after final chunk");
|
||||
return;
|
||||
@@ -1294,10 +1299,16 @@ R2Stretcher::process(const float *const *input, size_t samples, bool final)
|
||||
consumed[c],
|
||||
samples - consumed[c],
|
||||
final);
|
||||
if (c == 0) {
|
||||
m_log.log(2, "consumed channel 0, consumed and samples now", consumed[c], samples);
|
||||
}
|
||||
if (consumed[c] < samples) {
|
||||
allConsumed = false;
|
||||
} else {
|
||||
if (final) {
|
||||
if (c == 0) {
|
||||
m_log.log(2, "final is true, setting input size", m_channelData[c]->inCount);
|
||||
}
|
||||
m_channelData[c]->inputSize = m_channelData[c]->inCount;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user