* Various tweaks to improve performance at large ratios

This commit is contained in:
Chris Cannam
2007-11-16 22:22:01 +00:00
parent 94f85c2db4
commit 35dc16b611
4 changed files with 39 additions and 9 deletions

View File

@@ -303,7 +303,8 @@ RubberBandStretcher::Impl::calculateSizes()
inputIncrement /= 2;
outputIncrement = lrint(ceil(inputIncrement * r));
}
blockSize = std::max(blockSize, roundUp(outputIncrement * 4.5));
blockSize = std::max(blockSize, roundUp(outputIncrement * 6));
if (r > 5) while (blockSize < 8192) blockSize *= 2;
}
} else {
@@ -327,6 +328,7 @@ RubberBandStretcher::Impl::calculateSizes()
inputIncrement = int(outputIncrement / r);
}
blockSize = std::max(blockSize, roundUp(outputIncrement * 6));
if (r > 5) while (blockSize < 8192) blockSize *= 2;
}
}
@@ -391,7 +393,7 @@ RubberBandStretcher::Impl::calculateSizes()
//necessary. clearly something wrong in our calculations... or do
//we just need to ensure client calls setMaxProcessBlockSize?
if (!m_realtime && !m_threaded) {
//!!! m_outbufSize = m_outbufSize * 2;
m_outbufSize = m_outbufSize * 2;
}
}