Share via


SoundPool.SetLoop(Int32, Int32) Method

Definition

Set loop mode.

[Android.Runtime.Register("setLoop", "(II)V", "")]
public void SetLoop (int streamID, int loop);
[<Android.Runtime.Register("setLoop", "(II)V", "")>]
member this.SetLoop : int * int -> unit

Parameters

streamID
Int32

a streamID returned by the play() function

loop
Int32

loop mode (0 = no loop, -1 = loop forever)

Attributes

Remarks

Set loop mode.

Change the loop mode. A loop value of -1 means loop forever, a value of 0 means don't loop, other values indicate the number of repeats, e.g. a value of 1 plays the audio twice. If the stream does not exist, it will have no effect.

Java documentation for android.media.SoundPool.setLoop(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to