Audaspace: fixing problems for the merge to master suggested by Campbell and Sergey.
authorJörg Müller <nexyon@gmail.com>
Tue, 16 Jun 2015 08:03:35 +0000 (10:03 +0200)
committerJörg Müller <nexyon@gmail.com>
Tue, 28 Jul 2015 12:01:53 +0000 (14:01 +0200)
- rename WITH_EXTERNAL_AUDASPACE to WITH_SYSTEM_AUDASPACE.
- rename C/PYAUDASPACE to AUDASPACE_C/PY
- simplifying cmake defines and includes.
- fixing include paths and enabling WITH_SYSTEM_AUDASPACE for windows.
- fixing scons building.
- other minor build system fixes.

53 files changed:
CMakeLists.txt
SConstruct
build_files/cmake/Modules/FindAudaspace.cmake
build_files/cmake/macros.cmake
build_files/scons/config/darwin-config.py
build_files/scons/config/linux-config.py
build_files/scons/config/win32-mingw-config.py
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-mingw-config.py
build_files/scons/config/win64-vc-config.py
build_files/scons/tools/btools.py
intern/audaspace/CMakeLists.txt
intern/audaspace/SConscript
intern/audaspace/intern/AUD_PyInit.cpp
source/blender/blenkernel/BKE_sound.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/editors/sound/CMakeLists.txt
source/blender/editors/sound/SConscript
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_graph/CMakeLists.txt
source/blender/editors/space_graph/SConscript
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_sequencer/CMakeLists.txt
source/blender/editors/space_sequencer/SConscript
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_scene.c
source/blender/python/SConscript
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/SConscript
source/blender/windowmanager/intern/wm_playanim.c
source/creator/CMakeLists.txt
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/BlenderRoutines/SConscript
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Converter/SConscript
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_SoundActuator.h
source/gameengine/Ketsji/SConscript

index cac75d3..591942c 100644 (file)
@@ -247,8 +247,13 @@ option(WITH_HEADLESS      "Build without graphical support (renderfarm, server m
 mark_as_advanced(WITH_HEADLESS)
 
 option(WITH_AUDASPACE    "Build with blenders audio library (only disable if you know what you're doing!)" ON)
-option(WITH_EXTERNAL_AUDASPACE "Build with external audaspace library installed on the system (only enable if you know what you're doing!)" OFF)
+option(WITH_SYSTEM_AUDASPACE "Build with external audaspace library installed on the system (only enable if you know what you're doing!)" OFF)
 mark_as_advanced(WITH_AUDASPACE)
+mark_as_advanced(WITH_SYSTEM_AUDASPACE)
+
+if(NOT WITH_AUDASPACE)
+       set(WITH_SYSTEM_AUDASPACE OFF)
+endif()
 
 option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
 
@@ -707,6 +712,29 @@ if(HAVE_STDBOOL_H)
        add_definitions(-DHAVE_STDBOOL_H)
 endif()
 
+if(WITH_AUDASPACE)
+       if(WITH_SYSTEM_AUDASPACE)
+               add_definitions("-DAUD_DEVICE_H=<AUD_Device.h>")
+               add_definitions("-DAUD_SPECIAL_H=<AUD_Special.h>")
+               add_definitions("-DAUD_SOUND_H=<AUD_Sound.h>")
+               add_definitions("-DAUD_HANDLE_H=<AUD_Handle.h>")
+               add_definitions("-DAUD_SEQUENCE_H=<AUD_Sequence.h>")
+               add_definitions("-DAUD_TYPES_H=<AUD_Types.h>")
+               add_definitions("-DAUD_PYTHON_H=<python/PyAPI.h>")
+               set(AUDASPACE_DEFINITIONS -DWITH_AUDASPACE -DWITH_SYSTEM_AUDASPACE)
+       else()
+               add_definitions("-DAUD_DEVICE_H=<AUD_C-API.h>")
+               add_definitions("-DAUD_SPECIAL_H=<AUD_C-API.h>")
+               add_definitions("-DAUD_SOUND_H=<AUD_C-API.h>")
+               add_definitions("-DAUD_HANDLE_H=<AUD_C-API.h>")
+               add_definitions("-DAUD_SEQUENCE_H=<AUD_C-API.h>")
+               add_definitions("-DAUD_TYPES_H=<AUD_Space.h>")
+               set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
+               set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
+               set(AUDASPACE_DEFINITIONS -DWITH_AUDASPACE)
+       endif()
+endif()
+
 #-----------------------------------------------------------------------------
 # Check for valid directories
 # ... a partial checkout may cause this.
@@ -884,9 +912,9 @@ if(UNIX AND NOT APPLE)
        endif()
 
        # Audio IO
-       if(WITH_EXTERNAL_AUDASPACE)
+       if(WITH_SYSTEM_AUDASPACE)
                find_package_wrapper(Audaspace)
-               if(NOT AUDASPACE_FOUND OR NOT CAUDASPACE_FOUND)
+               if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND)
                        message(FATAL_ERROR "Audaspace external library not found!")
                endif()
        endif()
@@ -1550,6 +1578,16 @@ elseif(WIN32)
                        set(SDL_LIBPATH ${SDL}/lib)
                endif()
 
+               # Audio IO
+               if(WITH_SYSTEM_AUDASPACE)
+                       set(AUDASPACE_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
+                       set(AUDASPACE_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace.lib)
+                       set(AUDASPACE_C_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
+                       set(AUDASPACE_C_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-c.lib)
+                       set(AUDASPACE_PY_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
+                       set(AUDASPACE_PY_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-py.lib)
+               endif()
+
                # used in many places so include globally, like OpenGL
                blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
 
index f706645..ea3d840 100644 (file)
@@ -540,13 +540,25 @@ else:
     env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
 
 # TODO, make optional (as with CMake)
-env['CPPFLAGS'].append('-DWITH_AUDASPACE')
 env['CPPFLAGS'].append('-DWITH_AVI')
 env['CPPFLAGS'].append('-DWITH_OPENNL')
 
 if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
     env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
 
+# Audaspace
+
+if env['WITH_BF_AUDASPACE']:
+    env['BF_AUDASPACE_C_INC'] = '#intern/audaspace/intern'
+    env['BF_AUDASPACE_PY_INC'] = '#intern/audaspace/intern'
+    env['BF_AUDASPACE_DEF'] = ['WITH_AUDASPACE']
+    env['BF_AUDASPACE_DEF'].append('AUD_DEVICE_H="<AUD_C-API.h>"')
+    env['BF_AUDASPACE_DEF'].append('AUD_SPECIAL_H="<AUD_C-API.h>"')
+    env['BF_AUDASPACE_DEF'].append('AUD_SOUND_H="<AUD_C-API.h>"')
+    env['BF_AUDASPACE_DEF'].append('AUD_HANDLE_H="<AUD_C-API.h>"')
+    env['BF_AUDASPACE_DEF'].append('AUD_SEQUENCE_H="<AUD_C-API.h>"')
+    env['BF_AUDASPACE_DEF'].append('AUD_TYPES_H="<AUD_Space.h>"')
+
 # OpenGL
 
 if env['WITH_BF_GL_PROFILE_COMPAT']:
index 361c1bf..5d0c765 100644 (file)
@@ -4,12 +4,24 @@
 #  AUDASPACE_FOUND - system has audaspace
 #  AUDASPACE_INCLUDE_DIRS - the audaspace include directories
 #  AUDASPACE_LIBRARIES - link these to use audaspace
-#  CAUDASPACE_FOUND - system has audaspace's C binding
-#  CAUDASPACE_INCLUDE_DIRS - the audaspace's C binding include directories
-#  CAUDASPACE_LIBRARIES - link these to use audaspace's C binding
-#  PYAUDASPACE_FOUND - system has audaspace's python binding
-#  PYAUDASPACE_INCLUDE_DIRS - the audaspace's python binding include directories
-#  PYAUDASPACE_LIBRARIES - link these to use audaspace's python binding
+#  AUDASPACE_C_FOUND - system has audaspace's C binding
+#  AUDASPACE_C_INCLUDE_DIRS - the audaspace's C binding include directories
+#  AUDASPACE_C_LIBRARIES - link these to use audaspace's C binding
+#  AUDASPACE_PY_FOUND - system has audaspace's python binding
+#  AUDASPACE_PY_INCLUDE_DIRS - the audaspace's python binding include directories
+#  AUDASPACE_PY_LIBRARIES - link these to use audaspace's python binding
+
+IF(NOT AUDASPACE_ROOT_DIR AND NOT $ENV{AUDASPACE_ROOT_DIR} STREQUAL "")
+       SET(AUDASPACE_ROOT_DIR $ENV{AUDASPACE_ROOT_DIR})
+ENDIF()
+
+SET(_audaspace_SEARCH_DIRS
+       ${AUDASPACE_ROOT_DIR}
+       /usr/local
+       /sw # Fink
+       /opt/local # DarwinPorts
+       /opt/csw # Blastwave
+)
 
 # Use pkg-config to get hints about paths
 find_package(PkgConfig)
@@ -19,58 +31,77 @@ endif(PKG_CONFIG_FOUND)
 
 # Include dir
 find_path(AUDASPACE_INCLUDE_DIR
-       NAMES audaspace/ISound.h
+       NAMES ISound.h
+       HINTS ${_audaspace_SEARCH_DIRS}
        PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
 )
 
 # Library
 find_library(AUDASPACE_LIBRARY
        NAMES audaspace
+       HINTS ${_audaspace_SEARCH_DIRS}
        PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
 )
 
 # Include dir
-find_path(CAUDASPACE_INCLUDE_DIR
-       NAMES audaspace/AUD_Sound.h
+find_path(AUDASPACE_C_INCLUDE_DIR
+       NAMES AUD_Sound.h
+       HINTS ${_audaspace_SEARCH_DIRS}
        PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
 )
 
 # Library
-find_library(CAUDASPACE_LIBRARY
-       NAMES caudaspace
+find_library(AUDASPACE_C_LIBRARY
+       NAMES audaspace-c
+       HINTS ${_audaspace_SEARCH_DIRS}
        PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
 )
 
 # Include dir
-find_path(PYAUDASPACE_INCLUDE_DIR
-       NAMES audaspace/python/PyAPI.h
+find_path(AUDASPACE_PY_INCLUDE_DIR
+       NAMES python/PyAPI.h
+       HINTS ${_audaspace_SEARCH_DIRS}
        PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
 )
 
 # Library
-find_library(PYAUDASPACE_LIBRARY
-       NAMES pyaudaspace
+find_library(AUDASPACE_PY_LIBRARY
+       NAMES audaspace-py
+       HINTS ${_audaspace_SEARCH_DIRS}
        PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
 )
 
 find_package(PackageHandleStandardArgs)
 find_package_handle_standard_args(Audaspace  DEFAULT_MSG  AUDASPACE_LIBRARY AUDASPACE_INCLUDE_DIR)
-find_package_handle_standard_args(CAudaspace  DEFAULT_MSG  CAUDASPACE_LIBRARY CAUDASPACE_INCLUDE_DIR)
-find_package_handle_standard_args(PyAudaspace  DEFAULT_MSG  PYAUDASPACE_LIBRARY PYAUDASPACE_INCLUDE_DIR)
+find_package_handle_standard_args(Audaspace_C  DEFAULT_MSG  AUDASPACE_C_LIBRARY AUDASPACE_C_INCLUDE_DIR)
+find_package_handle_standard_args(Audaspace_Py  DEFAULT_MSG  AUDASPACE_PY_LIBRARY AUDASPACE_PY_INCLUDE_DIR)
 
 if(AUDASPACE_FOUND)
-  set(AUDASPACE_LIBRARIES ${AUDASPACE_LIBRARY})
-  set(AUDASPACE_INCLUDE_DIRS ${AUDASPACE_INCLUDE_DIR})
+       set(AUDASPACE_LIBRARIES ${AUDASPACE_LIBRARY})
+       set(AUDASPACE_INCLUDE_DIRS ${AUDASPACE_INCLUDE_DIR})
 endif(AUDASPACE_FOUND)
 
-if(CAUDASPACE_FOUND)
-  set(CAUDASPACE_LIBRARIES ${CAUDASPACE_LIBRARY})
-  set(CAUDASPACE_INCLUDE_DIRS ${CAUDASPACE_INCLUDE_DIR})
-endif(CAUDASPACE_FOUND)
+if(AUDASPACE_C_FOUND)
+       set(AUDASPACE_C_LIBRARIES ${AUDASPACE_C_LIBRARY})
+       set(AUDASPACE_C_INCLUDE_DIRS ${AUDASPACE_C_INCLUDE_DIR})
+endif(AUDASPACE_C_FOUND)
 
-if(PYAUDASPACE_FOUND)
-  set(PYAUDASPACE_LIBRARIES ${PYAUDASPACE_LIBRARY})
-  set(PYAUDASPACE_INCLUDE_DIRS ${PYAUDASPACE_INCLUDE_DIR})
-endif(PYAUDASPACE_FOUND)
+if(AUDASPACE_PY_FOUND)
+       set(AUDASPACE_PY_LIBRARIES ${AUDASPACE_PY_LIBRARY})
+       set(AUDASPACE_PY_INCLUDE_DIRS ${AUDASPACE_PY_INCLUDE_DIR})
+endif(AUDASPACE_PY_FOUND)
 
-mark_as_advanced(AUDASPACE_LIBRARY AUDASPACE_LIBRARIES AUDASPACE_INCLUDE_DIR AUDASPACE_INCLUDE_DIRS CAUDASPACE_LIBRARY CAUDASPACE_LIBRARIES CAUDASPACE_INCLUDE_DIR CAUDASPACE_INCLUDE_DIRS PYAUDASPACE_LIBRARY PYAUDASPACE_LIBRARIES PYAUDASPACE_INCLUDE_DIR PYAUDASPACE_INCLUDE_DIRS)
+mark_as_advanced(
+       AUDASPACE_LIBRARY
+       AUDASPACE_LIBRARIES
+       AUDASPACE_INCLUDE_DIR
+       AUDASPACE_INCLUDE_DIRS
+       AUDASPACE_C_LIBRARY
+       AUDASPACE_C_LIBRARIES
+       AUDASPACE_C_INCLUDE_DIR
+       AUDASPACE_C_INCLUDE_DIRS
+       AUDASPACE_PY_LIBRARY
+       AUDASPACE_PY_LIBRARIES
+       AUDASPACE_PY_INCLUDE_DIR
+       AUDASPACE_PY_INCLUDE_DIRS
+)
index de2109b..e7fc0ec 100644 (file)
@@ -343,8 +343,8 @@ function(setup_liblinks
        if(WITH_BULLET AND WITH_SYSTEM_BULLET)
                target_link_libraries(${target} ${BULLET_LIBRARIES})
        endif()
-       if(WITH_EXTERNAL_AUDASPACE)
-               target_link_libraries(${target} ${CAUDASPACE_LIBRARIES} ${PYAUDASPACE_LIBRARIES})
+       if(WITH_AUDASPACE AND WITH_SYSTEM_AUDASPACE)
+               target_link_libraries(${target} ${AUDASPACE_C_LIBRARIES} ${AUDASPACE_PY_LIBRARIES})
        endif()
        if(WITH_OPENAL)
                target_link_libraries(${target} ${OPENAL_LIBRARY})
index d3d4afa..0bf03a4 100644 (file)
@@ -52,6 +52,8 @@ BF_CXX = '/usr'
 WITH_BF_STATICCXX = False
 BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
 
+WITH_BF_AUDASPACE = True
+
 # we use simply jack framework
 WITH_BF_JACK = True
 BF_JACK = '/Library/Frameworks/Jackmp.framework'
index 3556c52..ff8ecf0 100644 (file)
@@ -26,6 +26,8 @@ BF_CXX = '/usr'
 WITH_BF_STATICCXX = False
 BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
 
+WITH_BF_AUDASPACE = True
+
 WITH_BF_JACK = False
 BF_JACK = '/usr'
 BF_JACK_INC = '${BF_JACK}/include/jack'
index 3a4dfce..552a1a5 100644 (file)
@@ -23,6 +23,8 @@ BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
 BF_FFMPEG_INC =  LIBDIR + '/ffmpeg/include'
 BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
 
+WITH_BF_AUDASPACE = True
+
 WITH_BF_JACK = False
 BF_JACK = LIBDIR + '/jack'
 BF_JACK_INC = '${BF_JACK}/include'
index b639621..94e6cf9 100644 (file)
@@ -42,6 +42,8 @@ BF_ICONV_INC = '${BF_ICONV}/include'
 BF_ICONV_LIB = 'iconv'
 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
 
+WITH_BF_AUDASPACE = True
+
 WITH_BF_JACK = False
 BF_JACK = LIBDIR + '/jack'
 BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
index 16d8591..87a9b5e 100644 (file)
@@ -22,6 +22,8 @@ BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
 BF_FFMPEG_INC =  LIBDIR + '/ffmpeg/include'
 BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
 
+WITH_BF_AUDASPACE = True
+
 WITH_BF_JACK = False
 BF_JACK = LIBDIR + '/jack'
 BF_JACK_INC = '${BF_JACK}/include'
index 7cb6e6a..c25b62a 100644 (file)
@@ -55,6 +55,8 @@ BF_SDL_INC = '${BF_SDL}/include'
 BF_SDL_LIB = 'SDL2.lib'
 BF_SDL_LIBPATH = '${BF_SDL}/lib'
 
+WITH_BF_AUDASPACE = True
+
 WITH_BF_JACK = False
 
 BF_PTHREADS = LIBDIR + '/pthreads'
index 931b557..0b85940 100644 (file)
@@ -107,6 +107,7 @@ def print_arguments(args, bc):
 def validate_arguments(args, bc):
     opts_list = [
             'WITH_BF_FREESTYLE', 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'WITH_BF_PYTHON_SECURITY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LIBPATH_ARCH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
+            'WITH_BF_AUDASPACE', 'BF_AUDASPACE_C_INC', 'BF_AUDASPACE_PY_INC', 'BF_AUDASPACE_DEF',
             'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
             'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', 'WITH_BF_SDL_DYNLOAD',
             'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH', 'WITH_BF_JACK_DYNLOAD',
@@ -298,6 +299,11 @@ def read_opts(env, cfg, args):
         ('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
         (BoolVariable('WITH_BF_STATICOPENAL', 'Staticly link to openal', False)),
 
+        (BoolVariable('WITH_BF_AUDASPACE', 'Build with audaspace if true', True)),
+        ('BF_AUDASPACE_C_INC', 'audaspace-c include path', ''),
+        ('BF_AUDASPACE_PY_INC', 'audaspace-py include path', ''),
+        ('BF_AUDASPACE_DEF', 'audaspace defines', ''),
+
         (BoolVariable('WITH_BF_SDL', 'Use SDL if true', False)),
         ('BF_SDL', 'SDL base path', ''),
         ('BF_SDL_INC', 'SDL include path', ''),
index 7c63351..7fecb1a 100644 (file)
 
 remove_extra_strict_flags()
 
-if(WITH_EXTERNAL_AUDASPACE)
+if(WITH_SYSTEM_AUDASPACE)
 
        set(INC
                .
        )
 
        set(INC_SYS
-               ${CAUDASPACE_INCLUDE_DIRS}
-               ${PYAUDASPACE_INCLUDE_DIRS}
+               ${AUDASPACE_C_INCLUDE_DIRS}
+               ${AUDASPACE_PY_INCLUDE_DIRS}
        )
 
        set(SRC
index cc33862..2975545 100644 (file)
 Import ('env')
 
 sources = env.Glob('intern/*.cpp') + env.Glob('FX/*.cpp')
+
+# AUD_PyInit is for external audaspace only
+sources.remove('intern/AUD_PyInit.cpp')
+
 incs = '. intern FX ' + env['BF_PTHREADS_INC'] + ' ' + env['BF_BOOST_INC']
 defs = []
 
index 5e89d88..4e27c31 100644 (file)
@@ -28,9 +28,9 @@
 
 #include "AUD_PyInit.h"
 
-#include <audaspace/AUD_Sound.h>
-#include <audaspace/python/PySound.h>
-#include <audaspace/python/PyAPI.h>
+#include <AUD_Sound.h>
+#include <python/PySound.h>
+#include <python/PyAPI.h>
 
 extern "C" {
 extern void *BKE_sound_get_factory(void *sound);
index cb71b93..fc543b8 100644 (file)
 
 #define SOUND_WAVE_SAMPLES_PER_SECOND 250
 
-#ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Device.h>
-#  endif
+#ifdef WITH_SYSTEM_AUDASPACE
+#  include AUD_DEVICE_H
 #endif
 
 struct bSound;
@@ -83,7 +81,7 @@ void BKE_sound_load(struct Main *main, struct bSound *sound);
 
 void BKE_sound_free(struct bSound *sound);
 
-#if defined(__AUD_C_API_H__) || defined(WITH_EXTERNAL_AUDASPACE)
+#if defined(__AUD_C_API_H__) || defined(WITH_SYSTEM_AUDASPACE)
 AUD_Device *BKE_sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume);
 #endif
 
index dd5fcaf..f0d6cfb 100644 (file)
@@ -311,17 +311,11 @@ if(WIN32)
 endif()
 
 if(WITH_AUDASPACE)
-       list(APPEND INC
-               ../../../intern/audaspace/intern
-       )
-       add_definitions(-DWITH_AUDASPACE)
+       add_definitions(${AUDASPACE_DEFINITIONS})
 
-       if(WITH_EXTERNAL_AUDASPACE)
-               add_definitions(-DWITH_EXTERNAL_AUDASPACE)
-               list(APPEND INC_SYS
-                       ${CAUDASPACE_INCLUDE_DIRS}
-               )
-       endif()
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+       )
 endif()
 
 if(WITH_BULLET)
index 5e6d402..20ac329 100644 (file)
@@ -48,7 +48,6 @@ incs = [
     env['BF_GLEW_INC'],
     '#/intern/ghost',
     '#/intern/glew-mx',
-    '#/intern/audaspace/intern',
     '#/intern/elbeem/extern',
     '#/intern/iksolver/extern',
     '#/intern/smoke/extern',
@@ -121,6 +120,10 @@ if env['WITH_BF_CINEON']:
 if env['WITH_BF_HDR']:
     defs.append('WITH_HDR')
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs += ' ' + env['BF_AUDASPACE_C_INC']
+
 if env['WITH_BF_JACK']:
     defs.append('WITH_JACK')
 
index 25629e7..037b44e 100644 (file)
 #include "BKE_library.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Special.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_SPECIAL_H
 #endif
 
 #include "RNA_access.h"
index b087d80..bd652b0 100644 (file)
 #include "BKE_sound.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Special.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_SPECIAL_H
 #endif
 
 static ImBuf *seq_render_strip_stack(const SeqRenderData *context, ListBase *seqbasep, float cfra, int chanshown);
index db92e0e..b81839f 100644 (file)
 #include "DNA_speaker_types.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Sound.h>
-#    include <audaspace/AUD_Sequence.h>
-#    include <audaspace/AUD_Handle.h>
-#    include <audaspace/AUD_Special.h>
-#    include "AUD_Set.h"
-#  else
-#    include "AUD_C-API.h"
+#  include AUD_SOUND_H
+#  include AUD_SEQUENCE_H
+#  include AUD_HANDLE_H
+#  include AUD_SPECIAL_H
+#  ifdef WITH_SYSTEM_AUDASPACE
+#    include "../../../intern/audaspace/intern/AUD_Set.h"
 #  endif
 #endif
 
@@ -845,7 +843,7 @@ float BKE_sound_get_length(bSound *sound)
 
 bool BKE_sound_is_jack_supported(void)
 {
-#ifdef WITH_EXTERNAL_AUDASPACE
+#ifdef WITH_SYSTEM_AUDASPACE
        return 1;
 #else
        return (bool)AUD_isJackSupported();
index eb07a2d..8969d66 100644 (file)
 #include "BLI_blenlib.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Device.h>
-#    include <audaspace/AUD_Special.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_DEVICE_H
+#  include AUD_SPECIAL_H
 #endif
 
 #include "BLI_utildefines.h"
index c3ef0f8..535cd57 100644 (file)
@@ -39,14 +39,11 @@ set(SRC
 )
 
 if(WITH_AUDASPACE)
-       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()
+       add_definitions(${AUDASPACE_DEFINITIONS})
+
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+       )
 endif()
 
 if(WITH_CODEC_FFMPEG)
index 33feedf..fad52c6 100644 (file)
@@ -31,7 +31,6 @@ sources = env.Glob('*.c')
 
 incs = [
     '#/intern/guardedalloc',
-    '#/intern/audaspace/intern',
     '../include',
     '../../blenkernel',
     '../../blenlib',
@@ -44,6 +43,10 @@ incs = ' '.join(incs)
 
 defs = []
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs += ' ' + env['BF_AUDASPACE_C_INC']
+
 if env['WITH_BF_FFMPEG']:
     defs.append('WITH_FFMPEG')
 
index 1fd48dd..c081539 100644 (file)
 #include "WM_types.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Special.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_SPECIAL_H
 #endif
 
 #include "ED_sound.h"
index b911f9e..b692f0b 100644 (file)
@@ -48,14 +48,11 @@ set(SRC
 )
 
 if(WITH_AUDASPACE)
-       add_definitions(-DWITH_AUDASPACE)
+       add_definitions(${AUDASPACE_DEFINITIONS})
 
-       if(WITH_EXTERNAL_AUDASPACE)
-               add_definitions(-DWITH_EXTERNAL_AUDASPACE)
-               list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS})
-       else()
-               list(APPEND INC ../../../../intern/audaspace/intern)
-       endif()
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+       )
 endif()
 
 if(WITH_INTERNATIONAL)
index 35e0974..ac23e8e 100644 (file)
@@ -33,7 +33,6 @@ incs = [
     '#/intern/guardedalloc',
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
-    '#/intern/audaspace/intern',
     '../include',
     '../../blenfont',
     '../../blenkernel',
@@ -47,6 +46,10 @@ incs = [
 
 defs = env['BF_GL_DEFINITIONS']
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs.append(env['BF_AUDASPACE_C_INC'])
+
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
 
index 1f2b02d..cc18df9 100644 (file)
 #include <float.h>
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Special.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_SPECIAL_H
 #endif
 
 #include "MEM_guardedalloc.h"
index ea12ee3..03d8101 100644 (file)
@@ -53,14 +53,11 @@ set(SRC
 )
 
 if(WITH_AUDASPACE)
-       add_definitions(-DWITH_AUDASPACE)
+       add_definitions(${AUDASPACE_DEFINITIONS})
 
-       if(WITH_EXTERNAL_AUDASPACE)
-               add_definitions(-DWITH_EXTERNAL_AUDASPACE)
-               list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS})
-       else()
-               list(APPEND INC ../../../../intern/audaspace/intern)
-       endif()
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+       )
 endif()
 
 if(WITH_INTERNATIONAL)
index 954f8ab..8ec1cdd 100644 (file)
@@ -33,7 +33,6 @@ incs = [
     '#/intern/guardedalloc',
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
-    '#/intern/audaspace/intern',
     '../include',
     '../../blenfont',
     '../../blenkernel',
@@ -47,6 +46,10 @@ incs = [
 
 defs = env['BF_GL_DEFINITIONS']
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs.append(env['BF_AUDASPACE_C_INC'])
+
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs.append(env['BF_PTHREADS_INC'])
 
index 7ffed70..2039358 100644 (file)
 #include "BKE_sound.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Sequence.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_SEQUENCE_H
 #endif
 
 /* own include */
index 52c01f6..4b05a0d 100644 (file)
@@ -40,7 +40,6 @@ incs = [
     '#/intern/memutil',
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
-    '#/intern/audaspace/intern',
     '#/intern/cycles/blender',
     '#/intern/smoke/extern',
     '../blenfont',
index 36e0a49..3ebce1a 100644 (file)
@@ -224,14 +224,11 @@ if(WITH_IMAGE_FRAMESERVER)
 endif()
 
 if(WITH_AUDASPACE)
-       add_definitions(-DWITH_AUDASPACE)
+       add_definitions(${AUDASPACE_DEFINITIONS})
 
-       if(WITH_EXTERNAL_AUDASPACE)
-               add_definitions(-DWITH_EXTERNAL_AUDASPACE)
-               list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS})
-       else()
-               list(APPEND INC ../../../../intern/audaspace/intern)
-       endif()
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+       )
 endif()
 
 if(WITH_CODEC_QUICKTIME)
@@ -332,7 +329,6 @@ blender_include_dirs(
        ../../windowmanager
        ../../editors/include
        ../../render/extern/include
-       ../../../../intern/audaspace/intern
        ../../../../intern/cycles/blender
        ../../../../intern/guardedalloc
        ../../../../intern/glew-mx
index 0e36a4c..0a9f9ee 100644 (file)
@@ -59,7 +59,6 @@ incs = [
     '#/intern/guardedalloc',
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
-    '#/intern/audaspace/intern',
     '#/intern/cycles/blender',
     '#/intern/smoke/extern',
     '../../blenfont',
@@ -110,6 +109,10 @@ if env['WITH_BF_HDR']:
 if env['WITH_BF_FRAMESERVER']:
     defs.append('WITH_FRAMESERVER')
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs += ' ' + env['BF_AUDASPACE_C_INC']
+
 if env['WITH_BF_FFMPEG']:
     defs.append('WITH_FFMPEG')
     incs += ' ' + env['BF_FFMPEG_INC'] + ' #/intern/ffmpeg'
index 9c4fcd9..db00f14 100644 (file)
 
 #ifdef WITH_QUICKTIME
 #  include "quicktime_export.h"
-#  ifdef WITH_AUDASPACE
-#    ifdef WITH_EXTERNAL_AUDASPACE
-#      include <audaspace/AUD_Types.h>
-#    else
-#      include "AUD_Space.h"
-#    endif
-#  endif
+#  include AUD_TYPES_H
 #endif
 
 #ifdef WITH_FFMPEG
index 5f032f2..7c51566 100644 (file)
@@ -35,7 +35,6 @@ incs = [
     '#/intern/memutil',
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
-    '#/intern/audaspace/intern',
     '#/intern/cycles/blender',
     '../blenfont',
     '../blenkernel',
index 4014d37..5328e62 100644 (file)
@@ -80,10 +80,11 @@ set(SRC
 )
 
 if(WITH_AUDASPACE)
-       list(APPEND INC
-               ../../../intern/audaspace/intern
+       add_definitions(${AUDASPACE_DEFINITIONS})
+
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
        )
-       add_definitions(-DWITH_AUDASPACE)
 endif()
 
 add_definitions(${GL_DEFINITIONS})
index 47eee41..e05bc13 100644 (file)
@@ -32,7 +32,6 @@ sources = env.Glob('intern/*.c')
 
 incs = [
     '.',
-    '#/intern/audaspace/intern',
     '#/intern/ghost',
     '#/intern/guardedalloc',
     '#/intern/memutil',
@@ -74,6 +73,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
     if env['WITH_BF_IME']:
         defs.append('WITH_INPUT_IME')
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs += ' ' + env['BF_AUDASPACE_C_INC']
+
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
 
index 3173e01..e63b466 100644 (file)
 #include "WM_api.h"  /* only for WM_main_playanim */
 
 #ifdef WITH_AUDASPACE
-#include "AUD_C-API.h"
+#  include AUD_DEVICE_H
+#  include AUD_HANDLE_H
+#  include AUD_SOUND_H
+#  include AUD_SPECIAL_H
 
 AUD_Sound *source = NULL;
 AUD_Handle *playback_handle = NULL;
@@ -1107,8 +1110,8 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
 
        AUD_initOnce();
 
-       if (!(audio_device = AUD_init("OpenAL", specs, AUD_DEFAULT_BUFFER_SIZE, "Blender")))
-               audio_device = AUD_init("Null", specs, AUD_DEFAULT_BUFFER_SIZE, "Blender");
+       if (!(audio_device = AUD_init("OpenAL", specs, 1024, "Blender")))
+               audio_device = AUD_init("Null", specs, 0, "Blender");
 
 #endif
 
index f0b6001..5930fd3 100644 (file)
@@ -794,6 +794,16 @@ elseif(WIN32)
                        DESTINATION "."
                )
        endif()
+       
+       if(WITH_SYSTEM_AUDASPACE)
+               install(
+                       FILES
+                               ${LIBDIR}/audaspace/lib/audaspace.dll
+                               ${LIBDIR}/audaspace/lib/audaspace-c.dll
+                               ${LIBDIR}/audaspace/lib/audaspace-py.dll
+                       DESTINATION "."
+               )
+       endif()
 
        if(NOT CMAKE_CL_64)
                install(
index 7dfefb0..dcdc546 100644 (file)
@@ -102,11 +102,7 @@ typedef void * wmUIHandlerRemoveFunc;
 }
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Device.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_DEVICE_H
 #endif
 
 static BlendFileData *load_game_data(char *filename)
index 324babf..aaeb2e1 100644 (file)
@@ -56,14 +56,11 @@ set(SRC
 add_definitions(${GL_DEFINITIONS})
 
 if(WITH_AUDASPACE)
-       add_definitions(-DWITH_AUDASPACE)
+       add_definitions(${AUDASPACE_DEFINITIONS})
 
-       if(WITH_EXTERNAL_AUDASPACE)
-               add_definitions(-DWITH_EXTERNAL_AUDASPACE)
-               list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS})
-       else()
-               list(APPEND INC ../../../intern/audaspace/intern)
-       endif()
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+       )
 endif()
 
 if(WITH_CODEC_FFMPEG)
index def0bc3..9bce7b7 100644 (file)
@@ -39,7 +39,6 @@ incs = [
     '#source/blender',
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
-    '#intern/audaspace/intern',
     '#intern/ghost/include',
     '#intern/moto/include',
     '#source/blender/blenfont',
@@ -67,6 +66,10 @@ incs = [
     ]
 incs = ' '.join(incs)
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs += ' ' + env['BF_AUDASPACE_C_INC']
+
 if env['WITH_BF_FFMPEG']:
     defs.append('WITH_FFMPEG')
 
index dba3f4d..4db9fce 100644 (file)
@@ -113,14 +113,11 @@ if(WITH_BULLET)
 endif()
 
 if(WITH_AUDASPACE)
-       add_definitions(-DWITH_AUDASPACE)
+       add_definitions(${AUDASPACE_DEFINITIONS})
 
-       if(WITH_EXTERNAL_AUDASPACE)
-               add_definitions(-DWITH_EXTERNAL_AUDASPACE)
-               list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS})
-       else()
-               list(APPEND INC ../../../intern/audaspace/intern)
-       endif()
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+       )
 endif()
 
 blender_add_lib(ge_converter "${SRC}" "${INC}" "${INC_SYS}")
index 65290ae..3b36e09 100644 (file)
 #include "KX_ConvertActuators.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Sound.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_SOUND_H
 #endif
 
 // Actuators
index affd4c9..6336fcd 100644 (file)
@@ -37,7 +37,6 @@ incs = [
     '#intern/guardedalloc',
     '#intern/string',
     '#source/blender',
-    '#intern/audaspace/intern',
     '#intern/moto/include',
     '#source/blender/blenkernel',
     '#source/blender/blenlib',
@@ -79,6 +78,10 @@ if env['WITH_BF_PYTHON']:
     incs += ' ' + env['BF_PYTHON_INC']
     defs.append('WITH_PYTHON')
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs += ' ' + env['BF_AUDASPACE_C_INC']
+
 if env['WITH_BF_CXX_GUARDEDALLOC']:
     defs.append('WITH_CXX_GUARDEDALLOC')
 
index 58e47bc..48938b1 100644 (file)
@@ -85,14 +85,11 @@ if(WITH_INTERNATIONAL)
 endif()
 
 if(WITH_AUDASPACE)
-       add_definitions(-DWITH_AUDASPACE)
+       add_definitions(${AUDASPACE_DEFINITIONS})
 
-       if(WITH_EXTERNAL_AUDASPACE)
-               add_definitions(-DWITH_EXTERNAL_AUDASPACE)
-               list(APPEND INC_SYS ${CAUDASPACE_INCLUDE_DIRS})
-       else()
-               list(APPEND INC ../../../../intern/audaspace/intern)
-       endif()
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+       )
 endif()
 
 if(WITH_SDL AND WITH_SDL_DYNLOAD)
index a0c3142..c3eb07d 100644 (file)
@@ -100,11 +100,7 @@ extern "C"
 #include "GHOST_Rect.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Device.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_DEVICE_H
 #endif
 
 static void frameTimerProc(GHOST_ITimerTask* task, GHOST_TUns64 time);
index 610abcd..c31bd0c 100644 (file)
@@ -44,7 +44,6 @@ incs = [
     '#intern/memutil',
     '#intern/moto/include',
     '#intern/container',
-    '#intern/audaspace/intern',
     '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
     '#source/gameengine/BlenderRoutines',
     '#source/gameengine/Converter',
@@ -81,6 +80,10 @@ if env['WITH_BF_PYTHON']:
     incs += Split(env['BF_PYTHON_INC'])
     defs.append('WITH_PYTHON')
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs.append(env['BF_AUDASPACE_C_INC'])
+
 if env['WITH_BF_FFMPEG']:
     defs.append('WITH_FFMPEG')
 
index f938994..2607e2b 100644 (file)
@@ -248,17 +248,12 @@ if(WITH_CODEC_FFMPEG)
 endif()
 
 if(WITH_AUDASPACE)
-       list(APPEND INC ../../../intern/audaspace/intern)
+       add_definitions(${AUDASPACE_DEFINITIONS})
 
-       add_definitions(-DWITH_AUDASPACE)
-
-       if(WITH_EXTERNAL_AUDASPACE)
-               add_definitions(-DWITH_EXTERNAL_AUDASPACE)
-               list(APPEND INC_SYS
-                       ${CAUDASPACE_INCLUDE_DIRS}
-                       ${PYAUDASPACE_INCLUDE_DIRS}
-               )
-       endif()
+       list(APPEND INC_SYS
+               ${AUDASPACE_C_INCLUDE_DIRS}
+               ${AUDASPACE_PY_INCLUDE_DIRS}
+       )
 endif()
 
 if(WITH_BULLET)
index 2eaacf4..4cb632e 100644 (file)
@@ -61,7 +61,7 @@ extern "C" {
 
        #  include "marshal.h" /* python header for loading/saving dicts */
 }
-#include "AUD_PyInit.h"
+#include "../../../../intern/audaspace/intern/AUD_PyInit.h"
 
 #endif  /* WITH_PYTHON */
 
index 8f225e4..14f0598 100644 (file)
 #include "KX_SoundActuator.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
+#  ifdef WITH_SYSTEM_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>
+#    include AUD_PYTHON_H
 #  endif
+#  include AUD_SOUND_H
+#  include AUD_SPECIAL_H
+#  include AUD_DEVICE_H
+#  include AUD_HANDLE_H
 #endif
 
 #include "KX_GameObject.h"
index 83d2214..5ec2fda 100644 (file)
 #include "SCA_IActuator.h"
 
 #ifdef WITH_AUDASPACE
-#  ifdef WITH_EXTERNAL_AUDASPACE
-#    include <audaspace/AUD_Sound.h>
-#    include <audaspace/AUD_Handle.h>
-#  else
-#    include "AUD_C-API.h"
-#  endif
+#  include AUD_SOUND_H
+#  include AUD_HANDLE_H
 #endif
 
 #include "BKE_sound.h"
index 8074a40..5b2807d 100644 (file)
@@ -40,8 +40,6 @@ incs = [
     '#source/blender',
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
-    '#intern/audaspace/FX',
-    '#intern/audaspace/intern',
     '#intern/moto/include',
     '#source/blender/blenfont',
     '#source/blender/blenkernel',
@@ -86,6 +84,11 @@ if env['WITH_BF_PYTHON']:
     incs += ' ' + env['BF_PYTHON_INC']
     defs.append('WITH_PYTHON')
 
+if env['WITH_BF_AUDASPACE']:
+    defs += env['BF_AUDASPACE_DEF']
+    incs += ' ' + env['BF_AUDASPACE_C_INC']
+    incs += ' ' + env['BF_AUDASPACE_PY_INC']
+
 if env['WITH_BF_FFMPEG']:
     defs.append('WITH_FFMPEG')