lengthInSamples related bugs

#1

In AudioFormatReader lengthInSamples is an int64, but in searchForLevel it gets cast to an int before a comparison. Bug?

I’ve also a place, but forgotten where now, where it’s assumed that lengthInSamples != std::numeric_limits::max() … which unfortunately my special reader used to say it was infinitely long…

Might be worth a bit of a code review where the int64 size numbers are used at some point.

Not really sure what’s going no here as both bufferStart and lengthInSamples are already int64s?

    if (bufferStart >= (int) lengthInSamples)
        break;
0 Likes

#2

This was fixed in 4b92a04e2 (between 5.4.0 and 5.4.1).

1 Like

#3

Oh nice. Didn’t spot that - should have checked :wink:

0 Likes