OpenXcom
1.0
Open-source clone of the original X-Com
|
Container of a set of sounds. More...
#include <SoundSet.h>
Public Member Functions | |
SoundSet () | |
Crates a sound set. More... | |
~SoundSet () | |
Cleans up the sound set. More... | |
void | loadCat (const std::string &filename, bool wav=true) |
Loads an X-Com CAT set of sound files. More... | |
Sound * | getSound (unsigned int i) |
Gets a particular sound from the set. More... | |
Sound * | addSound (unsigned int i) |
Creates a new sound and returns a pointer to it. More... | |
size_t | getTotalSounds () const |
Gets the total sounds in the set. More... | |
Container of a set of sounds.
Used to manage file sets that contain a pack of sounds inside.
OpenXcom::SoundSet::SoundSet | ( | ) |
Crates a sound set.
Sets up a new empty sound set.
OpenXcom::SoundSet::~SoundSet | ( | ) |
Cleans up the sound set.
Deletes the sounds from memory.
Sound * OpenXcom::SoundSet::addSound | ( | unsigned int | i | ) |
Creates a new sound and returns a pointer to it.
Creates and returns a particular wave in the sound set.
i | Sound number in the set. |
Sound * OpenXcom::SoundSet::getSound | ( | unsigned int | i | ) |
Gets a particular sound from the set.
Returns a particular wave from the sound set.
i | Sound number in the set. |
size_t OpenXcom::SoundSet::getTotalSounds | ( | ) | const |
Gets the total sounds in the set.
Returns the total amount of sounds currently stored in the set.
void OpenXcom::SoundSet::loadCat | ( | const std::string & | filename, |
bool | wav = true |
||
) |
Loads an X-Com CAT set of sound files.
Loads the contents of an X-Com CAT file which usually contains a set of sound files.
The CAT starts with an index of the offset and size of every file contained within. Each file consists of a filename followed by its contents.
filename | Filename of the CAT set. |
wav | Are the sounds in WAV format? |