BASS.NET API for the Un4seen BASS Audio LibraryFILEREADPROC DelegateBASS.NET API for the Un4seen BASS Audio Library
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.12.0
Syntax

public delegate int FILEREADPROC(
	IntPtr buffer,
	int length,
	IntPtr user
)

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: Int32
The number of bytes read... -1 = end of file, 0 = end of file (buffered file stream only).
Remarks

During creation of the stream, this function should try to return the amount of data requested. After that, it can just return whatever is available up to the requested amount.

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 BASS_FILEPROCS.
See Also

Reference