libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
ZPlay.PlayLoop Method

Play specified segment of song, in loop if needed.

Pascal
function PlayLoop(TimeFormatStart: TTimeFormat; var StartPosition: TStreamTime; TimeFormatEnd: TTimeFormat; var EndPosition: TStreamTime; NumOfCycles: Cardinal; ContinuePlaying: Cardinal): Boolean;
Parameters 
Description 
TimeFormatStart: TTimeFormat 
Time format of StartPosition parameter. With this parameter you need to specify which member of TStreamTime is valid. 
var StartPosition: TStreamTime 
Reference to TStreamTime structure specifying loop starting position. 
TimeFormatEnd: TTimeFormat 
Time format of EndPosition parameter. With this parameter you need to specify which member of TStreamTime is valid. 
var EndPosition: TStreamTime 
Reference to TStreamTime structure specifying loop ending position. 
NumOfCycles: Cardinal 
Number of loop cycles. This value can't be 0. If this value is 1, function will play portion from pStartTime to pEndTime once. If this value is 2, function will play portion from pStartTime to pEndTime twice ... 
ContinuePlaying: Cardinal 
If this value is false, playing will stop when loop is done with cycles. If this value is true, playing will continue when loop is done with cycles. 
Return Values 
Description 
True 
All OK. 
False 
Error. To get error message read here

Previous playing will be stopped, function will seek to pStartTime and start playing. 

Note: Accuracy of seek position depends on interface settings. See accurate seek

Warning: This function will fail on dynamic stream

Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr