SoundEffectPoolComponentTester


class SoundEffectPoolComponentTester


A test-only accessor for SoundEffectPoolComponent that enables direct manipulation and inspection of its internal state.

Summary

Public functions

open operator Boolean
equals(other: Any?)
@IntRange(from = 0) Int

Retrieves the playback priority of the specified stream.

SoundEffect

Retrieves the SoundEffect associated with the specified stream.

@FloatRange(from = 0.0, to = 1.0) Float
getVolume(stream: Stream)

Retrieves the current volume of the specified stream.

open Int
Boolean
isLooping(stream: Stream)

Returns whether the specified stream is configured to loop indefinitely.

Public properties

Stream?

The Stream of the most recently paused sound, or null if no stream has been paused yet.

PointSourceParams?

Retrieves the PointSourceParams used in the most recent call to SoundEffectPoolComponent.play, or null if play has not been called yet.

Stream?

The Stream of the most recently played sound, or null if no stream has been played yet.

Stream?

The Stream of the most recently resumed sound, or null if no stream has been resumed yet.

Stream?

The Stream of the most recently stopped sound, or null if no stream has been stopped yet.

Public functions

equals

open operator fun equals(other: Any?): Boolean

getPriority

Added in 1.0.0-beta01
fun getPriority(stream: Stream): @IntRange(from = 0) Int

Retrieves the playback priority of the specified stream.

Priority is represented by a non-negative integer, where 0 is the lowest priority and greater values indicate higher priorities.

Parameters
stream: Stream

a Stream returned by SoundEffectPoolComponent.play

Returns
@IntRange(from = 0) Int

the playback priority of the stream

Throws
IllegalArgumentException

if the stream is no longer active or is invalid

getSoundEffect

Added in 1.0.0-beta01
fun getSoundEffect(stream: Stream): SoundEffect

Retrieves the SoundEffect associated with the specified stream.

Parameters
stream: Stream

a Stream returned by SoundEffectPoolComponent.play

Returns
SoundEffect

the SoundEffect being played on the stream

Throws
IllegalArgumentException

if the stream is no longer active or is invalid

getVolume

Added in 1.0.0-beta01
fun getVolume(stream: Stream): @FloatRange(from = 0.0, to = 1.0) Float

Retrieves the current volume of the specified stream.

Parameters
stream: Stream

a Stream returned by SoundEffectPoolComponent.play

Returns
@FloatRange(from = 0.0, to = 1.0) Float

the volume of the stream in the range 0.0 to 1.0

Throws
IllegalArgumentException

if the stream is no longer active or is invalid

hashCode

open fun hashCode(): Int

isLooping

Added in 1.0.0-beta01
fun isLooping(stream: Stream): Boolean

Returns whether the specified stream is configured to loop indefinitely.

Parameters
stream: Stream

a Stream returned by SoundEffectPoolComponent.play

Returns
Boolean

true if the stream is looping, false otherwise

Throws
IllegalArgumentException

if the stream is no longer active or is invalid

Public properties

lastPausedStream

Added in 1.0.0-beta01
val lastPausedStreamStream?

The Stream of the most recently paused sound, or null if no stream has been paused yet.

lastPlayedPointSourceParams

Added in 1.0.0-beta01
val lastPlayedPointSourceParamsPointSourceParams?

Retrieves the PointSourceParams used in the most recent call to SoundEffectPoolComponent.play, or null if play has not been called yet.

lastPlayedStream

Added in 1.0.0-beta01
val lastPlayedStreamStream?

The Stream of the most recently played sound, or null if no stream has been played yet.

lastResumedStream

Added in 1.0.0-beta01
val lastResumedStreamStream?

The Stream of the most recently resumed sound, or null if no stream has been resumed yet.

lastStoppedStream

Added in 1.0.0-beta01
val lastStoppedStreamStream?

The Stream of the most recently stopped sound, or null if no stream has been stopped yet.