Minimum required version: 1.37

=> | R0 = | frame of loop start
| R1 = | frame after loop end
| R2 = | number of times to loop (<0 to read)

<= | R0 = | actual start frame set
| R1 = | actual end frame set
| R2 = | number of loops left

Play looping sets up a range of sample frames to play in a cycling loop. Once the play pointer reaches the frame set by R1 the loop counter is decremented. If the counter is non-zero playback continues from the frame set by R0. If the counter decrements to zero play continues beyond the loop end-frame until the pause point (see PlayIt_PauseAt ) or stop point (see PlayIt_BeginEnd ) is reached.

This call does not affect the current play pointer (whether it's playing or not) so setting the pointer with PlayIt_SetPtr may be required if you wish to force playback to start from the loop start.

A loop count of one will disable looping (it would have no effect anyway). A loop count of zero will loop indefinately while a negative loop count has no effect and the current settings are returned.

Play looping will be disabled by setting R0 <= R1. R0 and R1 are returned with -1 if play looping get disabled. ADPCM formats always get both ends of the loop rounded back to the start of the block.

[ Parent ] [ Manual root ]