diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-07-09 16:35:40 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-07-09 16:35:40 +0400 |
commit | 9772eb4d5f7e6e8388b835f8293dececc990bbd3 (patch) | |
tree | bd8445507decdadb2fca5152fbc8018eab0b7384 /source | |
parent | 5460994095345ff77da42868ccf8f3d90c1733f0 (diff) |
Audaspace:
* Renamed AUD_Handle to AUD_Channel in the C-API to prevent errors with the C++ version of AUD_Handle.
* Added Python API!!!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/python/SConscript | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy.c | 7 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 5 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_SoundActuator.h | 2 |
5 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/python/CMakeLists.txt b/source/blender/python/CMakeLists.txt index 3c79e9d3056..dcfc8678faa 100644 --- a/source/blender/python/CMakeLists.txt +++ b/source/blender/python/CMakeLists.txt @@ -36,6 +36,7 @@ SET(INC ../windowmanager ../editors/include ../../../intern/guardedalloc + ../../../intern/audaspace/intern ${PYTHON_INC} ) diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript index ca742a3646a..d6c24eb3bfc 100644 --- a/source/blender/python/SConscript +++ b/source/blender/python/SConscript @@ -6,7 +6,7 @@ sources = env.Glob('intern/*.c') incs = '. ../editors/include ../makesdna ../makesrna ../blenlib ../blenkernel ../nodes' incs += ' ../imbuf ../blenloader ../render/extern/include ../windowmanager' incs += ' #intern/guardedalloc #intern/memutil #extern/glew/include' -incs += ' ' + env['BF_PYTHON_INC'] +incs += ' #intern/audaspace/intern ' + env['BF_PYTHON_INC'] defs = [] diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index b978e46f6da..fb5c56f383e 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -41,6 +41,11 @@ #include "../generic/blf_api.h" #include "../generic/IDProp.h" +#ifndef DISABLE_PYTHON +#define WITH_PYTHON +#endif +#include "AUD_C-API.h" + static char bpy_home_paths_doc[] = ".. function:: home_paths(subfolder)\n" "\n" @@ -162,7 +167,7 @@ void BPy_init_modules( void ) BGL_Init(); BLF_Init(); IDProp_Init_Types(); - + AUD_initPython(); mod = PyModule_New("_bpy"); diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 5fe62a0e220..73d45eb97aa 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -45,6 +45,10 @@ extern "C" { #include "marshal.h" /* python header for loading/saving dicts */ } + +#define WITH_PYTHON +#include "AUD_C-API.h" + #endif #include "KX_PythonInit.h" @@ -1989,6 +1993,7 @@ void setupGamePython(KX_KetsjiEngine* ketsjiengine, KX_Scene* startscene, Main * initGeometry(); initBGL(); initBLF(); + AUD_initPython(); #ifdef WITH_FFMPEG initVideoTexture(); diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h index 1eaea276191..ce7612d4bcb 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.h +++ b/source/gameengine/Ketsji/KX_SoundActuator.h @@ -58,7 +58,7 @@ class KX_SoundActuator : public SCA_IActuator float m_pitch; bool m_is3d; KX_3DSoundSettings m_3d; - AUD_Handle* m_handle; + AUD_Channel* m_handle; void play(); |