FakeAudioTrackExtensionsWrapper


public final class FakeAudioTrackExtensionsWrapper


Test-only implementation of AudioTrackExtensionsWrapper

Summary

Public constructors

Public methods

PointSourceParams

Returns the PointSourceParams of the AudioTrack.

SoundFieldAttributes

Returns the SoundFieldAttributes of the AudioTrack.

int

Returns the spatial source type of the AudioTrack.

@NonNull AudioTrack.Builder

Sets the PointSourceParams of the AudioTrack.

void

Sets the PointSourceParams of the AudioTrack.

@NonNull AudioTrack.Builder

Sets the SoundFieldAttributes of the AudioTrack.

Public constructors

FakeAudioTrackExtensionsWrapper

Added in 1.0.0-alpha04
public FakeAudioTrackExtensionsWrapper()

Public methods

getPointSourceParams

Added in 1.0.0-alpha04
public PointSourceParams getPointSourceParams(@NonNull AudioTrack track)

Returns the PointSourceParams of the AudioTrack.

Parameters
@NonNull AudioTrack track

The AudioTrack to get the PointSourceParams from.

Returns
PointSourceParams

The PointSourceParams of the AudioTrack.

getSoundFieldAttributes

Added in 1.0.0-alpha04
public SoundFieldAttributes getSoundFieldAttributes(@NonNull AudioTrack track)

Returns the SoundFieldAttributes of the AudioTrack.

Parameters
@NonNull AudioTrack track

The AudioTrack to get the SoundFieldAttributes from.

Returns
SoundFieldAttributes

The SoundFieldAttributes of the AudioTrack.

getSpatialSourceType

Added in 1.0.0-alpha04
public int getSpatialSourceType(@NonNull AudioTrack track)

Returns the spatial source type of the AudioTrack.

Parameters
@NonNull AudioTrack track

The AudioTrack to get the spatial source type from.

Returns
int

The spatial source type of the AudioTrack.

setPointSourceParams

Added in 1.0.0-alpha04
public @NonNull AudioTrack.Builder setPointSourceParams(
    @NonNull AudioTrack.Builder builder,
    @NonNull PointSourceParams params
)

Sets the PointSourceParams of the AudioTrack.

Parameters
@NonNull AudioTrack.Builder builder

The AudioTrack.Builder to set the PointSourceParams on.

@NonNull PointSourceParams params

The PointSourceParams to set.

Returns
@NonNull AudioTrack.Builder

The AudioTrack.Builder with the PointSourceAttributes set.

setPointSourceParams

Added in 1.0.0-alpha04
public void setPointSourceParams(
    @NonNull AudioTrack track,
    @NonNull PointSourceParams params
)

Sets the PointSourceParams of the AudioTrack.

The new PointSourceParams will be applied if the [SpatializerConstants.SourceType] of the AudioTrack was either [SpatializerConstants.DEFAULT]0 or [SpatializerConstants.POINT_SOURCE]. If the [SpatializerConstants.SourceType] was [SpatializerConstants.SOUND_FIELD], then this method will have no effect.

Parameters
@NonNull AudioTrack track

The AudioTrack to set the PointSourceParams on.

@NonNull PointSourceParams params

The PointSourceParams to set.

setSoundFieldAttributes

Added in 1.0.0-alpha04
public @NonNull AudioTrack.Builder setSoundFieldAttributes(
    @NonNull AudioTrack.Builder builder,
    @NonNull SoundFieldAttributes attributes
)

Sets the SoundFieldAttributes of the AudioTrack.

Parameters
@NonNull AudioTrack.Builder builder

The AudioTrack.Builder to set the SoundFieldAttributes on.

@NonNull SoundFieldAttributes attributes

The SoundFieldAttributes to set.

Returns
@NonNull AudioTrack.Builder

The AudioTrack.Builder with the SoundFieldAttributes set.