aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIAudioManager.cpp
diff options
context:
space:
mode:
authordavilla <davilla@svn>2009-11-20 06:36:11 +0000
committerdavilla <davilla@svn>2009-11-20 06:36:11 +0000
commit8297f12a02ed713b42c8c3e88f100869112c4328 (patch)
tree6108282fb515535156f0de8df2a65a1fd5323923 /guilib/GUIAudioManager.cpp
parenta1b8345abb21ae880fd1a5a4bb916c44479e6534 (diff)
[osx] restore gui nav sounds, needs checking under linux and windows
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@24778 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIAudioManager.cpp')
-rw-r--r--guilib/GUIAudioManager.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/guilib/GUIAudioManager.cpp b/guilib/GUIAudioManager.cpp
index cb26070572..0db33e16af 100644
--- a/guilib/GUIAudioManager.cpp
+++ b/guilib/GUIAudioManager.cpp
@@ -53,10 +53,6 @@ CGUIAudioManager::~CGUIAudioManager()
void CGUIAudioManager::Initialize(int iDevice)
{
-#if defined(__APPLE__)
- // disabled gui sounds under osx, this is broke until SDL_Mixer is replaced.
- return;
-#endif
if (m_bInitialized || !m_bEnabled)
return;
@@ -83,10 +79,6 @@ void CGUIAudioManager::Initialize(int iDevice)
void CGUIAudioManager::DeInitialize(int iDevice)
{
-#if defined(__APPLE__)
- // disabled gui sounds under osx, this is broke until SDL_Mixer is replaced.
- return;
-#endif
if (!(iDevice == CAudioContext::DIRECTSOUND_DEVICE || iDevice == CAudioContext::DEFAULT_DEVICE)) return;
if (!m_bInitialized)
@@ -413,16 +405,16 @@ bool CGUIAudioManager::LoadWindowSound(TiXmlNode* pWindowNode, const CStdString&
// \brief Enable/Disable nav sounds
void CGUIAudioManager::Enable(bool bEnable)
{
- m_bEnabled=bEnable;
-
// always deinit audio when we don't want gui sounds
if (g_guiSettings.GetString("lookandfeel.soundskin")=="OFF")
bEnable = false;
- if (bEnable)
+ if (bEnable && !m_bInitialized)
Initialize(CAudioContext::DEFAULT_DEVICE);
- else if (!bEnable)
+ else if (!bEnable && m_bInitialized)
DeInitialize(CAudioContext::DEFAULT_DEVICE);
+
+ m_bEnabled=bEnable;
}
// \brief Sets the volume of all playing sounds