JUCE
JUCE copied to clipboard
[Bug]: AudioFormatReaderSource::getNextAudioBlock() incorrect when looping short files
Detailed steps on how to reproduce the bug
AudioFormatReaderSource::getNextAudioBlock() does not properly handle looping when the source file is shorter than the buffer.
The issue was described on the forum in 2016 and I wanted to raise it again here since I am running into it. The forum thread includes the patch to fix it.
What is the expected behaviour?
A short file should loop the same as a long one does.
Operating systems
Other
What versions of the operating systems?
All, independent of OS
Architectures
Other
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
I have not tested against the develop branch
Code of Conduct
- [X] I agree to follow the Code of Conduct
BTW I selected "The bug is present on the develop branch" when creating the issue.
Thank you for reporting. 5b604e6d3c47c89ccd96a6c1b090a787b58604d4 fixes this issue.