SFXController

Engine/source/sfx/sfxController.h

SFXSource that drives multi-source playback.

More...

Classes:

Protected Types

enum
EOp {
  OP_Delay 
  OP_WaitSingle 
  OP_WaitAll 
  OP_StopSingle 
  OP_StopAll 
  OP_Play 
  OP_Jump 
  OP_LoopBegin 
  OP_LoopEnd 
}
VariantFloat 

Public Types

Parent 

Public Friends

class

Protected Attributes

The instruction list.

The current instruction in "mInsns".

The stack of currently playing sources.

bool

Protected Functions

bool

Pause playback.

Start playback.

Stop playback.

Update the effective pitch of the source.

Update the effective priority of the source.

Update the effective volume of the source.

Protected Static Functions

Public Functions

Constructor for the sake of ConsoleObject.

DECLARE_DESCRIPTION("Controls the playback of an SFXPlayList." )

Return the index of the playlist slot being processed by the controller.

Return the playlist being played back by the controller.

Set the index of the playlist slot to process.

Public Static Functions

Detailed Description

SFXSource that drives multi-source playback.

Basically, this class is an interpreter for the instruction slots in SFXPlayLists.

Controllers can be switched between states. When no state is set, all tracks from playlists that do not have a state set will be played. When setting a state, only tracks with the given state will be played. If currently tracks with a different state are playing, the respective controllers will transition out of their respective slots.

Protected Types

EOp

Enumerator

OP_Delay
OP_WaitSingle
OP_WaitAll
OP_StopSingle
OP_StopAll
OP_Play
OP_Jump
OP_LoopBegin
OP_LoopEnd
typedef SFXVariantFloat< 1 > VariantFloat 

Public Types

typedef SFXSource Parent 

Public Friends

Protected Attributes

U32 mDelayEndTime 
Vector< Insn > mInsns 

The instruction list.

This is compiled from the playlist and then executed in the controller's update.

U32 mIp 

The current instruction in "mInsns".

U32 mLoopCounter 
Vector< Source > mSources 

The stack of currently playing sources.

All sources on this list are play-once sources so we can leave their lifetime management to the SFX system. This is especially convenient in combination with fade-outs where a source cannot be immediately deleted.

bool mTrace 

Protected Functions

SFXController(SFXPlayList * playList)

_advanceIp()

_compileList(SFXPlayList * playList)

_dumpInsns()

_execInsn()

_genTransition(Insn & insn, SFXPlayList::ETransitionMode transition)

_initInsn()

_onParameterEvent(SFXParameter * parameter, SFXParameterEvent event)

Reimplemented from: SFXSource

_pause()

Reimplemented from: SFXSource

_play()

Reimplemented from: SFXSource

_printInsn(Insn & insn)

_stop()

Reimplemented from: SFXSource

_update()

Reimplemented from: SFXSource

_updatePitch()

Reimplemented from: SFXSource

_updatePriority()

Reimplemented from: SFXSource

_updateVolume(const MatrixF & listener)

Reimplemented from: SFXSource

Protected Static Functions

_create(SFXPlayList * playList)

Public Functions

SFXController()

Constructor for the sake of ConsoleObject.

~SFXController()

DECLARE_CONOBJECT(SFXController )

DECLARE_DESCRIPTION("Controls the playback of an SFXPlayList." )

getCurrentSlot()

Return the index of the playlist slot being processed by the controller.

getPlayList()

Return the playlist being played back by the controller.

setCurrentSlot(U32 index)

Set the index of the playlist slot to process.

Public Static Functions

initPersistFields()