FakeXrExtensions.FakeSoundPoolExtensions


class FakeXrExtensions.FakeSoundPoolExtensions


Fake SoundPoolExtensions.

Summary

Public constructors

Public functions

Int
getSpatialSourceType(soundPool: SoundPool, streamID: Int)
Int
playAsPointSource(
    soundPool: SoundPool,
    soundID: Int,
    attributes: PointSourceAttributes,
    volume: Float,
    priority: Int,
    loop: Int,
    rate: Float
)

Plays a spatialized sound effect emitted relative Node in the .

Int
playAsSoundField(
    soundPool: SoundPool,
    soundID: Int,
    attributes: SoundFieldAttributes,
    volume: Float,
    priority: Int,
    loop: Int,
    rate: Float
)

Plays a spatialized sound effect as a sound field.

Unit
Unit
Unit
setSourceType(sourceType: Int)

Public constructors

FakeSoundPoolExtensions

Added in 1.0.0-alpha01
FakeSoundPoolExtensions()

Public functions

getSpatialSourceType

Added in 1.0.0-alpha01
fun getSpatialSourceType(soundPool: SoundPool, streamID: Int): Int
Parameters
soundPool: SoundPool

The SoundPool to use to get its SourceType.

streamID: Int

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
fun playAsPointSource(
    soundPool: SoundPool,
    soundID: Int,
    attributes: PointSourceAttributes,
    volume: Float,
    priority: Int,
    loop: Int,
    rate: Float
): Int

Plays a spatialized sound effect emitted relative Node in the .

Parameters
soundPool: SoundPool

The SoundPool to use to the play the sound.

soundID: Int

a soundId returned by the load() function.

attributes: PointSourceAttributes

attributes to specify sound source. PointSourceAttributes

volume: Float

volume value (range = 0.0 to 1.0)

priority: Int

stream priority (0 = lowest priority)

loop: Int

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

rate: Float

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
fun playAsSoundField(
    soundPool: SoundPool,
    soundID: Int,
    attributes: SoundFieldAttributes,
    volume: Float,
    priority: Int,
    loop: Int,
    rate: Float
): Int

Plays a spatialized sound effect as a sound field.

Parameters
soundPool: SoundPool

The SoundPool to use to the play the sound.

soundID: Int

a soundId returned by the load() function.

attributes: SoundFieldAttributes

attributes to specify sound source. SoundFieldAttributes

volume: Float

volume value (range = 0.0 to 1.0)

priority: Int

stream priority (0 = lowest priority)

loop: Int

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

rate: Float

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
fun setPlayAsPointSourceResult(result: Int): Unit

setPlayAsSoundFieldResult

Added in 1.0.0-alpha01
fun setPlayAsSoundFieldResult(result: Int): Unit

setSourceType

Added in 1.0.0-alpha01
fun setSourceType(sourceType: Int): Unit