Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

AudioManager Class Reference

#include <audiomanager.h>

List of all members.

Public Types

enum  AUDIO_CHANNEL {
  AUDIO_CENTER_CHANNEL = -1, AUDIO_LEFT_CHANNEL = 0, AUDIO_LEFT_HALF_CHANNEL = 1, AUDIO_RIGHT_CHANNEL = 3,
  AUDIO_RIGHT_HALF_CHANNEL = 2
}
 This is for LR panning effects.
enum  AUDIO_CHANNEL {
  AUDIO_CENTER_CHANNEL = -1, AUDIO_LEFT_CHANNEL = 0, AUDIO_LEFT_HALF_CHANNEL = 1, AUDIO_RIGHT_CHANNEL = 3,
  AUDIO_RIGHT_HALF_CHANNEL = 2
}
 This is for LR panning effects.

Public Member Functions

OPENCITY_ERR_CODE OpenAudio (void)
OPENCITY_ERR_CODE CloseAudio (void)
OPENCITY_ERR_CODE LoadMusicList (const string &csrFilename, const string &csrPrefix="")
const uint & GetNumberMusic (void) const
bool PlayingMusic (void) const
OPENCITY_ERR_CODE PlayMusic (const uint &rcuiMusicIndex, const int &rciLoops=1)
OPENCITY_ERR_CODE PlayNextMusic (const int &rciLoops=1)
OPENCITY_ERR_CODE PlayPreviousMusic (const int &rciLoops=1)
void StopMusic (void) const
void ToggleRandomMusic (void)
void ToggleMusic (void)
void VolumeMusic (const int &rciVol) const
OPENCITY_ERR_CODE LoadSoundList (const string &csrFilename, const string &csrPrefix="")
const uint & GetNumberSound (void) const
OPENCITY_ERR_CODE PlaySound (const uint &rcuiSoundIndex, const AUDIO_CHANNEL &enumChannel=AUDIO_CENTER_CHANNEL)
void ToggleSound (void)
void VolumeSound (const int &rciVol) const
OPENCITY_ERR_CODE OpenAudio (void)
OPENCITY_ERR_CODE CloseAudio (void)
OPENCITY_ERR_CODE LoadMusicList (const string &csrFilename, const string &csrPrefix="")
const uint & GetNumberMusic (void) const
bool PlayingMusic (void) const
OPENCITY_ERR_CODE PlayMusic (const uint &rcuiMusicIndex, const int &rciLoops=1)
OPENCITY_ERR_CODE PlayNextMusic (const int &rciLoops=1)
OPENCITY_ERR_CODE PlayPreviousMusic (const int &rciLoops=1)
void StopMusic (void) const
void ToggleRandomMusic (void)
void ToggleMusic (void)
void VolumeMusic (const int &rciVol) const
OPENCITY_ERR_CODE LoadSoundList (const string &csrFilename, const string &csrPrefix="")
const uint & GetNumberSound (void) const
OPENCITY_ERR_CODE PlaySound (const uint &rcuiSoundIndex, const AUDIO_CHANNEL &enumChannel=AUDIO_CENTER_CHANNEL)
void ToggleSound (void)
void VolumeSound (const int &rciVol) const

Private Member Functions

OPENCITY_ERR_CODE ParseM3UList (const string &csrFilename, vector< string > &vectorFilename, uint &uiNumberFiles)

Private Attributes

bool boolAudioDeviceInitialized
bool boolMusicEnabled
bool boolSoundEnabled
uint uiNumberSound
uint uiNumberMusic
uint uiCurrentMusic
bool boolRandomMusic
string strSoundList
vector< string > vectorSoundFilename
vector< Mix_Chunk * > vectorpSoundChunk
string strMusicList
vector< string > vectorMusicFilename
bool boolShuffleMusic
Mix_Music * pMusicData


Detailed Description

This is a void audio manager. It is used whenever the SDL_mixer library is not present

Definition at line 49 of file audiomanager.h.


Member Function Documentation

OPENCITY_ERR_CODE AudioManager::LoadMusicList const string &  csrFilename,
const string &  csrPrefix = ""
 

Set the internal filename to the given M3U music list

OPENCITY_ERR_CODE AudioManager::LoadMusicList const string &  csrFilename,
const string &  csrPrefix = ""
 

Set the internal filename to the given M3U music list

Definition at line 61 of file audiomanager.cpp.

OPENCITY_ERR_CODE AudioManager::LoadSoundList const string &  csrFilename,
const string &  csrPrefix = ""
 

Set the internal filename to the given M3U sound list. In constrast of LoadMusicList(), it loads all the sounds specified by the music list into memory for better performance.

OPENCITY_ERR_CODE AudioManager::LoadSoundList const string &  csrFilename,
const string &  csrPrefix = ""
 

Set the internal filename to the given M3U sound list. In constrast of LoadMusicList(), it loads all the sounds specified by the music list into memory for better performance.

Definition at line 163 of file audiomanager.cpp.

OPENCITY_ERR_CODE AudioManager::OpenAudio void   ) 
 

WARNING: this method must be called before any use of AudioManager

OPENCITY_ERR_CODE AudioManager::OpenAudio void   ) 
 

WARNING: this method must be called before any use of AudioManager

Definition at line 44 of file audiomanager.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Nov 11 10:21:10 2006 for OpenCity by  doxygen 1.4.2