diff options
author | nOOb3167 <nOOb3167@gmail.com> | 2018-03-23 15:31:43 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-03-23 15:31:43 +0100 |
commit | 9293d8e2715f3e883fee4c0ed617636a785f20d1 (patch) | |
tree | 9e0254d79454ed1b105a4678f90dfdecefdb74bf /src/client/clientlauncher.cpp | |
parent | 9fcc0c1217fcd3acabaa11239631de10032fa126 (diff) | |
download | hax-minetest-server-9293d8e2715f3e883fee4c0ed617636a785f20d1.tar.gz hax-minetest-server-9293d8e2715f3e883fee4c0ed617636a785f20d1.zip |
Global initialization of sound using SoundManagerGlobal (#7063)
* Global initialization of sound using SoundManagerGlobal
Diffstat (limited to 'src/client/clientlauncher.cpp')
-rw-r--r-- | src/client/clientlauncher.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; |