JD557 / minart

A minimal Scala creative coding library targeting JVM/Javascript/Native
MIT License
52 stars 3 forks source link

Fix resource loading #474

Closed JD557 closed 8 months ago

JD557 commented 8 months ago

In some instances, reading a byte array from an InputStream might not return all the requested bytes, even if the file has not reached it's end. In this situation, Minart was loading corrupted data (it was inserting zeros).

Now, when this happens, the byte reader falls back to a slower strategy for the rest of the batch.

This PR also fixes the resource loading order documentation, along with the exists() check, and avoids loading so many batches in the QOA reader.