Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
CSoundManager Class Reference

#include <SoundManager.h>

Inheritance diagram for CSoundManager:
ISoundManager

Public Member Functions

 CSoundManager ()
 
virtual ~CSoundManager ()
 
ISoundItemLoadItem (const VfsPath &itemPath)
 
ISoundItemItemForData (CSoundData *itemData)
 
ISoundItemItemForEntity (entity_id_t source, CSoundData *sndData)
 
Status ReloadChangedFiles (const VfsPath &path)
 
void ClearPlayListItems ()
 
void StartPlayList (bool doLoop)
 
void AddPlayListItem (const VfsPath &itemPath)
 
void SetMusicEnabled (bool isEnabled)
 
void setSoundEnabled (bool enabled)
 
ALuint GetALSource (ISoundItem *anItem)
 
void ReleaseALSource (ALuint theSource)
 
ISoundItemItemFromData (CSoundData *itemData)
 
ISoundItemItemFromWAV (VfsPath &fname)
 
ISoundItemItemFromOgg (VfsPath &fname)
 
ISoundItemGetSoundItem (unsigned long itemRow)
 
unsigned long Count ()
 
void IdleTask ()
 
void SetMemoryUsage (long bufferSize, int bufferCount)
 
long GetBufferCount ()
 
long GetBufferSize ()
 
void PlayAsMusic (const VfsPath &itemPath, bool looping)
 
void PlayAsAmbient (const VfsPath &itemPath, bool looping)
 
void PlayAsUI (const VfsPath &itemPath, bool looping)
 
void PlayAsGroup (const VfsPath &groupPath, CVector3D sourcePos, entity_id_t source, bool ownedSound)
 
void PlayGroupItem (ISoundItem *anItem, ALfloat groupGain)
 
bool InDistress ()
 
void SetDistressThroughShortage ()
 
void SetDistressThroughError ()
 
void Pause (bool pauseIt)
 
void PauseMusic (bool pauseIt)
 
void PauseAmbient (bool pauseIt)
 
void PauseAction (bool pauseIt)
 
void SetAmbientItem (ISoundItem *anItem)
 
- Public Member Functions inherited from ISoundManager
virtual ~ISoundManager ()
 

Static Public Member Functions

static void ScriptingInit ()
 
static void CreateSoundManager ()
 
static void SetEnabled (bool doEnable)
 
static Status ReloadChangedFileCB (void *param, const VfsPath &path)
 
static void CloseGame ()
 
static void al_ReportError (ALenum err, const char *caller, int line)
 
static void al_check (const char *caller, int line)
 
- Static Public Member Functions inherited from ISoundManager
static void CreateSoundManager ()
 
static void SetEnabled (bool doEnable)
 
static void CloseGame ()
 

Protected Member Functions

void InitListener ()
 
Status AlcInit ()
 
void SetMusicItem (ISoundItem *anItem)
 
void SetMasterGain (float gain)
 
void SetMusicGain (float gain)
 
void SetAmbientGain (float gain)
 
void SetActionGain (float gain)
 
void SetUIGain (float gain)
 

Protected Attributes

ALuint m_ALEnvironment
 
ALCcontext * m_Context
 
ALCdevice * m_Device
 
ISoundItemm_CurrentTune
 
ISoundItemm_CurrentEnvirons
 
CSoundManagerWorkerm_Worker
 
CMutex m_DistressMutex
 
PlayListm_PlayListItems
 
SoundGroupMap m_SoundGroups
 
float m_Gain
 
float m_MusicGain
 
float m_AmbientGain
 
float m_ActionGain
 
float m_UIGain
 
bool m_Enabled
 
long m_BufferSize
 
int m_BufferCount
 
bool m_MusicEnabled
 
bool m_SoundEnabled
 
bool m_MusicPaused
 
bool m_AmbientPaused
 
bool m_ActionPaused
 
bool m_RunningPlaylist
 
bool m_PlayingPlaylist
 
bool m_LoopingPlaylist
 
long m_PlaylistGap
 
long m_DistressErrCount
 
long m_DistressTime
 
ALSourceHolderm_ALSourceBuffer
 

Private Member Functions

 NONCOPYABLE (CSoundManager)
 
 CSoundManager (CSoundManager *other)
 

Detailed Description

Definition at line 57 of file SoundManager.h.

Constructor & Destructor Documentation

CSoundManager::CSoundManager ( )

Definition at line 258 of file SoundManager.cpp.

CSoundManager::~CSoundManager ( )
virtual

Definition at line 304 of file SoundManager.cpp.

CSoundManager::CSoundManager ( CSoundManager other)
inlineprivate

Definition at line 167 of file SoundManager.h.

Member Function Documentation

void CSoundManager::AddPlayListItem ( const VfsPath itemPath)

Definition at line 475 of file SoundManager.cpp.

void CSoundManager::al_check ( const char *  caller,
int  line 
)
static

Definition at line 239 of file SoundManager.cpp.

void CSoundManager::al_ReportError ( ALenum  err,
const char *  caller,
int  line 
)
static

Definition at line 234 of file SoundManager.cpp.

Status CSoundManager::AlcInit ( )
protected

Definition at line 339 of file SoundManager.cpp.

void CSoundManager::ClearPlayListItems ( )

Definition at line 480 of file SoundManager.cpp.

static void CSoundManager::CloseGame ( )
static
unsigned long CSoundManager::Count ( )
static void CSoundManager::CreateSoundManager ( )
static
ALuint CSoundManager::GetALSource ( ISoundItem anItem)

Definition at line 440 of file SoundManager.cpp.

long CSoundManager::GetBufferCount ( )

Definition at line 466 of file SoundManager.cpp.

long CSoundManager::GetBufferSize ( )

Definition at line 470 of file SoundManager.cpp.

ISoundItem* CSoundManager::GetSoundItem ( unsigned long  itemRow)
void CSoundManager::IdleTask ( )
virtual

Implements ISoundManager.

Definition at line 586 of file SoundManager.cpp.

bool CSoundManager::InDistress ( )
virtual

Implements ISoundManager.

Definition at line 402 of file SoundManager.cpp.

void CSoundManager::InitListener ( )
protected

Definition at line 644 of file SoundManager.cpp.

ISoundItem * CSoundManager::ItemForData ( CSoundData itemData)

Definition at line 557 of file SoundManager.cpp.

ISoundItem * CSoundManager::ItemForEntity ( entity_id_t  source,
CSoundData sndData 
)

Definition at line 633 of file SoundManager.cpp.

ISoundItem* CSoundManager::ItemFromData ( CSoundData itemData)
ISoundItem* CSoundManager::ItemFromOgg ( VfsPath fname)
ISoundItem* CSoundManager::ItemFromWAV ( VfsPath fname)
ISoundItem * CSoundManager::LoadItem ( const VfsPath itemPath)

Definition at line 541 of file SoundManager.cpp.

CSoundManager::NONCOPYABLE ( CSoundManager  )
private
void CSoundManager::Pause ( bool  pauseIt)
virtual

Implements ISoundManager.

Definition at line 743 of file SoundManager.cpp.

void CSoundManager::PauseAction ( bool  pauseIt)

Definition at line 775 of file SoundManager.cpp.

void CSoundManager::PauseAmbient ( bool  pauseIt)

Definition at line 765 of file SoundManager.cpp.

void CSoundManager::PauseMusic ( bool  pauseIt)

Definition at line 750 of file SoundManager.cpp.

void CSoundManager::PlayAsAmbient ( const VfsPath itemPath,
bool  looping 
)
virtual

Implements ISoundManager.

Definition at line 717 of file SoundManager.cpp.

void CSoundManager::PlayAsGroup ( const VfsPath groupPath,
CVector3D  sourcePos,
entity_id_t  source,
bool  ownedSound 
)
virtual

Implements ISoundManager.

Definition at line 682 of file SoundManager.cpp.

void CSoundManager::PlayAsMusic ( const VfsPath itemPath,
bool  looping 
)
virtual

Implements ISoundManager.

Definition at line 708 of file SoundManager.cpp.

void CSoundManager::PlayAsUI ( const VfsPath itemPath,
bool  looping 
)
virtual

Implements ISoundManager.

Definition at line 726 of file SoundManager.cpp.

void CSoundManager::PlayGroupItem ( ISoundItem anItem,
ALfloat  groupGain 
)

Definition at line 657 of file SoundManager.cpp.

void CSoundManager::ReleaseALSource ( ALuint  theSource)

Definition at line 454 of file SoundManager.cpp.

Status CSoundManager::ReloadChangedFileCB ( void *  param,
const VfsPath path 
)
static

Definition at line 253 of file SoundManager.cpp.

Status CSoundManager::ReloadChangedFiles ( const VfsPath path)

Definition at line 246 of file SoundManager.cpp.

static void CSoundManager::ScriptingInit ( )
static
void CSoundManager::SetActionGain ( float  gain)
protectedvirtual

Implements ISoundManager.

Definition at line 531 of file SoundManager.cpp.

void CSoundManager::SetAmbientGain ( float  gain)
protectedvirtual

Implements ISoundManager.

Definition at line 527 of file SoundManager.cpp.

void CSoundManager::SetAmbientItem ( ISoundItem anItem)

Definition at line 817 of file SoundManager.cpp.

void CSoundManager::SetDistressThroughError ( )

Definition at line 428 of file SoundManager.cpp.

void CSoundManager::SetDistressThroughShortage ( )

Definition at line 419 of file SoundManager.cpp.

static void CSoundManager::SetEnabled ( bool  doEnable)
static
void CSoundManager::SetMasterGain ( float  gain)
protectedvirtual

Implements ISoundManager.

Definition at line 513 of file SoundManager.cpp.

void CSoundManager::SetMemoryUsage ( long  bufferSize,
int  bufferCount 
)
void CSoundManager::SetMusicEnabled ( bool  isEnabled)

Definition at line 669 of file SoundManager.cpp.

void CSoundManager::SetMusicGain ( float  gain)
protectedvirtual

Implements ISoundManager.

Definition at line 523 of file SoundManager.cpp.

void CSoundManager::SetMusicItem ( ISoundItem anItem)
protected

Definition at line 780 of file SoundManager.cpp.

void CSoundManager::setSoundEnabled ( bool  enabled)
void CSoundManager::SetUIGain ( float  gain)
protectedvirtual

Implements ISoundManager.

Definition at line 535 of file SoundManager.cpp.

void CSoundManager::StartPlayList ( bool  doLoop)

Definition at line 492 of file SoundManager.cpp.

Member Data Documentation

float CSoundManager::m_ActionGain
protected

Definition at line 76 of file SoundManager.h.

bool CSoundManager::m_ActionPaused
protected

Definition at line 86 of file SoundManager.h.

ALuint CSoundManager::m_ALEnvironment
protected

Definition at line 63 of file SoundManager.h.

ALSourceHolder* CSoundManager::m_ALSourceBuffer
protected

Definition at line 95 of file SoundManager.h.

float CSoundManager::m_AmbientGain
protected

Definition at line 75 of file SoundManager.h.

bool CSoundManager::m_AmbientPaused
protected

Definition at line 85 of file SoundManager.h.

int CSoundManager::m_BufferCount
protected

Definition at line 80 of file SoundManager.h.

long CSoundManager::m_BufferSize
protected

Definition at line 79 of file SoundManager.h.

ALCcontext* CSoundManager::m_Context
protected

Definition at line 64 of file SoundManager.h.

ISoundItem* CSoundManager::m_CurrentEnvirons
protected

Definition at line 67 of file SoundManager.h.

ISoundItem* CSoundManager::m_CurrentTune
protected

Definition at line 66 of file SoundManager.h.

ALCdevice* CSoundManager::m_Device
protected

Definition at line 65 of file SoundManager.h.

long CSoundManager::m_DistressErrCount
protected

Definition at line 92 of file SoundManager.h.

CMutex CSoundManager::m_DistressMutex
protected

Definition at line 69 of file SoundManager.h.

long CSoundManager::m_DistressTime
protected

Definition at line 93 of file SoundManager.h.

bool CSoundManager::m_Enabled
protected

Definition at line 78 of file SoundManager.h.

float CSoundManager::m_Gain
protected

Definition at line 73 of file SoundManager.h.

bool CSoundManager::m_LoopingPlaylist
protected

Definition at line 89 of file SoundManager.h.

bool CSoundManager::m_MusicEnabled
protected

Definition at line 81 of file SoundManager.h.

float CSoundManager::m_MusicGain
protected

Definition at line 74 of file SoundManager.h.

bool CSoundManager::m_MusicPaused
protected

Definition at line 84 of file SoundManager.h.

bool CSoundManager::m_PlayingPlaylist
protected

Definition at line 88 of file SoundManager.h.

long CSoundManager::m_PlaylistGap
protected

Definition at line 91 of file SoundManager.h.

PlayList* CSoundManager::m_PlayListItems
protected

Definition at line 70 of file SoundManager.h.

bool CSoundManager::m_RunningPlaylist
protected

Definition at line 87 of file SoundManager.h.

bool CSoundManager::m_SoundEnabled
protected

Definition at line 82 of file SoundManager.h.

SoundGroupMap CSoundManager::m_SoundGroups
protected

Definition at line 71 of file SoundManager.h.

float CSoundManager::m_UIGain
protected

Definition at line 77 of file SoundManager.h.

CSoundManagerWorker* CSoundManager::m_Worker
protected

Definition at line 68 of file SoundManager.h.


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