# SpatialAudioTrackBuilderTester

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

*** ** * ** ***


```
class SpatialAudioTrackBuilderTester
```

<br />

*** ** * ** ***

Test utility class for spatial audio extensions.

This class provides a mechanism for tests to inspect and verify spatial audio attributes associated with an `https://developer.android.com/reference/android/media/AudioTrack.Builder.html` that are otherwise encapsulated within the SceneCore runtime.

## 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/SpatialAudioTrackBuilderTester#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/PointSourceParams?` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester#getPointSourceParams(android.media.AudioTrack.Builder)(builder: https://developer.android.com/reference/android/media/AudioTrack.Builder.html)` Retrieves the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/PointSourceParams` set on the builder. |
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundFieldAttributes?` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester#getSoundFieldAttributes(android.media.AudioTrack.Builder)(builder: https://developer.android.com/reference/android/media/AudioTrack.Builder.html)` Retrieves the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundFieldAttributes` set on the builder. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester#isCurrentPointSource(android.media.AudioTrack.Builder,androidx.xr.scenecore.Entity)(builder: https://developer.android.com/reference/android/media/AudioTrack.Builder.html, entity: https://developer.android.com/reference/kotlin/androidx/xr/scenecore/Entity)` Checks whether the given `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester#isCurrentPointSource(android.media.AudioTrack.Builder,androidx.xr.scenecore.Entity)` is the current point source for this `https://developer.android.com/reference/android/media/AudioTrack.Builder.html`. |

## Public functions

### equals

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

### getPointSourceParams

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

```
fun getPointSourceParams(builder: AudioTrack.Builder): PointSourceParams?
```

Retrieves the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/PointSourceParams` set on the builder.

This reflects values set via `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialAudioTrackBuilder#setPointSourceParams(androidx.xr.runtime.Session,android.media.AudioTrack.Builder,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity)`.

| Parameters |
|---|---|
| `builder: https://developer.android.com/reference/android/media/AudioTrack.Builder.html` | The `https://developer.android.com/reference/android/media/AudioTrack.Builder.html` from which to get the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/PointSourceParams`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/PointSourceParams?` | The source params to be set. |

### getSoundFieldAttributes

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

```
fun getSoundFieldAttributes(builder: AudioTrack.Builder): SoundFieldAttributes?
```

Retrieves the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundFieldAttributes` set on the builder.

This reflects values set via `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialAudioTrackBuilder#setSoundFieldAttributes(androidx.xr.runtime.Session,android.media.AudioTrack.Builder,androidx.xr.scenecore.SoundFieldAttributes)`.

| Parameters |
|---|---|
| `builder: https://developer.android.com/reference/android/media/AudioTrack.Builder.html` | The `https://developer.android.com/reference/android/media/AudioTrack.Builder.html` from which to get the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundFieldAttributes`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SoundFieldAttributes?` | The source attributes to be set. |

### hashCode

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

### isCurrentPointSource

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

```
fun isCurrentPointSource(builder: AudioTrack.Builder, entity: Entity): Boolean
```

Checks whether the given `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester#isCurrentPointSource(android.media.AudioTrack.Builder,androidx.xr.scenecore.Entity)` is the current point source for this `https://developer.android.com/reference/android/media/AudioTrack.Builder.html`.

This returns `true` if the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester#isCurrentPointSource(android.media.AudioTrack.Builder,androidx.xr.scenecore.Entity)` was passed to `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialAudioTrackBuilder#setPointSourceParams(androidx.xr.runtime.Session,android.media.AudioTrack.Builder,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity)` as a point source.

| Parameters |
|---|---|
| `builder: https://developer.android.com/reference/android/media/AudioTrack.Builder.html` | The `https://developer.android.com/reference/android/media/AudioTrack.Builder.html` from `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SpatialAudioTrackBuilder#setPointSourceParams(androidx.xr.runtime.Session,android.media.AudioTrack.Builder,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity)`. |
| `entity: https://developer.android.com/reference/kotlin/androidx/xr/scenecore/Entity` | The target `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/Entity` to check against. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester#isCurrentPointSource(android.media.AudioTrack.Builder,androidx.xr.scenecore.Entity)` is the current point source for this builder, `false` otherwise. |