Planeshift
|
SoundData is the datakeeper of. More...
#include <data.h>
Public Member Functions | |
bool | Initialize (iObjectRegistry *objectReg) |
Initializes Loader and VFS. | |
bool | LoadSoundFile (const char *name, csRef< iSndSysData > &snddata) |
Loads a soundfile out of the vfs. | |
bool | LoadSoundLib (const char *filename, iObjectRegistry *objectReg) |
Reads soundlib.xml and creates reference SoundFile objects. | |
SoundData () | |
Constructor . | |
void | UnloadSoundFile (const char *name) |
Unloads a soundfile and deletes its snddata object. | |
void | UnloadSoundLib () |
Unloads everything LoadSoundLib created. | |
void | Update () |
Checks usage of all SoundFile objects and unloads them if appropriate. | |
~SoundData () | |
Deconstructor. |
SoundData is the datakeeper of.
SoundData::SoundData | ( | ) |
Constructor .
. empty. Initialization is done via Initialize because its not guaranteed that its successful.
SoundData::~SoundData | ( | ) |
Deconstructor.
Unloads everything and destroys all SoundFile object.
bool SoundData::Initialize | ( | iObjectRegistry * | objectReg | ) |
Initializes Loader and VFS.
Will return true on success and false if not.
objectReg | objectReg to get references to iVFS and iSndSysLoader |
bool SoundData::LoadSoundFile | ( | const char * | name, |
csRef< iSndSysData > & | snddata | ||
) |
Loads a soundfile out of the vfs.
The file given by name will be loaded into a iSndSysData object.
name | filename to load |
snddata | iSndSysData object to write the data into |
bool SoundData::LoadSoundLib | ( | const char * | filename, |
iObjectRegistry * | objectReg | ||
) |
void SoundData::UnloadSoundFile | ( | const char * | name | ) |
Unloads a soundfile and deletes its snddata object.
The Soundfile given by name will be unloaded. Be careful with this one! It doesnt check if its still in use.
name | SoundFile by name |
void SoundData::UnloadSoundLib | ( | ) |
Unloads everything LoadSoundLib created.
Will purge the hash and delete all reference SoundFile objects.
void SoundData::Update | ( | ) |