Header menu logo Nu

WorldAudio Module

Audio functions for the world.

Type extensions

Type extension Description

World.enqueueAudioMessage message world

Full Usage: World.enqueueAudioMessage message world

Parameters:

Enqueue an audio message to the world.

Extended Type: World

message : AudioMessage
world : World

World.enqueueAudioMessages messages world

Full Usage: World.enqueueAudioMessages messages world

Parameters:

Enqueue multiple audio messages to the world.

Extended Type: World

messages : AudioMessage seq
world : World

World.fadeOutSong fadeOutTime world

Full Usage: World.fadeOutSong fadeOutTime world

Parameters:

Send a message to the audio system to fade out any current song.

Extended Type: World

fadeOutTime : GameTime
world : World

World.getMasterAudioVolume world

Full Usage: World.getMasterAudioVolume world

Parameters:
Returns: single

Get the master volume.

Extended Type: World

world : World
Returns: single

World.getMasterSongVolume world

Full Usage: World.getMasterSongVolume world

Parameters:
Returns: single

Get the master song volume.

Extended Type: World

world : World
Returns: single

World.getMasterSoundVolume world

Full Usage: World.getMasterSoundVolume world

Parameters:
Returns: single

Get the master sound volume.

Extended Type: World

world : World
Returns: single

World.getSongFadingIn world

Full Usage: World.getSongFadingIn world

Parameters:
Returns: bool

Whether the a song is currently playing and fading in.

Extended Type: World

world : World
Returns: bool

World.getSongFadingOut world

Full Usage: World.getSongFadingOut world

Parameters:
Returns: bool

Whether the a song is currently playing and fading out.

Extended Type: World

world : World
Returns: bool

World.getSongOpt world

Full Usage: World.getSongOpt world

Parameters:
Returns: SongDescriptor option

Get the currently playing song, if any.

Extended Type: World

world : World
Returns: SongDescriptor option

World.getSongPosition world

Full Usage: World.getSongPosition world

Parameters:
Returns: double

Get the currently playing song's position or 0.0.

Extended Type: World

world : World
Returns: double

World.getSongVolume world

Full Usage: World.getSongVolume world

Parameters:
Returns: single

Get the currently playing song's volume or 0.0f.

Extended Type: World

world : World
Returns: single

World.loadAudioPackage packageName world

Full Usage: World.loadAudioPackage packageName world

Parameters:
    packageName : string
    world : World

Load an audio asset package. Should be used to avoid loading assets at inconvenient times (such as in the middle of game play!)

Extended Type: World

packageName : string
world : World

World.playSong fadeInTime fadeOutTime startTime repeatLimitOpt volume song world

Full Usage: World.playSong fadeInTime fadeOutTime startTime repeatLimitOpt volume song world

Parameters:

Send a message to the audio system to play a song.

Extended Type: World

fadeInTime : GameTime
fadeOutTime : GameTime
startTime : GameTime
repeatLimitOpt : uint option
volume : single
song : Song AssetTag
world : World

World.playSound volume sound world

Full Usage: World.playSound volume sound world

Parameters:

Send a message to the audio system to play a sound.

Extended Type: World

volume : single
sound : Sound AssetTag
world : World

World.reloadAudioAssets world

Full Usage: World.reloadAudioAssets world

Parameters:

Send a message to the audio player to reload its audio assets.

Extended Type: World

world : World

World.setMasterAudioVolume volume world

Full Usage: World.setMasterAudioVolume volume world

Parameters:
    volume : single
    world : World

Set the master volume.

Extended Type: World

volume : single
world : World

World.setMasterSongVolume volume world

Full Usage: World.setMasterSongVolume volume world

Parameters:
    volume : single
    world : World

Set the master song volume.

Extended Type: World

volume : single
world : World

World.setMasterSoundVolume volume world

Full Usage: World.setMasterSoundVolume volume world

Parameters:
    volume : single
    world : World

Set the master sound volume.

Extended Type: World

volume : single
world : World

World.setSongVolume volume world

Full Usage: World.setSongVolume volume world

Parameters:
    volume : single
    world : World

Send a message to the audio system to set the volume of any current song.

Extended Type: World

volume : single
world : World

World.stopSong world

Full Usage: World.stopSong world

Parameters:

Send a message to the audio system to stop a song.

Extended Type: World

world : World

World.unloadAudioPackage packageName world

Full Usage: World.unloadAudioPackage packageName world

Parameters:
    packageName : string
    world : World

Unload an audio package should be unloaded since its assets will not be used again soon.

Extended Type: World

packageName : string
world : World

Type something to start searching.