# SpatialSoundPoolTester

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/SpatialSoundPoolTester.kt+class:androidx.xr.scenecore.testing.SpatialSoundPoolTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
class SpatialSoundPoolTester
```

<br />

*** ** * ** ***

A test utility for accessing and inspecting the spatial data associated with the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialSoundPool`.

## 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/SpatialSoundPoolTester#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/SpatialSoundPoolTester#hashCode()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialSoundPoolTester#playAsPointSourceResult()` The value that will be returned by the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialSoundPool#play(androidx.xr.runtime.Session,android.media.SoundPool,kotlin.Int,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity,kotlin.Float,kotlin.Int,kotlin.Int,kotlin.Float)` method for point source audio. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialSoundPoolTester#playAsSoundFieldResult()` The value that will be returned by the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialSoundPool#play(androidx.xr.runtime.Session,android.media.SoundPool,kotlin.Int,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity,kotlin.Float,kotlin.Int,kotlin.Int,kotlin.Float)` method for sound field audio. |
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatializerConstants.SourceType` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialSoundPoolTester#spatialSourceType()` The spatial source type which can be retrieved from `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialSoundPool#getSpatialSourceType(androidx.xr.runtime.Session,android.media.SoundPool,kotlin.Int)` of the sound pool. |

## Public functions

### equals

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

### hashCode

```
open fun hashCode(): Int
```

## Public properties

### playAsPointSourceResult

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

```
var playAsPointSourceResult: Int
```

The value that will be returned by the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialSoundPool#play(androidx.xr.runtime.Session,android.media.SoundPool,kotlin.Int,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity,kotlin.Float,kotlin.Int,kotlin.Int,kotlin.Float)` method for point source audio.

Setting this property allows tests to simulate both successful and failed attempts to play a sound. A non-zero value simulates a successful playback, while `0` simulates a failure (e.g., because no more streams are available).

### playAsSoundFieldResult

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

```
var playAsSoundFieldResult: Int
```

The value that will be returned by the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialSoundPool#play(androidx.xr.runtime.Session,android.media.SoundPool,kotlin.Int,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity,kotlin.Float,kotlin.Int,kotlin.Int,kotlin.Float)` method for sound field audio.

Setting this property allows tests to simulate both successful and failed attempts to play a sound. A non-zero value simulates a successful playback, while `0` simulates a failure (e.g., because no more streams are available).

### spatialSourceType

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

```
var spatialSourceType: SpatializerConstants.SourceType
```

The spatial source type which can be retrieved from `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialSoundPool#getSpatialSourceType(androidx.xr.runtime.Session,android.media.SoundPool,kotlin.Int)` of the sound pool.