11 #include "GUIComponent.h" 12 #include "cores/AudioEngine/Interfaces/AESound.h" 13 #include "settings/lib/ISettingCallback.h" 14 #include "threads/CriticalSection.h" 26 enum WINDOW_SOUND { SOUND_INIT = 0, SOUND_DEINIT };
33 std::shared_ptr<IAESound> initSound;
34 std::shared_ptr<IAESound> deInitSound;
37 struct IAESoundDeleter
46 void OnSettingChanged(
const std::shared_ptr<const CSetting>& setting)
override;
48 const char* oldSettingId,
49 const TiXmlNode* oldSettingNode)
override;
58 void PlayActionSound(
const CAction& action);
59 void PlayWindowSound(
int id, WINDOW_SOUND event);
60 void PlayPythonSound(
const std::string& strFileName,
bool useCached =
true);
62 void Enable(
bool bEnable);
63 void SetVolume(
float level);
68 std::shared_ptr<CSettings> m_settings;
70 typedef std::map<const std::string, std::weak_ptr<IAESound>> soundCache;
71 typedef std::map<int, std::shared_ptr<IAESound>> actionSoundMap;
72 typedef std::map<int, CWindowSounds> windowSoundMap;
73 typedef std::map<const std::string, std::shared_ptr<IAESound>> pythonSoundsMap;
75 soundCache m_soundCache;
76 actionSoundMap m_actionSoundMap;
77 windowSoundMap m_windowSoundMap;
78 pythonSoundsMap m_pythonSounds;
80 std::string m_strMediaDir;
83 CCriticalSection m_cs;
85 std::shared_ptr<IAESound> LoadSound(
const std::string& filename);
86 std::shared_ptr<IAESound> LoadWindowSound(TiXmlNode* pWindowNode,
87 const std::string& strIdentifier);
Definition: GUIAudioManager.h:28
Wrapper around CSettingsManager responsible for properly setting up the settings manager and register...
Definition: Settings.h:27
Definition: ISettingCallback.h:16
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
bool OnSettingUpdate(const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) override
The given setting needs to be updated.
Definition: GUIAudioManager.cpp:57
void OnSettingChanged(const std::shared_ptr< const CSetting > &setting) override
The value of the given setting has changed.
Definition: GUIAudioManager.cpp:44