Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CSoundManager Class Reference

#include <SoundManager.h>

Inheritance diagram for CSoundManager:
Collaboration diagram for CSoundManager:

Public Member Functions

 CSoundManager (ALCdevice *device)
 
virtual ~CSoundManager ()
 
void StartWorker ()
 
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 ()
 
CStr8 GetSoundCardNames () const
 
CStr8 GetOpenALVersion () const
 
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, const 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 RunHardwareDetection ()
 
void SetAmbientItem (ISoundItem *anItem)
 
void SetMasterGain (float gain)
 
void SetMusicGain (float gain)
 
void SetAmbientGain (float gain)
 
void SetActionGain (float gain)
 
void SetUIGain (float gain)
 
- Public Member Functions inherited from ISoundManager
virtual ~ISoundManager ()
 
virtual void StartWorker ()=0
 
virtual void IdleTask ()=0
 
virtual void Pause (bool pauseIt)=0
 
virtual void PauseMusic (bool pauseIt)=0
 
virtual void PauseAmbient (bool pauseIt)=0
 
virtual void PauseAction (bool pauseIt)=0
 
virtual void SetMasterGain (float gain)=0
 
virtual void SetMusicGain (float gain)=0
 
virtual void SetAmbientGain (float gain)=0
 
virtual void SetActionGain (float gain)=0
 
virtual void SetUIGain (float gain)=0
 
virtual void RunHardwareDetection ()=0
 
virtual CStr8 GetSoundCardNames () const =0
 
virtual CStr8 GetOpenALVersion () const =0
 
virtual void PlayAsUI (const VfsPath &itemPath, bool looping)=0
 
virtual void PlayAsMusic (const VfsPath &itemPath, bool looping)=0
 
virtual void PlayAsAmbient (const VfsPath &itemPath, bool looping)=0
 
virtual void PlayAsGroup (const VfsPath &groupPath, const CVector3D &sourcePos, entity_id_t source, bool ownedSound)=0
 
virtual bool InDistress ()=0
 

Static Public Member Functions

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)
 

Protected Attributes

ALCcontext * m_Context
 
ALCdevice * m_Device
 
ALSourceHolderm_ALSourceBuffer
 
ISoundItemm_CurrentTune
 
ISoundItemm_CurrentEnvirons
 
CSoundManagerWorkerm_Worker
 
std::mutex 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_SoundEnabled
 
bool m_MusicEnabled
 
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
 
CStr8 m_SoundCardNames
 
CStr8 m_OpenALVersion
 

Private Member Functions

 NONCOPYABLE (CSoundManager)
 
 CSoundManager (CSoundManager *other)
 

Constructor & Destructor Documentation

◆ CSoundManager() [1/2]

CSoundManager::CSoundManager ( ALCdevice *  device)

◆ ~CSoundManager()

CSoundManager::~CSoundManager ( )
virtual

◆ CSoundManager() [2/2]

CSoundManager::CSoundManager ( CSoundManager other)
inlineprivate

Member Function Documentation

◆ AddPlayListItem()

void CSoundManager::AddPlayListItem ( const VfsPath itemPath)

◆ al_check()

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

◆ al_ReportError()

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

◆ AlcInit()

Status CSoundManager::AlcInit ( )
protected

◆ ClearPlayListItems()

void CSoundManager::ClearPlayListItems ( )

◆ CloseGame()

static void CSoundManager::CloseGame ( )
static

◆ Count()

unsigned long CSoundManager::Count ( )

◆ CreateSoundManager()

static void CSoundManager::CreateSoundManager ( )
static

◆ GetALSource()

ALuint CSoundManager::GetALSource ( ISoundItem anItem)

◆ GetBufferCount()

long CSoundManager::GetBufferCount ( )

◆ GetBufferSize()

long CSoundManager::GetBufferSize ( )

◆ GetOpenALVersion()

CStr8 CSoundManager::GetOpenALVersion ( ) const
virtual

Implements ISoundManager.

◆ GetSoundCardNames()

CStr8 CSoundManager::GetSoundCardNames ( ) const
virtual

Implements ISoundManager.

◆ GetSoundItem()

ISoundItem * CSoundManager::GetSoundItem ( unsigned long  itemRow)

◆ IdleTask()

void CSoundManager::IdleTask ( )
virtual

Implements ISoundManager.

◆ InDistress()

bool CSoundManager::InDistress ( )
virtual

Implements ISoundManager.

◆ InitListener()

void CSoundManager::InitListener ( )
protected

◆ ItemForData()

ISoundItem * CSoundManager::ItemForData ( CSoundData itemData)

◆ ItemForEntity()

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

◆ ItemFromData()

ISoundItem * CSoundManager::ItemFromData ( CSoundData itemData)

◆ ItemFromOgg()

ISoundItem * CSoundManager::ItemFromOgg ( VfsPath fname)

◆ ItemFromWAV()

ISoundItem * CSoundManager::ItemFromWAV ( VfsPath fname)

◆ LoadItem()

ISoundItem * CSoundManager::LoadItem ( const VfsPath itemPath)

◆ NONCOPYABLE()

CSoundManager::NONCOPYABLE ( CSoundManager  )
private

◆ Pause()

void CSoundManager::Pause ( bool  pauseIt)
virtual

Implements ISoundManager.

◆ PauseAction()

void CSoundManager::PauseAction ( bool  pauseIt)
virtual

Implements ISoundManager.

◆ PauseAmbient()

void CSoundManager::PauseAmbient ( bool  pauseIt)
virtual

Implements ISoundManager.

◆ PauseMusic()

void CSoundManager::PauseMusic ( bool  pauseIt)
virtual

Implements ISoundManager.

◆ PlayAsAmbient()

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

Implements ISoundManager.

◆ PlayAsGroup()

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

Implements ISoundManager.

◆ PlayAsMusic()

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

Implements ISoundManager.

◆ PlayAsUI()

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

Implements ISoundManager.

◆ PlayGroupItem()

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

◆ ReleaseALSource()

void CSoundManager::ReleaseALSource ( ALuint  theSource)

◆ ReloadChangedFileCB()

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

◆ ReloadChangedFiles()

Status CSoundManager::ReloadChangedFiles ( const VfsPath path)

◆ RunHardwareDetection()

void CSoundManager::RunHardwareDetection ( )
virtual

Implements ISoundManager.

◆ SetActionGain()

void CSoundManager::SetActionGain ( float  gain)
virtual

Implements ISoundManager.

◆ SetAmbientGain()

void CSoundManager::SetAmbientGain ( float  gain)
virtual

Implements ISoundManager.

◆ SetAmbientItem()

void CSoundManager::SetAmbientItem ( ISoundItem anItem)

◆ SetDistressThroughError()

void CSoundManager::SetDistressThroughError ( )

◆ SetDistressThroughShortage()

void CSoundManager::SetDistressThroughShortage ( )

◆ SetEnabled()

static void CSoundManager::SetEnabled ( bool  doEnable)
static

◆ SetMasterGain()

void CSoundManager::SetMasterGain ( float  gain)
virtual

Implements ISoundManager.

◆ SetMemoryUsage()

void CSoundManager::SetMemoryUsage ( long  bufferSize,
int  bufferCount 
)

◆ SetMusicEnabled()

void CSoundManager::SetMusicEnabled ( bool  isEnabled)

◆ SetMusicGain()

void CSoundManager::SetMusicGain ( float  gain)
virtual

Implements ISoundManager.

◆ SetMusicItem()

void CSoundManager::SetMusicItem ( ISoundItem anItem)
protected

◆ SetSoundEnabled()

void CSoundManager::SetSoundEnabled ( bool  enabled)

◆ SetUIGain()

void CSoundManager::SetUIGain ( float  gain)
virtual

Implements ISoundManager.

◆ StartPlayList()

void CSoundManager::StartPlayList ( bool  doLoop)

◆ StartWorker()

void CSoundManager::StartWorker ( )
virtual

Implements ISoundManager.

Member Data Documentation

◆ m_ActionGain

float CSoundManager::m_ActionGain
protected

◆ m_ActionPaused

bool CSoundManager::m_ActionPaused
protected

◆ m_ALSourceBuffer

ALSourceHolder* CSoundManager::m_ALSourceBuffer
protected

◆ m_AmbientGain

float CSoundManager::m_AmbientGain
protected

◆ m_AmbientPaused

bool CSoundManager::m_AmbientPaused
protected

◆ m_BufferCount

int CSoundManager::m_BufferCount
protected

◆ m_BufferSize

long CSoundManager::m_BufferSize
protected

◆ m_Context

ALCcontext* CSoundManager::m_Context
protected

◆ m_CurrentEnvirons

ISoundItem* CSoundManager::m_CurrentEnvirons
protected

◆ m_CurrentTune

ISoundItem* CSoundManager::m_CurrentTune
protected

◆ m_Device

ALCdevice* CSoundManager::m_Device
protected

◆ m_DistressErrCount

long CSoundManager::m_DistressErrCount
protected

◆ m_DistressMutex

std::mutex CSoundManager::m_DistressMutex
protected

◆ m_DistressTime

long CSoundManager::m_DistressTime
protected

◆ m_Enabled

bool CSoundManager::m_Enabled
protected

◆ m_Gain

float CSoundManager::m_Gain
protected

◆ m_LoopingPlaylist

bool CSoundManager::m_LoopingPlaylist
protected

◆ m_MusicEnabled

bool CSoundManager::m_MusicEnabled
protected

◆ m_MusicGain

float CSoundManager::m_MusicGain
protected

◆ m_MusicPaused

bool CSoundManager::m_MusicPaused
protected

◆ m_OpenALVersion

CStr8 CSoundManager::m_OpenALVersion
protected

◆ m_PlayingPlaylist

bool CSoundManager::m_PlayingPlaylist
protected

◆ m_PlaylistGap

long CSoundManager::m_PlaylistGap
protected

◆ m_PlayListItems

PlayList* CSoundManager::m_PlayListItems
protected

◆ m_RunningPlaylist

bool CSoundManager::m_RunningPlaylist
protected

◆ m_SoundCardNames

CStr8 CSoundManager::m_SoundCardNames
protected

◆ m_SoundEnabled

bool CSoundManager::m_SoundEnabled
protected

◆ m_SoundGroups

SoundGroupMap CSoundManager::m_SoundGroups
protected

◆ m_UIGain

float CSoundManager::m_UIGain
protected

◆ m_Worker

CSoundManagerWorker* CSoundManager::m_Worker
protected

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