Calling ReadDiskStream::read_stream after the Err(ReadError::EndOfFile) error is returned produces strange behavior. I would expect read_stream to continue returning Err(ReadError::EndOfFile). Instead, what seems to happen is that subsequent calls to read_stream loop whatever happened to be in the cache before the end of the file was reached. You can hear this by running the demo player in this branch and immediately seeking near the end of the file. You will hear part of the end of the file plus some silence output in a loop.
Calling
ReadDiskStream::read_stream
after theErr(ReadError::EndOfFile)
error is returned produces strange behavior. I would expectread_stream
to continue returningErr(ReadError::EndOfFile)
. Instead, what seems to happen is that subsequent calls toread_stream
loop whatever happened to be in the cache before the end of the file was reached. You can hear this by running the demo player in this branch and immediately seeking near the end of the file. You will hear part of the end of the file plus some silence output in a loop.