SpatialAudioTrackBuilderTester


public final 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 methods

boolean
equals(Object other)
final PointSourceParams

Retrieves the PointSourceParams set on the builder.

final SoundFieldAttributes

Retrieves the SoundFieldAttributes set on the builder.

int
final boolean
isCurrentPointSource(
    @NonNull AudioTrack.Builder builder,
    @NonNull Entity entity
)

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

Public methods

equals

public boolean equals(Object other)

getPointSourceParams

Added in 1.0.0-beta01
public final PointSourceParams getPointSourceParams(@NonNull AudioTrack.Builder builder)

Retrieves the PointSourceParams set on the builder.

This reflects values set via SpatialAudioTrackBuilder.setPointSourceParams.

Parameters
@NonNull AudioTrack.Builder 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
public final SoundFieldAttributes getSoundFieldAttributes(@NonNull AudioTrack.Builder builder)

Retrieves the SoundFieldAttributes set on the builder.

This reflects values set via SpatialAudioTrackBuilder.setSoundFieldAttributes.

Parameters
@NonNull AudioTrack.Builder builder

The AudioTrack.Builder from which to get the SoundFieldAttributes.

Returns
SoundFieldAttributes

The source attributes to be set.

hashCode

public int hashCode()

isCurrentPointSource

Added in 1.0.0-beta01
public final boolean isCurrentPointSource(
    @NonNull AudioTrack.Builder builder,
    @NonNull Entity entity
)

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
@NonNull AudioTrack.Builder builder

The AudioTrack.Builder from SpatialAudioTrackBuilder.setPointSourceParams.

@NonNull Entity entity

The target Entity to check against.

Returns
boolean

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