User file stream read callback function (to be used with BASS_FILEPROCS).
Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- buffer
- Type: SystemIntPtr
Pointer to the buffer to put the data in. - length
- Type: SystemInt32
Maximum number of bytes to read. - user
- Type: SystemIntPtr
The user instance data given when BASS_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr) was called.
Return Value
Type: Int32The number of bytes read... -1 = end of file, 0 = end of file (buffered file stream only).
Remarks
For an unbuffered file stream during playback, this function should be as quick as possible - any delays will not only affect the decoding of the current stream, but also all other streams and MOD musics that are playing. It is better to return less data (even none) rather than wait for more data. A buffered file stream isn't affected by delays like this, as this function runs in its own thread then.
Examples
See Also