Retrieves the playback length (in bytes) of a block in a file stream (WAV/MP3).
DWORD WINAPI BASS_StreamGetBlockLength( |
Parameters
handle | The stream's handle. |
Return value
If succesful, then the stream's block length is returned, else NULL is returned. Use BASS_ErrorGetCode to get the error code.
Error codes
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_NOTFILE | The stream is not a file stream... it was not created by using BASS_StreamCreateFile. |
BASS_ERROR_POSITION | The BASS_MP3_SETPOS flag was not specified when calling BASS_StreamCreateFile (MP3 only). |
Remarks
When calling BASS_ChannelSetPosition, the position is rounded down to the beginning of a block, so you can use this function to calculate the minimum position increase required to move a stream forward.
Example
To move a stream forward by the smallest possible amount.
DWORD pos=BASS_ChannelGetPosition(a_stream); // get current pos |
See also
BASS_ChannelSetPosition, BASS_StreamGetLength