FakeXrExtensions.FakeSoundPoolExtensions


public class FakeXrExtensions.FakeSoundPoolExtensions


Fake SoundPoolExtensions.

Summary

Public constructors

Public methods

int
getSpatialSourceType(@NonNull SoundPool soundPool, int streamID)
int
playAsPointSource(
    @NonNull SoundPool soundPool,
    int soundID,
    @NonNull PointSourceAttributes attributes,
    float volume,
    int priority,
    int loop,
    float rate
)

Plays a spatialized sound effect emitted relative Node in the .

int
playAsSoundField(
    @NonNull SoundPool soundPool,
    int soundID,
    @NonNull SoundFieldAttributes attributes,
    float volume,
    int priority,
    int loop,
    float rate
)

Plays a spatialized sound effect as a sound field.

void
void
void
setSourceType(int sourceType)

Public constructors

FakeSoundPoolExtensions

Added in 1.0.0-alpha01
public FakeSoundPoolExtensions()

Public methods

getSpatialSourceType

Added in 1.0.0-alpha01
public int getSpatialSourceType(@NonNull SoundPool soundPool, int streamID)
Parameters
@NonNull SoundPool soundPool

The SoundPool to use to get its SourceType.

int streamID

a streamID returned by the play(), playAsPointSource(), or playAsSoundField().

Returns
int

The SpatializerExtensions.SourceType for the given streamID.

playAsPointSource

Added in 1.0.0-alpha01
public int playAsPointSource(
    @NonNull SoundPool soundPool,
    int soundID,
    @NonNull PointSourceAttributes attributes,
    float volume,
    int priority,
    int loop,
    float rate
)

Plays a spatialized sound effect emitted relative Node in the .

Parameters
@NonNull SoundPool soundPool

The SoundPool to use to the play the sound.

int soundID

a soundId returned by the load() function.

@NonNull PointSourceAttributes attributes

attributes to specify sound source. PointSourceAttributes

float volume

volume value (range = 0.0 to 1.0)

int priority

stream priority (0 = lowest priority)

int loop

loop mode (0 = no loop, -1 = loop forever)

float rate

playback rate (1.0 = normal playback, range 0.5 to 2.0)

Returns
int

non-zero streamID if successful, zero if failed

playAsSoundField

Added in 1.0.0-alpha01
public int playAsSoundField(
    @NonNull SoundPool soundPool,
    int soundID,
    @NonNull SoundFieldAttributes attributes,
    float volume,
    int priority,
    int loop,
    float rate
)

Plays a spatialized sound effect as a sound field.

Parameters
@NonNull SoundPool soundPool

The SoundPool to use to the play the sound.

int soundID

a soundId returned by the load() function.

@NonNull SoundFieldAttributes attributes

attributes to specify sound source. SoundFieldAttributes

float volume

volume value (range = 0.0 to 1.0)

int priority

stream priority (0 = lowest priority)

int loop

loop mode (0 = no loop, -1 = loop forever)

float rate

playback rate (1.0 = normal playback, range 0.5 to 2.0)

Returns
int

non-zero streamID if successful, zero if failed

setPlayAsPointSourceResult

Added in 1.0.0-alpha01
public void setPlayAsPointSourceResult(int result)

setPlayAsSoundFieldResult

Added in 1.0.0-alpha01
public void setPlayAsSoundFieldResult(int result)

setSourceType

Added in 1.0.0-alpha01
public void setSourceType(int sourceType)