SpatialAudioTrackBuilderTester


class SpatialAudioTrackBuilderTester


Test utility class for spatial audio extensions.

This class provides a mechanism for tests to inspect and verify spatial audio attributes associated with an AudioTrack.Builder that are otherwise encapsulated within the SceneCore runtime.

Summary

Public functions

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

Retrieves the PointSourceParams set on the builder.

SoundFieldAttributes?

Retrieves the SoundFieldAttributes set on the builder.

open Int
Boolean

Checks whether the given entity is the current point source for this AudioTrack.Builder.

Public functions

equals

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

getPointSourceParams

Added in 1.0.0-beta01
fun getPointSourceParams(builder: AudioTrack.Builder): PointSourceParams?

Retrieves the PointSourceParams set on the builder.

This reflects values set via SpatialAudioTrackBuilder.setPointSourceParams.

Parameters
builder: AudioTrack.Builder

The AudioTrack.Builder from which to get the PointSourceParams.

Returns
PointSourceParams?

The source params to be set.

getSoundFieldAttributes

Added in 1.0.0-beta01
fun getSoundFieldAttributes(builder: AudioTrack.Builder): SoundFieldAttributes?

Retrieves the SoundFieldAttributes set on the builder.

This reflects values set via SpatialAudioTrackBuilder.setSoundFieldAttributes.

Parameters
builder: AudioTrack.Builder

The AudioTrack.Builder from which to get the SoundFieldAttributes.

Returns
SoundFieldAttributes?

The source attributes to be set.

hashCode

open fun hashCode(): Int

isCurrentPointSource

Added in 1.0.0-beta01
fun isCurrentPointSource(builder: AudioTrack.Builder, entity: Entity): Boolean

Checks whether the given entity is the current point source for this AudioTrack.Builder.

This returns true if the entity was passed to SpatialAudioTrackBuilder.setPointSourceParams as a point source.

Parameters
builder: AudioTrack.Builder

The AudioTrack.Builder from SpatialAudioTrackBuilder.setPointSourceParams.

entity: Entity

The target Entity to check against.

Returns
Boolean

true if the entity is the current point source for this builder, false otherwise.