summaryrefslogtreecommitdiffstats
path: root/src/app/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/app.cpp')
-rw-r--r--src/app/app.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 924ec74..683b053 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -40,6 +40,11 @@
#include <unistd.h>
+#ifdef OPENAL_SOUND
+ #include "sound/oalsound/alsound.h"
+#endif
+
+
template<> CApplication* CSingleton<CApplication>::mInstance = nullptr;
//! Static buffer for putenv locale
@@ -332,12 +337,12 @@ bool CApplication::Create()
if (GetProfile().GetLocalProfileString("Resources", "Data", path))
m_dataPath = path;
- m_sound = static_cast<CSoundInterface*>(CInstanceManager::GetInstancePointer()->SearchInstance(CLASS_SOUND));
-
- if (!m_sound) {
- GetLogger()->Error("Sound not loaded, falling back to fake sound!\n");
- m_sound = new CSoundInterface();
- }
+ #ifdef OPENAL_SOUND
+ m_sound = static_cast<CSoundInterface *>(new ALSound());
+ #else
+ GetLogger()->Info("No sound support.\n");
+ m_sound = new CSoundInterface();
+ #endif
m_sound->Create(true);
if (GetProfile().GetLocalProfileString("Resources", "Sound", path))