OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
OpenXcom::SoundSet Class Reference

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...
 
SoundgetSound (unsigned int i)
 Gets a particular sound from the set. More...
 
SoundaddSound (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...
 

Detailed Description

Container of a set of sounds.

Used to manage file sets that contain a pack of sounds inside.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Parameters
iSound number in the set.
Returns
Pointer to the respective sound.
Sound * OpenXcom::SoundSet::getSound ( unsigned int  i)

Gets a particular sound from the set.

Returns a particular wave from the sound set.

Parameters
iSound number in the set.
Returns
Pointer to the respective sound.
size_t OpenXcom::SoundSet::getTotalSounds ( ) const

Gets the total sounds in the set.

Returns the total amount of sounds currently stored in the set.

Returns
Number of sounds.
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.

Parameters
filenameFilename of the CAT set.
wavAre the sounds in WAV format?
See also
http://www.ufopaedia.org/index.php?title=SOUND

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