18 #ifndef INCLUDED_SOUNDMANAGER_H 19 #define INCLUDED_SOUNDMANAGER_H 40 #define AL_CHECK CSoundManager::al_check(__func__, __LINE__) 51 typedef std::map<entity_id_t, ISoundItem*>
ItemsMap;
109 void ClearPlayListItems();
110 void StartPlayList(
bool doLoop);
111 void AddPlayListItem(
const VfsPath& itemPath);
113 static void CreateSoundManager();
114 static void SetEnabled(
bool doEnable);
117 static void CloseGame();
119 static void al_ReportError(ALenum err,
const char* caller,
int line);
120 static void al_check(
const char* caller,
int line);
122 void SetMusicEnabled(
bool isEnabled);
123 void SetSoundEnabled(
bool enabled);
126 void ReleaseALSource(ALuint theSource);
132 ISoundItem* GetSoundItem(
unsigned long itemRow);
133 unsigned long Count();
136 void SetMemoryUsage(
long bufferSize,
int bufferCount);
137 long GetBufferCount();
138 long GetBufferSize();
139 CStr8 GetSoundCardNames()
const;
140 CStr8 GetOpenALVersion()
const;
142 void PlayAsMusic(
const VfsPath& itemPath,
bool looping);
143 void PlayAsAmbient(
const VfsPath& itemPath,
bool looping);
144 void PlayAsUI(
const VfsPath& itemPath,
bool looping);
147 void PlayGroupItem(
ISoundItem* anItem, ALfloat groupGain);
150 void SetDistressThroughShortage();
151 void SetDistressThroughError();
153 void Pause(
bool pauseIt);
154 void PauseMusic(
bool pauseIt);
155 void PauseAmbient(
bool pauseIt);
156 void PauseAction(
bool pauseIt);
177 #else // !CONFIG2_AUDIO 181 #endif // !CONFIG2_AUDIO 183 #endif // INCLUDED_SOUNDMANAGER_H #define NONCOPYABLE(className)
Indicates that a class is noncopyable (usually due to const or reference members, or because the clas...
Definition: code_annotation.h:227
void SetAmbientGain(float gain)
Definition: JSInterface_Sound.cpp:100
ALuint ALSource
Title of the column.
Definition: SoundManager.h:45
bool m_LoopingPlaylist
Definition: SoundManager.h:89
bool m_Enabled
Definition: SoundManager.h:78
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
Definition: code_annotation.h:38
Definition: SoundManager.cpp:44
float m_UIGain
Definition: SoundManager.h:77
float m_AmbientGain
Definition: SoundManager.h:75
SoundGroupMap m_SoundGroups
Definition: SoundManager.h:71
std::vector< ISoundItem * > ItemsList
Definition: SoundManager.h:50
bool m_SoundEnabled
Definition: SoundManager.h:81
Definition: SoundManager.h:57
bool m_MusicPaused
Definition: SoundManager.h:84
std::mutex m_DistressMutex
Definition: SoundManager.h:69
ALCdevice * m_Device
Definition: SoundManager.h:64
ALCcontext * m_Context
Definition: SoundManager.h:63
PlayList * m_PlayListItems
Definition: SoundManager.h:70
CStr8 m_OpenALVersion
Definition: SoundManager.h:96
Definition: ISoundItem.h:29
Definition: Vector3D.h:30
std::map< entity_id_t, ISoundItem * > ItemsMap
Definition: SoundManager.h:51
long m_DistressErrCount
Definition: SoundManager.h:92
ISoundItem * m_CurrentEnvirons
Definition: SoundManager.h:67
void SetMasterGain(float gain)
Definition: JSInterface_Sound.cpp:88
CSoundManager(CSoundManager *other)
Definition: SoundManager.h:174
long m_BufferSize
Definition: SoundManager.h:79
CSoundManagerWorker * m_Worker
Definition: SoundManager.h:68
Status ReloadChangedFiles()
poll for directory change notifications and reload all affected files.
Definition: Filesystem.cpp:76
bool m_RunningPlaylist
Definition: SoundManager.h:87
Definition: SoundData.h:34
void SetActionGain(float gain)
Definition: JSInterface_Sound.cpp:106
New profiler (complementing the older CProfileManager)
Definition: SoundManager.h:42
int m_BufferCount
Definition: SoundManager.h:80
ISoundItem * SourceItem
Definition: SoundManager.h:46
std::vector< VfsPath > PlayList
Definition: SoundManager.h:49
bool m_MusicEnabled
Definition: SoundManager.h:82
long m_DistressTime
Definition: SoundManager.h:93
i64 Status
Error handling system.
Definition: status.h:169
void SetMusicGain(float gain)
Definition: JSInterface_Sound.cpp:94
void RunHardwareDetection()
Runs hardware-detection script to adjust default config settings and/or emit warnings depending on th...
Definition: HWDetect.cpp:66
Definition: ISoundManager.h:28
ISoundItem * m_CurrentTune
Definition: SoundManager.h:66
static Status ReloadChangedFileCB(void *param, const VfsPath &path)
Definition: ObjectManager.cpp:44
float m_MusicGain
Definition: SoundManager.h:74
long m_PlaylistGap
Definition: SoundManager.h:91
bool m_PlayingPlaylist
Definition: SoundManager.h:88
std::map< std::wstring, CSoundGroup * > SoundGroupMap
Definition: SoundManager.h:52
float m_ActionGain
Definition: SoundManager.h:76
u32 entity_id_t
Entity ID type.
Definition: Entity.h:23
bool m_ActionPaused
Definition: SoundManager.h:86
bool m_AmbientPaused
Definition: SoundManager.h:85
ALSourceHolder * m_ALSourceBuffer
Definition: SoundManager.h:65
float m_Gain
Definition: SoundManager.h:73
CStr8 m_SoundCardNames
Definition: SoundManager.h:95
void SetUIGain(float gain)
Definition: JSInterface_Sound.cpp:112