SoundPool.Play(Int32, Single, Single, Int32, Int32, Single) SoundPool.Play(Int32, Single, Single, Int32, Int32, Single) Method

Definition

Play a sound from a sound ID.

[Android.Runtime.Register("play", "(IFFIIF)I", "")]
public int Play (int soundID, float leftVolume, float rightVolume, int priority, int loop, float rate);
member this.Play : int * single * single * int * int * single -> int

Parameters

soundID
Int32 Int32

a soundID returned by the load() function

leftVolume
Single Single

left volume value (range = 0.0 to 1.0)

rightVolume
Single Single

right volume value (range = 0.0 to 1.0)

priority
Int32 Int32

stream priority (0 = lowest priority)

loop
Int32 Int32

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

rate
Single Single

playback rate (1.0 = normal playback, range 0.5 to 2.0)

Returns

Remarks

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