# SoundEffectPoolTester

Artifact: [androidx.xr.scenecore:scenecore-testing](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/testing/SoundEffectPoolTester.kt+class:androidx.xr.scenecore.testing.SoundEffectPoolTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
class SoundEffectPoolTester
```

<br />

*** ** * ** ***

A data container for inspecting the properties of a `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundEffectPool` resource.

## Summary

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SoundEffectPoolTester#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SoundEffectPoolTester#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SoundEffectPoolTester#isAssetLoaded(android.content.res.AssetFileDescriptor)(assetFileDescriptor: https://developer.android.com/reference/android/content/res/AssetFileDescriptor.html)` Checks if a sound effect with the given `https://developer.android.com/reference/android/content/res/AssetFileDescriptor.html` is currently loaded in the pool. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SoundEffectPoolTester#isResourceLoaded(kotlin.Int)(resourceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Checks if a sound effect with the given resource ID is currently loaded in the pool. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SoundEffectPoolTester#triggerLoadCompleteListener(androidx.xr.scenecore.SoundEffect,kotlin.Boolean)(soundEffect: https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundEffect, success: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` 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](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
fun isAssetLoaded(assetFileDescriptor: AssetFileDescriptor): Boolean
```

Checks if a sound effect with the given `https://developer.android.com/reference/android/content/res/AssetFileDescriptor.html` is currently loaded in the pool.

| Parameters |
|---|---|
| `assetFileDescriptor: https://developer.android.com/reference/android/content/res/AssetFileDescriptor.html` | The file descriptor to check. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the descriptor is currently loaded, `false` otherwise. |

### isResourceLoaded

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
fun isResourceLoaded(resourceId: Int): Boolean
```

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

| Parameters |
|---|---|
| `resourceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The resource ID to check. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the resource is currently loaded, `false` otherwise. |

### triggerLoadCompleteListener

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
fun triggerLoadCompleteListener(soundEffect: SoundEffect, success: Boolean): Unit
```

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

This triggers `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundEffectPool.LoadCompleteListener` registered via `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundEffectPool#addLoadCompleteListener(androidx.xr.scenecore.SoundEffectPool.LoadCompleteListener)`.

| Parameters |
|---|---|
| `soundEffect: https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundEffect` | The `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundEffect` that was loaded. |
| `success: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the load was successful. |