diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-07-20 03:31:45 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-07-20 03:31:45 +0400 |
commit | cf62de6c6df49bdadd709d9628411bc74c1dfd95 (patch) | |
tree | 17d386d4380d0cc87167acf12ef16de58cae1215 /source/gameengine/GamePlayer/ghost/GPG_Application.cpp | |
parent | 017f09b9d467c12d6a7fd3cb744ca0eb4e851d0e (diff) |
BGE: Partial fix for [#36151] "Distance model not carrying over to standalone" reported by Florian Schneider (drjaska).
The Blenderplayer wasn't initializing 3D audio settings from the scene settings like the embedded player was.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Application.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index 5baca2540a4..bedee5d9a47 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -99,6 +99,12 @@ extern "C" #include "GHOST_IWindow.h" #include "GHOST_Rect.h" +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +# include "AUD_I3DDevice.h" +# include "AUD_IDevice.h" +#endif + static void frameTimerProc(GHOST_ITimerTask* task, GHOST_TUns64 time); static GHOST_ISystem* fSystem = 0; @@ -725,6 +731,15 @@ bool GPG_Application::startEngine(void) if (m_startScene->gm.stereoflag == STEREO_DOME) m_ketsjiengine->InitDome(m_startScene->gm.dome.res, m_startScene->gm.dome.mode, m_startScene->gm.dome.angle, m_startScene->gm.dome.resbuf, m_startScene->gm.dome.tilt, m_startScene->gm.dome.warptext); + // initialize 3D Audio Settings + AUD_I3DDevice* dev = AUD_get3DDevice(); + if (dev) + { + dev->setSpeedOfSound(m_startScene->audio.speed_of_sound); + dev->setDopplerFactor(m_startScene->audio.doppler_factor); + dev->setDistanceModel(AUD_DistanceModel(m_startScene->audio.distance_model)); + } + #ifdef WITH_PYTHON // Set the GameLogic.globalDict from marshal'd data, so we can // load new blend files and keep data in GameLogic.globalDict |