User stream writing callback function.
DWORD CALLBACK YourStreamProc{ |
Parameters
handle | The stream that needs writing. |
buffer | The buffer to write the sample data in. The sample data must be written in standard Windows PCM format... 8 bit samples are unsigned, 16 bit samples are signed. |
length | The number of BYTES to write. |
user | The user instance data given when BASS_StreamCreate was called. |
Return value
The number of bytes written by the function. If this number is less than length, then the stream is assumed to be at the end, and is stopped.
Remarks
A stream writing function should obviously be as quick as possible, other streams (and MOD musics) can't be mixed until it's finished.
Example
A callback function to stream a file, in 44100hz 16 bit stereo.
FILE *file; |
See also
BASS_StreamCreate