Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

IMusicManager Class Reference

High-level music management interface class. More...

#include <IMusic.h>

Inheritance diagram for IMusicManager::

IMusicCallback List of all members.

Public Methods

virtual bool Init ()=0
virtual void Term ()=0
virtual bool IsInitialized ()=0
virtual bool LoadScript (std::string sFileName)=0
virtual bool PlayTheme (std::string sThemeName)=0
virtual void ResetThemeItr ()=0
virtual bool GetNextTheme (std::string &sThemeName)=0
virtual bool RemoveTheme (std::string &sThemeName)=0
virtual bool RemoveAll ()=0

Detailed Description

High-level music management interface class.

This class allows loading and playback of music scripts. Each script contains a number of themes, each containing a complete transition mapping of segments. Different themes may be transitioned to at run-time, and specific transition mappings based on segments or themes may be defined.


Member Function Documentation

bool IMusicManager::GetNextTheme ( std::string & sThemeName ) [pure virtual]
 

Retrieves the next theme name. This function can be called repeatedly until it returns false.

Parameters:
sThemeName   contains the name of the retrieved theme unless the function returns false, in which case the string will remain unmodified.
Returns:
true indicates another theme was found, false indicates that no more themes were found.
See also:
ResetThemeItr()

bool IMusicManager::Init ( ) [pure virtual]
 

Initializes the music manager. This must be called after IAudioManager::Init() is called.

Returns:
true indicates success, false indicates failure
See also:
Term(), IAudioManager::Init()

bool IMusicManager::IsInitialized ( ) [pure virtual]
 

Determines if the music manager is initialized.

Returns:
true indicates the manager is initialized, false indicates the manager is not initialized.
See also:
Init(), Term()

bool IMusicManager::LoadScript ( std::string sFileName ) [pure virtual]
 

Loads a music script and all associated segments, DLS collections, and themes.

Parameters:
sFileName   is the name of the script file to load
Returns:
true indicates success, false indicates failure
See also:
RemoveTheme(), RemoveAll()

bool IMusicManager::PlayTheme ( std::string sThemeName ) [pure virtual]
 

Plays a new theme based on its given script string ID

Parameters:
sThemeName   is the name of the theme ID as defined in the script file. There is no method to stop the theme. Instead, simply retrieve the current theme from the audio manager and stop it in the normal fashion.
Returns:
true indicates success, false indicates failure
See also:
IAudioManager::GetCurrentSegment(), IPlayable::Stop()

bool IMusicManager::RemoveAll ( ) [pure virtual]
 

Removes all segments, DLS collections, and themes currently mapped in the music manager. This is provided as a convenient method of clearing out all current musical content loaded from any number of scripts.

Returns:
true indicates success, false indicates failure

bool IMusicManager::RemoveTheme ( std::string & sThemeName ) [pure virtual]
 

Removes a specific theme from the active set. Keep in mind that only the theme definition, not any associated segments and DLS files are removed, since these are defined independently of the themes.

void IMusicManager::ResetThemeItr ( ) [pure virtual]
 

Resets an internal iterator used to cycle though and retrieve all currently registered themes.

See also:
GetNextTheme()

void IMusicManager::Term ( ) [pure virtual]
 

Shuts down the music manager. This must be called before IAudioManager::Term() is called.

See also:
Init(), IAudioManager::Term()


The documentation for this class was generated from the following file:
Generated at Sun Jul 28 23:17:42 2002 for GAP Audio System by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001