common-ktx

//library/ss_n.common_ktx/SoundPool

SoundPool

[androidJvm]
object SoundPool

SoundPool android.media.SoundPool Wrapper Class

Functions

Name Summary
init [androidJvm]
fun init(context: Context, files: List<Int>, usage: Int = AudioAttributes.USAGE_GAME, contentType: Int = AudioAttributes.CONTENT_TYPE_SPEECH, listener: (MutableList<Int>) -> Unit)
example is ss_n.common_ktx.extension.loadSoundPool
play [androidJvm]
fun play(playId: Int, left: Float = 1.0f, right: Float = 1.0f, priority: Int = 0, loop: Int = 0, rate: Float = 1.0f)
If you specify the loaded path in init(), the sound will be played.
release [androidJvm]
fun release()
memory release