Planeshift
InstrumentManager Class Reference

This class keeps and manage the musical instruments. More...

#include <instrumentmngr.h>

Public Member Functions

bool Initialize (iObjectRegistry *objectReg)
 Reads the instruments definitions. More...
 
 InstrumentManager ()
 Constructor. More...
 
bool PlaySong (SoundControl *sndCtrl, csVector3 pos, csVector3 dir, SoundHandle *&songHandle, csRef< iDocument > musicalSheet, const char *instrName)
 Play the song in the given musical sheet with the given instruments. More...
 
 ~InstrumentManager ()
 Destructor. More...
 

Detailed Description

This class keeps and manage the musical instruments.

Definition at line 44 of file instrumentmngr.h.

Constructor & Destructor Documentation

InstrumentManager::InstrumentManager ( )

Constructor.

Creates an empty InstrumentManager.

InstrumentManager::~InstrumentManager ( )

Destructor.

Destroys all instruments.

Member Function Documentation

bool InstrumentManager::Initialize ( iObjectRegistry *  objectReg)

Reads the instruments definitions.

Parameters
objectRegthe object registry.
Returns
false if SoundSystemManager has not been correctly initialized or if the instruments definitions are not syntactically correct.
bool InstrumentManager::PlaySong ( SoundControl sndCtrl,
csVector3  pos,
csVector3  dir,
SoundHandle *&  songHandle,
csRef< iDocument >  musicalSheet,
const char *  instrName 
)

Play the song in the given musical sheet with the given instruments.

Parameters
sndCtrlthe SoundControl for this song.
posthe position of the player to play this song.
dirthe direction of this sound.
songHandlean null SongHandle that will handle the song.
musicalSheetthe XML musical sheet to play.
instrNamethe name of the instruments.
Returns
true if the song could be played, false otherwise.

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