Ensure we consume when called with final=true and no samples - this was the default behaviour in R2 and also initially in R3 but changed when resample-before modes were added

This commit is contained in:
Chris Cannam
2023-02-20 15:25:27 +00:00
parent b317d0e81a
commit 320fb2f7fe

View File

@@ -679,7 +679,13 @@ R3Stretcher::process(const float *const *input, size_t samples, bool final)
int channels = m_parameters.channels; int channels = m_parameters.channels;
int inputIx = 0; int inputIx = 0;
while (inputIx < int(samples)) { if (samples == 0 && final) {
m_log.log(2, "process: no samples but final specified, consuming");
consume();
} else while (inputIx < int(samples)) {
int remaining = int(samples) - inputIx; int remaining = int(samples) - inputIx;
int ws = m_channelData[0]->inbuf->getWriteSpace(); int ws = m_channelData[0]->inbuf->getWriteSpace();