SoundEffectPoolTester


public final class SoundEffectPoolTester


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

Summary

Public methods

boolean
equals(Object other)
int
final boolean

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

final boolean
isResourceLoaded(int resourceId)

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

final void
triggerLoadCompleteListener(
    @NonNull SoundEffect soundEffect,
    boolean success
)

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

Public methods

equals

public boolean equals(Object other)

hashCode

public int hashCode()

isAssetLoaded

Added in 1.0.0-alpha16
public final boolean isAssetLoaded(@NonNull AssetFileDescriptor assetFileDescriptor)

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

Parameters
@NonNull 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
public final boolean isResourceLoaded(int resourceId)

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

Parameters
int resourceId

The resource ID to check.

Returns
boolean

true if the resource is currently loaded, false otherwise.

triggerLoadCompleteListener

Added in 1.0.0-alpha16
public final void triggerLoadCompleteListener(
    @NonNull SoundEffect soundEffect,
    boolean success
)

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

This triggers SoundEffectPool.LoadCompleteListener registered via SoundEffectPool.addLoadCompleteListener.

Parameters
@NonNull SoundEffect soundEffect

The SoundEffect that was loaded.

boolean success

Whether the load was successful.