I have noticed an issue in the way FileInputStream is implemented
Currently it does not allow to open a file which is being written at the same time as the totalSize is initialized when the stream is constructed leading to an issue in getTotalLength, setPosition and other func.
My advice would be to not to store totalSize
call file.getSize(); in getTotalLength
and I don’t see the reason behind the lazy implementation of setPosition either.
I would call directly juce_fileSetPosition so you can spot using this function an eventual out of bound seek. Currently it always returns true.
Let me know what do you think.