AudioModifier

data class AudioModifier(val closeOnFinish: Boolean = false, val gotoStartOnStop: Boolean = true, val startPosition: Int? = null, val loop: Boolean = false, val loopStartPosition: Int? = null, val loopEndPosition: Int? = null)

Modifier for audio playback behavior.

Constructors

Link copied to clipboard
constructor(closeOnFinish: Boolean = false, gotoStartOnStop: Boolean = true, startPosition: Int? = null, loop: Boolean = false, loopStartPosition: Int? = null, loopEndPosition: Int? = null)

Properties

Link copied to clipboard

If true, the audio resource will be released when playback finishes.

Link copied to clipboard

If true, the audio playback position will reset to the start when stopped.

Link copied to clipboard

If true, the audio will loop continuously.

Link copied to clipboard

The position (in frames) to end looping at. If null, loops until the end of the audio.

Link copied to clipboard

The position (in frames) to start looping from. If null, loops from the beginning.

Link copied to clipboard

The position (in frames) to start playback from. If null, starts from the beginning.

Functions

Link copied to clipboard

Creates a copy of this AudioModifier with the specified start position.

Link copied to clipboard

Creates a copy of this AudioModifier with closeOnFinish set to true.

Link copied to clipboard
fun setToLoop(startPosition: Int? = null, endPosition: Int? = null): AudioModifier

Creates a copy of this AudioModifier configured for looping playback.

Link copied to clipboard

Creates a copy of this AudioModifier configured for infinite looping playback.

Link copied to clipboard

Creates a copy of this AudioModifier with gotoStartOnStop set to false.