diff options
30 files changed, 278 insertions, 88 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ebf255f06a3..dc81a726f7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,6 +104,9 @@ option(WITH_BULLET "Enable Bullet (Physics Engine)" ON) option(WITH_GAMEENGINE "Enable Game Engine" ON) option(WITH_PLAYER "Build Player" OFF) +option(WITH_AUDASPACE "Build with blenders audio library" ON) +mark_as_advanced(WITH_AUDASPACE) + option(WITH_HEADLESS "Build without graphical support (renderfarm, server mode only)" OFF) mark_as_advanced(WITH_HEADLESS) @@ -200,6 +203,10 @@ if(NOT WITH_GAMEENGINE AND WITH_PLAYER) message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE") endif() +if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK)) + message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG require WITH_AUDASPACE") +endif() + if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE) message(FATAL_ERROR "WITH_IMAGE_REDCODE requires WITH_IMAGE_OPENJPEG") endif() @@ -789,7 +796,7 @@ elseif(WIN32) set(PYTHON_VERSION 3.2) set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}") # set(PYTHON_BINARY python) # not used yet - set(PYTHON_LIBRARIES python32mw) + set(PYTHON_LIBRARIES ${PYTHON}/lib/python32mw.lib) set(PYTHON_LIBPATH ${PYTHON}/lib) endif() diff --git a/SConstruct b/SConstruct index 2f63ddf0501..29146018704 100644 --- a/SConstruct +++ b/SConstruct @@ -306,6 +306,11 @@ if env['BF_NO_ELBEEM'] == 1: env['CXXFLAGS'].append('-DDISABLE_ELBEEM') env['CCFLAGS'].append('-DDISABLE_ELBEEM') +# TODO, make optional +env['CPPFLAGS'].append('-DWITH_AUDASPACE') +env['CXXFLAGS'].append('-DWITH_AUDASPACE') +env['CCFLAGS'].append('-DWITH_AUDASPACE') + # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir B.root_build_dir = env['BF_BUILDDIR'] B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc') diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt index 33bf9bb476c..4c36cb43e7d 100644 --- a/intern/CMakeLists.txt +++ b/intern/CMakeLists.txt @@ -24,7 +24,6 @@ # # ***** END GPL LICENSE BLOCK ***** -add_subdirectory(audaspace) add_subdirectory(string) add_subdirectory(ghost) add_subdirectory(guardedalloc) @@ -35,6 +34,10 @@ add_subdirectory(opennl) add_subdirectory(smoke) add_subdirectory(mikktspace) +if(WITH_AUDASPACE) + add_subdirectory(audaspace) +endif() + if(WITH_MOD_FLUID) add_subdirectory(elbeem) endif() diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 9c06e325ce2..a19d48daa75 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -43,8 +43,6 @@ set(INC ../nodes ../editors/include ../render/extern/include - ../../../intern/audaspace/intern - ../../../intern/ffmpeg ../../../intern/bsp/extern ../blenfont ../../../intern/decimation/extern ../../../intern/elbeem/extern @@ -237,6 +235,13 @@ set(SRC add_definitions(-DGLEW_STATIC) +if(WITH_AUDASPACE) + list(APPEND INC + ../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + if(WITH_BULLET) list(APPEND INC ../../../extern/bullet2/src) add_definitions(-DUSE_BULLET) @@ -278,6 +283,7 @@ if(WITH_CODEC_QUICKTIME) endif() if(WITH_CODEC_FFMPEG) + list(APPEND INC ../../../intern/ffmpeg) list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS}) add_definitions(-DWITH_FFMPEG) endif() diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 550b81e8a0f..8f7076c3374 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -73,7 +73,10 @@ #include "BKE_context.h" #include "BKE_sound.h" -#include "AUD_C-API.h" + +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif #ifdef WIN32 #define snprintf _snprintf @@ -697,6 +700,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range) } seq->strip->len = seq->len; case SEQ_SOUND: +#ifdef WITH_AUDASPACE if(!seq->sound) return; seq->len = ceil(AUD_getInfo(seq->sound->playback_handle).length * FPS); @@ -706,6 +710,9 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range) seq->len = 0; } seq->strip->len = seq->len; +#else + return; +#endif break; case SEQ_SCENE: { @@ -3494,6 +3501,7 @@ Sequence *sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo return seq; } +#ifdef WITH_AUDASPACE Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { Scene *scene= CTX_data_scene(C); /* only for sound */ @@ -3551,6 +3559,15 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo return seq; } +#else // WITH_AUDASPACE +Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) +{ + (void)C; + (void)seqbasep; + (void)seq_load; + return NULL; +} +#endif // WITH_AUDASPACE Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 9b86b8752db..eb8703877ba 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -21,7 +21,9 @@ #include "DNA_screen_types.h" #include "DNA_sound_types.h" -#include "AUD_C-API.h" +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif #include "BKE_utildefines.h" #include "BKE_global.h" @@ -36,6 +38,66 @@ static int force_device = -1; + +struct bSound* sound_new_file(struct Main *bmain, const char *filename) +{ + bSound* sound = NULL; + + char str[FILE_MAX]; + char *path; + + int len; + + strcpy(str, filename); + + path = /*bmain ? bmain->name :*/ G.main->name; + + BLI_path_abs(str, path); + + len = strlen(filename); + while(len > 0 && filename[len-1] != '/' && filename[len-1] != '\\') + len--; + + sound = alloc_libblock(&bmain->sound, ID_SO, filename+len); + BLI_strncpy(sound->name, filename, FILE_MAX); +// XXX unused currently sound->type = SOUND_TYPE_FILE; + + sound_load(bmain, sound); + + if(!sound->playback_handle) + { + free_libblock(&bmain->sound, sound); + sound = NULL; + } + + return sound; +} + +void sound_free(struct bSound* sound) +{ + if (sound->packedfile) + { + freePackedFile(sound->packedfile); + sound->packedfile = NULL; + } + +#ifdef WITH_AUDASPACE + if(sound->handle) + { + AUD_unload(sound->handle); + sound->handle = NULL; + sound->playback_handle = NULL; + } + + if(sound->cache) + { + AUD_unload(sound->cache); + } +#endif // WITH_AUDASPACE +} + +#ifdef WITH_AUDASPACE + #ifdef WITH_JACK static void sound_sync_callback(void* data, int mode, float time) { @@ -124,40 +186,6 @@ void sound_exit(void) AUD_exit(); } -struct bSound* sound_new_file(struct Main *bmain, const char *filename) -{ - bSound* sound = NULL; - - char str[FILE_MAX]; - char *path; - - int len; - - strcpy(str, filename); - - path = /*bmain ? bmain->name :*/ G.main->name; - - BLI_path_abs(str, path); - - len = strlen(filename); - while(len > 0 && filename[len-1] != '/' && filename[len-1] != '\\') - len--; - - sound = alloc_libblock(&bmain->sound, ID_SO, filename+len); - BLI_strncpy(sound->name, filename, FILE_MAX); -// XXX unused currently sound->type = SOUND_TYPE_FILE; - - sound_load(bmain, sound); - - if(!sound->playback_handle) - { - free_libblock(&bmain->sound, sound); - sound = NULL; - } - - return sound; -} - // XXX unused currently #if 0 struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source) @@ -302,27 +330,6 @@ void sound_load(struct Main *bmain, struct bSound* sound) } } -void sound_free(struct bSound* sound) -{ - if (sound->packedfile) - { - freePackedFile(sound->packedfile); - sound->packedfile = NULL; - } - - if(sound->handle) - { - AUD_unload(sound->handle); - sound->handle = NULL; - sound->playback_handle = NULL; - } - - if(sound->cache) - { - AUD_unload(sound->cache); - } -} - static float sound_get_volume(Scene* scene, Sequence* sequence, float time) { AnimData *adt= BKE_animdata_from_id(&scene->id); @@ -547,3 +554,34 @@ void* sound_get_factory(void* sound) { return ((struct bSound*) sound)->playback_handle; } + +#else // WITH_AUDASPACE + +#include "BLI_utildefines.h" + +int sound_define_from_str(const char *UNUSED(str)) { return -1;} +void sound_force_device(int UNUSED(device)) {} +void sound_init_once(void) {} +void sound_init(struct Main *UNUSED(bmain)) {} +void sound_exit(void) {} +void sound_cache(struct bSound* UNUSED(sound), int UNUSED(ignore)) { } +void sound_delete_cache(struct bSound* UNUSED(sound)) {} +void sound_load(struct Main *UNUSED(bmain), struct bSound* UNUSED(sound)) {} +void sound_create_scene(struct Scene *UNUSED(scene)) {} +void sound_destroy_scene(struct Scene *UNUSED(scene)) {} +void sound_mute_scene(struct Scene *UNUSED(scene), int UNUSED(muted)) {} +void* sound_scene_add_scene_sound(struct Scene *UNUSED(scene), struct Sequence* UNUSED(sequence), int UNUSED(startframe), int UNUSED(endframe), int UNUSED(frameskip)) { return NULL; } +void* sound_add_scene_sound(struct Scene *UNUSED(scene), struct Sequence* UNUSED(sequence), int UNUSED(startframe), int UNUSED(endframe), int UNUSED(frameskip)) { return NULL; } +void sound_remove_scene_sound(struct Scene *UNUSED(scene), void* UNUSED(handle)) {} +void sound_mute_scene_sound(struct Scene *UNUSED(scene), void* UNUSED(handle), char UNUSED(mute)) {} +void sound_move_scene_sound(struct Scene *UNUSED(scene), void* UNUSED(handle), int UNUSED(startframe), int UNUSED(endframe), int UNUSED(frameskip)) {} +static void sound_start_play_scene(struct Scene *UNUSED(scene)) {} +void sound_play_scene(struct Scene *UNUSED(scene)) {} +void sound_stop_scene(struct Scene *UNUSED(scene)) {} +void sound_seek_scene(struct bContext *UNUSED(C)) {} +float sound_sync_scene(struct Scene *UNUSED(scene)) { return 0.0f; } +int sound_scene_playing(struct Scene *UNUSED(scene)) { return 0; } +int sound_read_sound_buffer(struct bSound* UNUSED(sound), float* UNUSED(buffer), int UNUSED(length), float UNUSED(start), float UNUSED(end)) { return 0; } +int sound_get_channels(struct bSound* UNUSED(sound)) { return 1; } + +#endif // WITH_AUDASPACE diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 0ce57a57fe7..ae4387c12f9 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -49,7 +49,9 @@ #include "BLI_blenlib.h" -#include "AUD_C-API.h" /* must be before BKE_sound.h for define */ +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif #include "BKE_global.h" #include "BKE_idprop.h" @@ -89,7 +91,9 @@ static uint8_t* audio_output_buffer = 0; static int audio_outbuf_size = 0; static double audio_time = 0.0f; +#ifdef WITH_AUDASPACE static AUD_Device* audio_mixdown_device = 0; +#endif #define FFMPEG_AUTOSPLIT_SIZE 2000000000 @@ -103,6 +107,7 @@ static void delete_picture(AVFrame* f) } } +#ifdef WITH_AUDASPACE static int write_audio_frame(void) { AVCodecContext* c = NULL; @@ -145,6 +150,7 @@ static int write_audio_frame(void) } return 0; } +#endif // #ifdef WITH_AUDASPACE /* Allocate a temporary frame */ static AVFrame* alloc_picture(int pix_fmt, int width, int height) @@ -850,7 +856,7 @@ int start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty, Repo ffmpeg_autosplit_count = 0; success = start_ffmpeg_impl(rd, rectx, recty, reports); - +#ifdef WITH_AUDASPACE if(audio_stream) { AVCodecContext* c = audio_stream->codec; @@ -864,12 +870,13 @@ int start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty, Repo c->time_base.num = 1; #endif } - +#endif return success; } void end_ffmpeg(void); +#ifdef WITH_AUDASPACE static void write_audio_frames(double to_pts) { int finished = 0; @@ -881,6 +888,7 @@ static void write_audio_frames(double to_pts) } } } +#endif int append_ffmpeg(RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports) { @@ -908,8 +916,9 @@ int append_ffmpeg(RenderData *rd, int frame, int *pixels, int rectx, int recty, } } +#ifdef WITH_AUDASPACE write_audio_frames((frame - rd->sfra) / (((double)rd->frs_sec) / rd->frs_sec_base)); - +#endif return success; } @@ -923,12 +932,14 @@ void end_ffmpeg(void) write_audio_frames(); }*/ +#ifdef WITH_AUDASPACE if(audio_mixdown_device) { AUD_closeReadDevice(audio_mixdown_device); audio_mixdown_device = 0; } - +#endif + if (video_stream && video_stream->codec) { fprintf(stderr, "Flushing delayed frames...\n"); flush_ffmpeg (); diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt index 6a99971a5af..55af283b5de 100644 --- a/source/blender/editors/sound/CMakeLists.txt +++ b/source/blender/editors/sound/CMakeLists.txt @@ -28,7 +28,6 @@ set(INC ../../makesrna ../../windowmanager ../../../../intern/guardedalloc - ../../../../intern/audaspace/intern ) set(INC_SYS @@ -41,4 +40,11 @@ set(SRC sound_intern.h ) +if(WITH_AUDASPACE) + list(APPEND INC + ../../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + blender_add_lib(bf_editor_sound "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 3716baad474..b7e8fee922b 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -64,7 +64,9 @@ #include "WM_api.h" #include "WM_types.h" -#include "AUD_C-API.h" +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif #include "ED_sound.h" #include "ED_util.h" @@ -81,6 +83,7 @@ static void open_init(bContext *C, wmOperator *op) uiIDContextProperty(C, &pprop->ptr, &pprop->prop); } +#ifdef WITH_AUDASPACE static int open_exec(bContext *C, wmOperator *op) { char path[FILE_MAX]; @@ -131,6 +134,17 @@ static int open_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +#else //WITH_AUDASPACE + +static int open_exec(bContext *UNUSED(C), wmOperator *op) +{ + BKE_report(op->reports, RPT_ERROR, "Compiled without sound support"); + + return OPERATOR_CANCELLED; +} + +#endif + static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) { if(!RNA_property_is_set(op->ptr, "relative_path")) diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt index f5548097db2..b7cde90546c 100644 --- a/source/blender/editors/space_graph/CMakeLists.txt +++ b/source/blender/editors/space_graph/CMakeLists.txt @@ -28,7 +28,6 @@ set(INC ../../makesrna ../../windowmanager ../../../../intern/guardedalloc - ../../../../intern/audaspace/intern ) set(INC_SYS @@ -47,4 +46,11 @@ set(SRC graph_intern.h ) +if(WITH_AUDASPACE) + list(APPEND INC + ../../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + blender_add_lib(bf_editor_space_graph "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 6ae6ecf88fc..4abf00f82d3 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -37,7 +37,9 @@ #include <string.h> #include <float.h> -#include "AUD_C-API.h" +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif #include "MEM_guardedalloc.h" @@ -1079,6 +1081,7 @@ static float fcurve_samplingcb_sound (FCurve *UNUSED(fcu), void *data, float eva /* ------------------- */ +#ifdef WITH_AUDASPACE static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op) { bAnimContext ac; @@ -1149,6 +1152,17 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +#else //WITH_AUDASPACE + +static int graphkeys_sound_bake_exec(bContext *UNUSED(C), wmOperator *op) +{ + BKE_report(op->reports, RPT_ERROR, "Compiled without sound support"); + + return OPERATOR_CANCELLED; +} + +#endif //WITH_AUDASPACE + static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *event) { bAnimContext ac; diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt index d5f36719471..71a4cfca868 100644 --- a/source/blender/editors/space_sequencer/CMakeLists.txt +++ b/source/blender/editors/space_sequencer/CMakeLists.txt @@ -29,7 +29,6 @@ set(INC ../../makesrna ../../windowmanager ../../../../intern/guardedalloc - ../../../../intern/audaspace/intern ) set(INC_SYS @@ -49,4 +48,11 @@ set(SRC sequencer_intern.h ) +if(WITH_AUDASPACE) + list(APPEND INC + ../../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + blender_add_lib(bf_editor_space_sequencer "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 067d63b3b6c..f6e3dc3dd0a 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -70,7 +70,10 @@ #include "UI_view2d.h" #include "BKE_sound.h" -#include "AUD_C-API.h" + +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif /* own include */ #include "sequencer_intern.h" diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt index 14679b37d1e..c9a8f62a197 100644 --- a/source/blender/imbuf/CMakeLists.txt +++ b/source/blender/imbuf/CMakeLists.txt @@ -38,7 +38,6 @@ set(INC ../makesdna ../../../intern/memutil ../../../intern/guardedalloc - ../../../intern/ffmpeg ) set(INC_SYS @@ -135,6 +134,7 @@ if(WITH_CODEC_QUICKTIME) endif() if(WITH_CODEC_FFMPEG) + list(APPEND INC ../../../intern/ffmpeg) list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS}) add_definitions(-DWITH_FFMPEG) endif() diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index ed5a1566cdc..1db29855c18 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -171,6 +171,10 @@ if(WITH_IMAGE_HDR) add_definitions(-DWITH_HDR) endif() +if(WITH_AUDASPACE) + add_definitions(-DWITH_AUDASPACE) +endif() + if(WITH_CODEC_QUICKTIME) list(APPEND INC ../../quicktime) add_definitions(-DWITH_QUICKTIME) diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 2c62316780d..7da538e171b 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -791,17 +791,18 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr } else { rna_print_data_get(f, dp); - rna_clamp_value_range(f, prop); if(prop->flag & PROP_DYNAMIC) { char *lenfunc= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set_length"); fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n"); fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc); + rna_clamp_value_range(f, prop); fprintf(f, " for(i=0; i<len; i++) {\n"); MEM_freeN(lenfunc); } else { fprintf(f, " int i;\n\n"); + rna_clamp_value_range(f, prop); fprintf(f, " for(i=0; i<%d; i++) {\n", prop->totarraylength); } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index a8d8d875ec4..cf5b38aeb3a 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -45,7 +45,9 @@ #ifdef WITH_QUICKTIME #include "quicktime_export.h" -#include "AUD_C-API.h" +# ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +# endif #endif #ifdef WITH_FFMPEG diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index 03df9f9cb6c..4e2d9642bc3 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -33,7 +33,6 @@ set(INC ../../windowmanager ../../editors/include ../../../../intern/guardedalloc - ../../../../intern/audaspace/intern ) set(INC_SYS @@ -86,4 +85,11 @@ if(WITH_PYTHON_SAFETY) add_definitions(-DWITH_PYTHON_SAFETY) endif() +if(WITH_AUDASPACE) + list(APPEND INC + ../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index cb11b53c83c..fb4c285a458 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -60,8 +60,6 @@ #include "../generic/blf_py_api.h" #include "../generic/IDProp.h" -#include "AUD_PyInit.h" - PyObject *bpy_package_py= NULL; PyDoc_STRVAR(bpy_script_paths_doc, diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 0001c1c74b9..51bf02ad37f 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -179,7 +179,9 @@ static struct _inittab bpy_internal_modules[]= { // {(char *)"mathutils.geometry", BPyInit_mathutils_geometry}, {(char *)"bgl", BPyInit_bgl}, {(char *)"blf", BPyInit_blf}, +#ifdef WITH_AUDASPACE {(char *)"aud", AUD_initPython}, +#endif {NULL, NULL} }; diff --git a/source/blender/quicktime/CMakeLists.txt b/source/blender/quicktime/CMakeLists.txt index 0ed773ddd93..6ce4954f053 100644 --- a/source/blender/quicktime/CMakeLists.txt +++ b/source/blender/quicktime/CMakeLists.txt @@ -38,7 +38,6 @@ set(INC ../render/extern/include ../include ../windowmanager - ../../../intern/audaspace/intern ../../../intern/guardedalloc ) @@ -66,4 +65,11 @@ endif() add_definitions(-DWITH_QUICKTIME) +if(WITH_AUDASPACE) + list(APPEND INC + ../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + blender_add_lib(bf_quicktime "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m index add280c6b64..c1b8688e1d7 100644 --- a/source/blender/quicktime/apple/qtkit_export.m +++ b/source/blender/quicktime/apple/qtkit_export.m @@ -38,7 +38,9 @@ #include "DNA_scene_types.h" #include "DNA_userdef_types.h" -#include "AUD_C-API.h" +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif #include "BKE_global.h" #include "BKE_main.h" diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 1eeb7c0f94b..a3ea85b605c 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -95,7 +95,9 @@ extern float BKE_screen_view3d_zoom_to_fac(float camzoom); #include "BKE_ipo.h" /***/ -#include "AUD_C-API.h" +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif //XXX #include "BSE_headerbuttons.h" #include "BKE_context.h" diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt index a67e2eb7038..28f567cc3cd 100644 --- a/source/gameengine/BlenderRoutines/CMakeLists.txt +++ b/source/gameengine/BlenderRoutines/CMakeLists.txt @@ -4,7 +4,6 @@ set(INC ../../../intern/string ../../../intern/container ../../../intern/guardedalloc - ../../../intern/audaspace/intern ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer ../../../source/gameengine/Converter ../../../source/blender/imbuf @@ -59,6 +58,13 @@ set(SRC add_definitions(-DGLEW_STATIC) +if(WITH_AUDASPACE) + list(APPEND INC + ../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + if(WITH_CODEC_FFMPEG) add_definitions(-DWITH_FFMPEG) endif() diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt index 6cfd8c9b42b..c905b8634a0 100644 --- a/source/gameengine/Converter/CMakeLists.txt +++ b/source/gameengine/Converter/CMakeLists.txt @@ -30,7 +30,6 @@ set(INC ../../../intern/guardedalloc ../../../intern/container ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer - ../../../intern/audaspace/intern ../../../source/gameengine/Converter ../../../source/gameengine/BlenderRoutines ../../../source/blender/imbuf @@ -113,4 +112,11 @@ if(WITH_BULLET) add_definitions(-DUSE_BULLET) endif() +if(WITH_AUDASPACE) + list(APPEND INC + ../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +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 c7b873de5e4..e952fb2687f 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -43,7 +43,11 @@ #include "KX_BlenderSceneConverter.h" #include "KX_ConvertActuators.h" -#include "AUD_C-API.h" + +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif + // Actuators //SCA logiclibrary native logicbricks #include "SCA_PropertyActuator.h" diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt index 6fe793bd475..ecb73cb0ae9 100644 --- a/source/gameengine/Ketsji/CMakeLists.txt +++ b/source/gameengine/Ketsji/CMakeLists.txt @@ -51,7 +51,6 @@ set(INC ../../../source/gameengine/SceneGraph ../../../source/gameengine/Physics/common ../../../source/gameengine/Network/LoopBackNetwork - ../../../intern/audaspace/intern ../../../source/blender/blenloader ../../../source/blender/gpu ) @@ -224,6 +223,13 @@ if(WITH_CODEC_FFMPEG) add_definitions(-DWITH_FFMPEG) endif() +if(WITH_AUDASPACE) + list(APPEND INC + ../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + if(WITH_BULLET) list(APPEND INC ../../../extern/bullet2/src diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 1b35219a36d..ea0b00e52fd 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -68,7 +68,9 @@ #include "KX_PyConstraintBinding.h" #include "PHY_IPhysicsEnvironment.h" -#include "AUD_C-API.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 6f8bb4bf087..0e7b00aeb24 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -36,7 +36,11 @@ #include "KX_SoundActuator.h" -#include "AUD_C-API.h" + +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif + #include "KX_GameObject.h" #include "KX_PyMath.h" // needed for PyObjectFrom() #include <iostream> diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h index 9f145a71546..395064b66be 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.h +++ b/source/gameengine/Ketsji/KX_SoundActuator.h @@ -36,7 +36,10 @@ #include "SCA_IActuator.h" -#include "AUD_C-API.h" +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif + #include "BKE_sound.h" typedef struct KX_3DSoundSettings |