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 | |
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')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/CMakeLists.txt | 7 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 15 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/SConscript | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index 4ac9e78232e..4e17f21ae8c 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -81,4 +81,11 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() +if(WITH_AUDASPACE) + list(APPEND INC + ../../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + blender_add_lib_nolist(ge_player_ghost "${SRC}" "${INC}" "${INC_SYS}") 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 diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript index 8590aa24004..b507e2bda7b 100644 --- a/source/gameengine/GamePlayer/ghost/SConscript +++ b/source/gameengine/GamePlayer/ghost/SConscript @@ -43,6 +43,7 @@ incs = [ '#intern/guardedalloc', '#intern/moto/include', '#intern/container', + '#intern/audaspace/intern', '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer', '#source/gameengine/BlenderRoutines', '#source/gameengine/Converter', |