Delphi-Quellcode:
BASS_SetConfig(BASS_CONFIG_NET_PREBUF, 0); // The prebuffering progress
BASS_SetConfig(BASS_CONFIG_WMA_PREBUF, 1); // The WMA prebuffering progress
Hint:
'The prebuffering progress can be monitored via BASS_StreamGetFilePosition'
'This option is disabled by default.'
Delphi-Quellcode:
// WMA Prebuffer
if (BASS_StreamGetFilePosition(Channel, BASS_FILEPOS_WMA_BUFFER) <> -1) then
repeat
progress := BASS_StreamGetFilePosition(Channel, BASS_FILEPOS_WMA_BUFFER);
if (progress = DW_ERROR) or (progress = 100) then
Break;
DoPlayChanBuffering(Progress); // Result
until
progress >75
else
begin
DoPlayChanBuffering(Progress);
repeat
Len:= BASS_StreamGetFilePosition(Channel, BASS_FILEPOS_END);
if Len = DW_ERROR then
Break;
Progress:= (BASS_StreamGetFilePosition(Channel, BASS_FILEPOS_DOWNLOAD) -
BASS_StreamGetFilePosition(Channel, BASS_FILEPOS_CURRENT)) * 100 div Len;
DoPlayChanBuffering(Progress); // Result
until
Progress > 75;