diff options
author | Jörg Müller <nexyon@gmail.com> | 2014-03-04 16:44:15 +0400 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2015-07-28 15:01:52 +0300 |
commit | 733073550f61cf4fbbe21aab33e9271915325109 (patch) | |
tree | a182ced91bb592815c097abf572bba999a9e8cdc /source/gameengine | |
parent | 96dd213e7ecabeffc682aee40b4102296ab062de (diff) |
Audaspace: use standalone library.
- Added the cmake configuration option WITH_EXTERNAL_AUDASPACE.
- Fixes to build without standalone library as well.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/BlenderRoutines/CMakeLists.txt | 10 | ||||
-rw-r--r-- | source/gameengine/Converter/CMakeLists.txt | 10 | ||||
-rw-r--r-- | source/gameengine/Converter/KX_ConvertActuators.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/CMakeLists.txt | 10 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/CMakeLists.txt | 14 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_SoundActuator.cpp | 11 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_SoundActuator.h | 7 |
10 files changed, 61 insertions, 23 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index f275d0a0f0c..4d30bc51280 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -101,7 +101,11 @@ typedef void * wmUIHandlerRemoveFunc; } #ifdef WITH_AUDASPACE -# include "AUD_C-API.h" +# ifdef WITH_EXTERNAL_AUDASPACE +# include <audaspace/AUD_Device.h> +# else +# include "AUD_C-API.h" +# endif #endif static BlendFileData *load_game_data(char *filename) diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt index 1a2809cc8ab..324babf9fa9 100644 --- a/source/gameengine/BlenderRoutines/CMakeLists.txt +++ b/source/gameengine/BlenderRoutines/CMakeLists.txt @@ -56,10 +56,14 @@ set(SRC add_definitions(${GL_DEFINITIONS}) if(WITH_AUDASPACE) - list(APPEND INC - ../../../intern/audaspace/intern - ) add_definitions(-DWITH_AUDASPACE) + + if(WITH_EXTERNAL_AUDASPACE) + add_definitions(-DWITH_EXTERNAL_AUDASPACE) + list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS}) + else() + list(APPEND INC ../../../intern/audaspace/intern) + endif() endif() if(WITH_CODEC_FFMPEG) diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt index 6d681dd166e..dba3f4da050 100644 --- a/source/gameengine/Converter/CMakeLists.txt +++ b/source/gameengine/Converter/CMakeLists.txt @@ -113,10 +113,14 @@ if(WITH_BULLET) endif() if(WITH_AUDASPACE) - list(APPEND INC - ../../../intern/audaspace/intern - ) add_definitions(-DWITH_AUDASPACE) + + if(WITH_EXTERNAL_AUDASPACE) + add_definitions(-DWITH_EXTERNAL_AUDASPACE) + list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS}) + else() + list(APPEND INC ../../../intern/audaspace/intern) + endif() endif() blender_add_lib(ge_converter "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 1acbd0b1608..e5e86cd4ee6 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -42,7 +42,11 @@ #include "KX_ConvertActuators.h" #ifdef WITH_AUDASPACE -# include "AUD_C-API.h" +# ifdef WITH_EXTERNAL_AUDASPACE +# include <audaspace/AUD_Sound.h> +# else +# include "AUD_C-API.h" +# endif #endif // Actuators diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index a1bc7e88840..58e47bc4440 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -85,10 +85,14 @@ if(WITH_INTERNATIONAL) endif() if(WITH_AUDASPACE) - list(APPEND INC - ../../../../intern/audaspace/intern - ) add_definitions(-DWITH_AUDASPACE) + + if(WITH_EXTERNAL_AUDASPACE) + add_definitions(-DWITH_EXTERNAL_AUDASPACE) + list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS}) + else() + list(APPEND INC ../../../../intern/audaspace/intern) + endif() endif() if(WITH_SDL AND WITH_SDL_DYNLOAD) diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index f06a153431e..75a301211a2 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -100,7 +100,11 @@ extern "C" #include "GHOST_Rect.h" #ifdef WITH_AUDASPACE -# include "AUD_C-API.h" +# ifdef WITH_EXTERNAL_AUDASPACE +# include <audaspace/AUD_Device.h> +# else +# include "AUD_C-API.h" +# endif #endif static void frameTimerProc(GHOST_ITimerTask* task, GHOST_TUns64 time); diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt index 44532e5d737..f938994f86a 100644 --- a/source/gameengine/Ketsji/CMakeLists.txt +++ b/source/gameengine/Ketsji/CMakeLists.txt @@ -248,11 +248,17 @@ if(WITH_CODEC_FFMPEG) endif() if(WITH_AUDASPACE) - list(APPEND INC - ../../../intern/audaspace/intern - ../../../intern/audaspace/FX - ) + list(APPEND INC ../../../intern/audaspace/intern) + add_definitions(-DWITH_AUDASPACE) + + if(WITH_EXTERNAL_AUDASPACE) + add_definitions(-DWITH_EXTERNAL_AUDASPACE) + list(APPEND INC_SYS + ${CAUDASPACE_INCLUDE_DIRS} + ${PYAUDASPACE_INCLUDE_DIRS} + ) + endif() endif() if(WITH_BULLET) diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index acf65817c49..c7cf556a2d3 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -62,10 +62,6 @@ #include "KX_PyConstraintBinding.h" #include "PHY_IPhysicsEnvironment.h" -#ifdef WITH_AUDASPACE -# include "AUD_C-API.h" -#endif - #include "NG_NetworkScene.h" #include "NG_NetworkDeviceInterface.h" diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 611467d7167..a14cb9a2897 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -37,7 +37,14 @@ #include "KX_SoundActuator.h" #ifdef WITH_AUDASPACE -# include "AUD_C-API.h" +# ifdef WITH_EXTERNAL_AUDASPACE +typedef float sample_t; +# include <audaspace/AUD_Sound.h> +# include <audaspace/AUD_Special.h> +# include <audaspace/AUD_Device.h> +# include <audaspace/AUD_Handle.h> +# include <audaspace/python/PyAPI.h> +# endif #endif #include "KX_GameObject.h" @@ -554,7 +561,7 @@ int KX_SoundActuator::pyattr_set_sound(void *self, const struct KX_PYATTRIBUTE_D if (!PyArg_Parse(value, "O", &sound)) return PY_SET_ATTR_FAIL; - AUD_Sound *snd = AUD_getSoundFromPython((void *)sound); + AUD_Sound *snd = AUD_getSoundFromPython(sound); if (snd) { diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h index bd7b28680f6..83d22142bda 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.h +++ b/source/gameengine/Ketsji/KX_SoundActuator.h @@ -35,7 +35,12 @@ #include "SCA_IActuator.h" #ifdef WITH_AUDASPACE -# include "AUD_C-API.h" +# ifdef WITH_EXTERNAL_AUDASPACE +# include <audaspace/AUD_Sound.h> +# include <audaspace/AUD_Handle.h> +# else +# include "AUD_C-API.h" +# endif #endif #include "BKE_sound.h" |