SoundEffectPoolTester


class SoundEffectPoolTester


A data container for inspecting the properties of a SoundEffectPool resource.

Summary

Public functions

open operator Boolean
equals(other: Any?)
open Int
Boolean
isAssetLoaded(assetFileDescriptor: AssetFileDescriptor)

Checks if a sound effect with the given AssetFileDescriptor is currently loaded in the pool.

Boolean
isResourceLoaded(resourceId: Int)

Checks if a sound effect with the given resource ID is currently loaded in the pool.

Unit

Simulates a load complete event from the runtime, notifying all registered listeners.

Public functions

equals

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

hashCode

open fun hashCode(): Int

isAssetLoaded

Added in 1.0.0-alpha16
fun isAssetLoaded(assetFileDescriptor: AssetFileDescriptor): Boolean

Checks if a sound effect with the given AssetFileDescriptor is currently loaded in the pool.

Parameters
assetFileDescriptor: AssetFileDescriptor

The file descriptor to check.

Returns
Boolean

true if the descriptor is currently loaded, false otherwise.

isResourceLoaded

Added in 1.0.0-alpha16
fun isResourceLoaded(resourceId: Int): Boolean

Checks if a sound effect with the given resource ID is currently loaded in the pool.

Parameters
resourceId: Int

The resource ID to check.

Returns
Boolean

true if the resource is currently loaded, false otherwise.

triggerLoadCompleteListener

Added in 1.0.0-alpha16
fun triggerLoadCompleteListener(soundEffect: SoundEffect, success: Boolean): Unit

Simulates a load complete event from the runtime, notifying all registered listeners.

This triggers SoundEffectPool.LoadCompleteListener registered via SoundEffectPool.addLoadCompleteListener.

Parameters
soundEffect: SoundEffect

The SoundEffect that was loaded.

success: Boolean

Whether the load was successful.