From 9293d8e2715f3e883fee4c0ed617636a785f20d1 Mon Sep 17 00:00:00 2001 From: nOOb3167 Date: Fri, 23 Mar 2018 15:31:43 +0100 Subject: Global initialization of sound using SoundManagerGlobal (#7063) * Global initialization of sound using SoundManagerGlobal --- src/client/clientlauncher.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client') diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index b02f1b438..2f8591179 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -35,6 +35,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "renderingengine.h" #include "network/networkexceptions.h" +#if USE_SOUND + #include "sound_openal.h" +#endif + /* mainmenumanager.h */ gui::IGUIEnvironment *guienv = nullptr; @@ -71,6 +75,11 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) if (list_video_modes) return RenderingEngine::print_video_modes(); +#if USE_SOUND + if (g_settings->getBool("enable_sound")) + g_sound_manager_singleton = createSoundManagerSingleton(); +#endif + if (!init_engine()) { errorstream << "Could not initialize game engine." << std::endl; return false; -- cgit v1.2.3