Notification of a file system error

Started by MB_SOFT,

MB_SOFT

Hi Ian,
is it possible to receive a notification of a file system error while streaming a local file with BASS_StreamCreateFile on Windows?

I have one user that is reporting me occasional interruptions in file playback and all i can see in my logs is that BASS has freed the channel (due to BASS_Mixer_StreamAddChannel with BASS_STREAM_AUTOFREE)

Is there anyway to distinguish if the stream has ended due to an error? and eventually get a filesystem error code?

if not it would be a good addition to have a sync that will notify that a read error occurred and eventually the error code

Ian @ un4seen

There isn't currently a notification for file errors, but I think one way you could detect that is by checking if the reported filesize is smaller when the stream ends (eg. in a mixtime BASS_SYNC_END sync callback) than it was when you opened the stream. You can check the filesize with BASS_StreamGetFilePosition. The BASS_FILEPOS_END option should work for that purpose with all BASS versions, and BASS_FILEPOS_SIZE should also work with recent BASS builds.