JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

[Bug]: AudioFormatReaderSource::getNextAudioBlock() incorrect when looping short files

Open jcoalson opened this issue 1 year ago • 1 comments

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

jcoalson avatar May 29 '24 20:05 jcoalson

BTW I selected "The bug is present on the develop branch" when creating the issue.

jcoalson avatar May 29 '24 20:05 jcoalson

Thank you for reporting. 5b604e6d3c47c89ccd96a6c1b090a787b58604d4 fixes this issue.

szarvas avatar Dec 09 '24 08:12 szarvas