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 cac75d339b68a42e8f1c9e18182cfaddd881a7d1..591942cc8fec33792221c7e3d6fb794f1acd63b2 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 f706645896b3330835602d9a22c9c4b312740da5..ea3d840aaedc3850c2e3c1ba6eb618ab4b9bcf7b 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 361c1bf3ba48ff0c8474a2a8f132989124f6f1ca..5d0c76515930ad573cab3fc1c1c0ea1b1146ad4f 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 de2109b5a6e6723b848d5dd6e9cd9ed99eb98c04..e7fc0ec0a6e89f84dc4e23aa217a9ba9c208f116 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 d3d4afaa6ab9041d367ea53f5d28c1468005171e..0bf03a46bd29f2db1e558d6e6c39595cd14b7f55 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 3556c52021a2bd18c9f91a81c1a71abd429c162d..ff8ecf0aa72bcbb4b5a8fb9722ca56d97fb804d0 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 3a4dfcef4c95749f255560d375ab7a59b030c2dc..552a1a5cec3946c14dab4221b8737e312971dd8e 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 b639621c7d75439eca84d9bb3908e90c6138499e..94e6cf9c8c4f3c37685b44d8132fe4af06ec05ff 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 16d859194dbf996a091a3ce5721d578dd4f75805..87a9b5e4eac3c9b64d8de7f4a7196d9a5bd5d3ce 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 7cb6e6a471d32123b66ddbb177a264a96f41657f..c25b62a756ad383a5e30d7ae58d6e2317bf87076 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 931b557c248de240fc5e22b02af5b0c85f77a6f4..0b85940d02415133c14d281cf8272031a2aa6e7d 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 7c6335166ecaf5e7c86ac83be588dd3426a61669..7fecb1a48a77657fe5c8273c75fc4e251bda2b29 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 cc338629c853cfeaf9ea26c5aa18bd88d972794e..2975545f2b627599b0acd3ce533a7dd19eb0fd10 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 5e89d88c68f0893bf365b7361d91da603900f439..4e27c31b8382338581187e6e62a0b5af1294efc4 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 cb71b939dc5a12cb5c3a380a89f4fd5ae9f1f366..fc543b887e41e94c114c0e58a482586d7ce62539 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 dd5fcafd9645e8d38aab58d49cf7d8c234f80c6c..f0d6cfb7e1ca1baa3cc4c994ffc8a1e8eed59bab 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 5e6d402115b7af4ff9775cdcfaa1b81a9e559fbc..20ac329f2cfcb35a8c5bcf3b5407488b34fe785f 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 25629e7db948d64ba4f265e91b2df3d6eeeaa5d3..037b44e0d8ca913fc13220dd432e6e8498529c7f 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 b087d809e8285506d1b3702f60367e6a6a69398a..bd652b02da2cffceaa31302a52e2aaa8cc2cf4dd 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 db92e0ed3c9f4ec5e175a0a8d4d9d8029d81c755..b81839f80fbae9f3bfe4fa5f5beb73e017a721fa 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 eb07a2d370b4c784989248623e06f30872c716db..8969d6694ff6fd68df68583ce1cb06f09c684017 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 c3ef0f8851fd2170c467d44650493c6cf0050573..535cd579030d25403946734cd214bc88f016ba1e 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 33feedf51cc748403a035282bf8c424c2d4d3b5f..fad52c64df1837bd4b05f3339aae10e65e967c0e 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 1fd48dd7e00b7761272dd2eb98b899133c68a654..c081539df411f506300bdc38e262b43b6f80e9cf 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 b911f9effbedc27c2552adeab7a7a3abdab03373..b692f0b1c12c6e52fbb9a398bad16c2e4d0b0290 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 35e09749743d624f02a93a332432a897a7007609..ac23e8ee4e7ef3e171fb15867164db17e8a2b2d8 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 1f2b02dcf3136afb17f63366a5644785d27ae465..cc18df92cb1fdef1a1af88ead90c55489bacc670 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 ea12ee3b7513d238520f57f3203f0e6c21ff3e8a..03d810199971e105545753efb77ea6133fe62ad6 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 954f8abff697c3002b80683f07ba6e0ae1c00e13..8ec1cddce10edce9c3d69e3203d2b09084af5adf 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 7ffed70d7b88cf978023b3a1bddb593294e21329..2039358b772cabecc095f9df608e8a16030e98ad 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 52c01f6d476fd4209d5ef31f1a8ef535e4f2b673..4b05a0db358b607787e9b87997b379324d6140ea 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 36e0a49c01d5086f0e731b38316c0fe229f0654c..3ebce1a7af0af7221038807079f757d0194d530d 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 0e36a4c9712552c671a5739e92d236eeff63877b..0a9f9eec08cef82783fee6f6e155ac9486c3feb8 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 9c4fcd927c8438853699ddfec673ae45d51390e2..db00f14975808112b774604a845aaa1c55259dab 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 5f032f25cf32834e76e66310aa320f9493b8e8d0..7c5156605fcb8a27547d4ad47680dce9de837637 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 4014d370eb8cae3021e96b160201c943b821d0cc..5328e62367b0f085c868114fb88218d2d95a682b 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 47eee41cf16b10811bf1e8d93a18dac41ee051e7..e05bc130c206caa68be6a9a3a1d81f5d0017ce5b 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 3173e0180fade8d2bb23bcbfeae0b1f8eb3e5eed..e63b4661870934401f22ceb40648118182582e09 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 f0b6001cca1acaa68e21741f322016929c93fb9d..5930fd36988e27b308688d9977c00318537ea61f 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 7dfefb071848f8a5ecc8c2363b548ddd0af76bd7..dcdc5463b04aa3505ebd5a429417e6f777c68e36 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 324babf9fa988857fd035791d968b20b75240ca8..aaeb2e10462632a743fb2f7827cbeb8154b713d7 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 def0bc326975777f69c901d0175bef88ac5ead46..9bce7b78bf4db32112758323fc0381554b681779 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 dba3f4da050bbd326b5ccf874c6c365bf9bc4de0..4db9fcebd06acc6b75a9320a687bcde118c89a4f 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 65290ae4f2c70621d8f6d0e0c112fcff8d5c1d13..3b36e094a75745823ef1c973c7a56784feabfa8e 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 affd4c94ed85a4e10e2ebd64a41c5cf4d634c599..6336fcd39062e9b868bd9d86a8495db3c69319a8 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 58e47bc4440af54a4844198d9b6be1261ec1b6a6..48938b11cb92f55e15549c585db06b27d2bb634c 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 a0c314230f59e3bb73487569cea6d233179ba823..c3eb07d18a17d71c111da621a07aadaa43c8c411 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 610abcd035736942d83cb318645ccccb1c9b3411..c31bd0c2f0805feac187a204c9bc03af7d371ed4 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 f938994f86a91e8685f0d8098cb7d27ef01e1d45..2607e2bb4b7c123e1b916b0597ade42e86c8cf90 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 2eaacf43041a9e098254e30b1d9e5d275069fb9a..4cb632ed73939bb7471c3608d21b237c64c51f31 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 8f225e4d93ba96da45429628e311070bbce1ecf8..14f0598d08880720b9b6c59dabb9e6b63a22ba7e 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 83d22142bda64f4c02b1d7bd70df55168125f2b9..5ec2fda722ff9f5063e32a3c49f17a95f645519f 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 8074a4064ff77fc3c31217ae29db56f54e5c16be..5b2807d8172b7dea42186f006deca4aec766bb4c 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')