GL Studio API
Public Member Functions | List of all members
SoundSystem Class Reference

Public Member Functions

 SoundSystem (int maxSounds)
 
void Play (int which)
 
void Play (int which, float distance)
 
void LoadSound (char *fn, int index)
 
void LoadSounds (char *firstArg,...)
 
void ClearSound (int index)
 

Constructor & Destructor Documentation

SoundSystem ( int  maxSounds)

Creates a new sound system

Parameters
maxSoundsMaximum number of soundfiles in the sound system

Member Function Documentation

void ClearSound ( int  index)

Deletes the sound from the given index

Parameters
indexZero based index to clear
void LoadSound ( char *  fn,
int  index 
)

Loads the sound from a file into a slot in the sound system

Parameters
fnThe name of the file to load from
indexThe zero based index to load the file into
void LoadSounds ( char *  firstArg,
  ... 
)

Loads a number of sounds from files into the sound system The sounds are loaded sequentially starting at slot zero

Parameters
firstArgFilenames to load, followed by a NULL
void Play ( int  which)

Plays the sound at the given index

Parameters
whichThe zero based index of the sound to play
void Play ( int  which,
float  distance 
)

Plays the sound at the given index, attenuated for distancec

Parameters
whichThe zero based index of the sound to play
distanceThe distance in meters of the sound

The documentation for this class was generated from the following file: