setLoopCount
Sets the number of times the audio effect is looped.
int setLoopCount(int loopCount);
Note: After looping playback completes, the SDK triggers the onPlayerStateChanged callback and reports the playback state as
PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED.Parameters
- loopCount
- The number of times the audio effect is looped:
- ≥ 0: Number of times to play. For example, 0 means no looping, play once only; 1 means loop once, play twice in total.
- -1: Loop the audio file infinitely.
Return Values
- 0: The method call succeeds.
- < 0: The method call fails.