Skip to content

Instantly share code, notes, and snippets.

@GOVINDDIXIT
Last active May 18, 2023 04:11
Show Gist options
  • Save GOVINDDIXIT/6cd23fc6fe9ac4bb924519d713a97b2a to your computer and use it in GitHub Desktop.
Save GOVINDDIXIT/6cd23fc6fe9ac4bb924519d713a97b2a to your computer and use it in GitHub Desktop.
interface CredSoundPool {
val instance: SoundPool
fun load(
resId: Int,
priority: Int,
logError: String = "Could not load sound"
): Int?
fun play(
soundId: Int,
volume: Float = 0.5f
)
fun play(
soundId: Int,
leftVolume: Float = 0.5f,
rightVolume: Float = 0.5f,
priority: Int = 0,
loop: Int = 0,
rate: Float = 1f,
streamIdCallback: (Int) -> Unit = {}
)
fun stop(streamId: Int)
fun setVolume(
streamId: Int,
leftVolume: Float,
rightVolume: Float
)
fun release()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment