Main   Class List   Namespace List   Wiki

SFXController Class Reference
[Sound]

A sound source that drives multi-source playback. More...

Inheritance diagram for SFXController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int getCurrentSlot ()
 Get the index of the playlist slot currently processed by the controller.
void setCurrentSlot (int index)
 Set the index of the playlist slot to play by the controller. This can be used to seek in the playlist.

Public Attributes

Debug

bool trace
 If true, the controller logs its operation to the console.

Detailed Description

A sound source that drives multi-source playback.

This class acts as an interpreter for SFXPlayLists. It goes through the slots of the playlist it is attached to and performs the actions described by each of the slots in turn. As SFXControllers are created implicitly by the SFX system when instantiating a source for a play list it is in most cases not necessary to directly deal with the class. The following example demonstrates how a controller would commonly be created.

Example:
// Create a play list from two SFXProfiles.
%playList = new SFXPlayList()
{
   // Use a looped description so the list playback will loop.
   description = AudioMusicLoop2D;

   track[ 0 ] = Profile1;
   track[ 1 ] = Profile2;
};

// Play the list.  This will implicitly create a controller.
sfxPlayOnce( %playList );
Note:
Play lists are updated at regular intervals by the sound system. This processing determines the granularity at which playlist action timing takes place.
This class cannot be instantiated directly. Use sfxPlayOnce() or sfxCreateSource() with the playlist you want to play to create an instance of this class.
See also:
SFXPlayList

Member Function Documentation

int SFXController::getCurrentSlot (  ) 

Get the index of the playlist slot currently processed by the controller.

Returns:
The slot index currently being played.
See also:
SFXPlayList
void SFXController::setCurrentSlot ( int  index  ) 

Set the index of the playlist slot to play by the controller. This can be used to seek in the playlist.

Parameters:
index Index of the playlist slot.

Member Data Documentation

If true, the controller logs its operation to the console.

This is a non-networked field that will work locally only.



Copyright © GarageGames, LLC. All Rights Reserved.