[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37758] branches/soc-2011-pepper: Merge with trunk r37757.

Joerg Mueller nexyon at gmail.com
Thu Jun 23 19:30:56 CEST 2011


Revision: 37758
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37758
Author:   nexyon
Date:     2011-06-23 17:30:56 +0000 (Thu, 23 Jun 2011)
Log Message:
-----------
Merge with trunk r37757.

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37757

Modified Paths:
--------------
    branches/soc-2011-pepper/CMakeLists.txt
    branches/soc-2011-pepper/SConstruct
    branches/soc-2011-pepper/intern/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/blenkernel/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/writeffmpeg.c
    branches/soc-2011-pepper/source/blender/editors/sound/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/editors/sound/sound_ops.c
    branches/soc-2011-pepper/source/blender/editors/space_graph/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/editors/space_graph/graph_edit.c
    branches/soc-2011-pepper/source/blender/editors/space_sequencer/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/editors/space_sequencer/sequencer_add.c
    branches/soc-2011-pepper/source/blender/imbuf/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/makesrna/intern/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/makesrna/intern/makesrna.c
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-pepper/source/blender/python/intern/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/python/intern/bpy.c
    branches/soc-2011-pepper/source/blender/python/intern/bpy_interface.c
    branches/soc-2011-pepper/source/blender/quicktime/CMakeLists.txt
    branches/soc-2011-pepper/source/blender/quicktime/apple/qtkit_export.m
    branches/soc-2011-pepper/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/soc-2011-pepper/source/gameengine/BlenderRoutines/CMakeLists.txt
    branches/soc-2011-pepper/source/gameengine/Converter/CMakeLists.txt
    branches/soc-2011-pepper/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/soc-2011-pepper/source/gameengine/Ketsji/CMakeLists.txt
    branches/soc-2011-pepper/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/soc-2011-pepper/source/gameengine/Ketsji/KX_SoundActuator.cpp
    branches/soc-2011-pepper/source/gameengine/Ketsji/KX_SoundActuator.h

Property Changed:
----------------
    branches/soc-2011-pepper/


Property changes on: branches/soc-2011-pepper
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36830-37746
   + /trunk/blender:36830-37757

Modified: branches/soc-2011-pepper/CMakeLists.txt
===================================================================
--- branches/soc-2011-pepper/CMakeLists.txt	2011-06-23 17:29:18 UTC (rev 37757)
+++ branches/soc-2011-pepper/CMakeLists.txt	2011-06-23 17:30:56 UTC (rev 37758)
@@ -104,6 +104,9 @@
 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 @@
 	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 @@
 			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()
 

Modified: branches/soc-2011-pepper/SConstruct
===================================================================
--- branches/soc-2011-pepper/SConstruct	2011-06-23 17:29:18 UTC (rev 37757)
+++ branches/soc-2011-pepper/SConstruct	2011-06-23 17:30:56 UTC (rev 37758)
@@ -306,6 +306,11 @@
     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')

Modified: branches/soc-2011-pepper/intern/CMakeLists.txt
===================================================================
--- branches/soc-2011-pepper/intern/CMakeLists.txt	2011-06-23 17:29:18 UTC (rev 37757)
+++ branches/soc-2011-pepper/intern/CMakeLists.txt	2011-06-23 17:30:56 UTC (rev 37758)
@@ -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(smoke)
 add_subdirectory(mikktspace)
 
+if(WITH_AUDASPACE)
+	add_subdirectory(audaspace)
+endif()
+
 if(WITH_MOD_FLUID)
 	add_subdirectory(elbeem)
 endif()

Modified: branches/soc-2011-pepper/source/blender/blenkernel/CMakeLists.txt
===================================================================
--- branches/soc-2011-pepper/source/blender/blenkernel/CMakeLists.txt	2011-06-23 17:29:18 UTC (rev 37757)
+++ branches/soc-2011-pepper/source/blender/blenkernel/CMakeLists.txt	2011-06-23 17:30:56 UTC (rev 37758)
@@ -43,8 +43,6 @@
 	../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 @@
 
 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 @@
 endif()
 
 if(WITH_CODEC_FFMPEG)
+	list(APPEND INC ../../../intern/ffmpeg)
 	list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS})
 	add_definitions(-DWITH_FFMPEG)
 endif()

Modified: branches/soc-2011-pepper/source/blender/blenkernel/intern/sequencer.c
===================================================================
--- branches/soc-2011-pepper/source/blender/blenkernel/intern/sequencer.c	2011-06-23 17:29:18 UTC (rev 37757)
+++ branches/soc-2011-pepper/source/blender/blenkernel/intern/sequencer.c	2011-06-23 17:30:56 UTC (rev 37758)
@@ -73,8 +73,11 @@
 
 #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
 #endif
@@ -697,6 +700,7 @@
 		}
 		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 @@
 			seq->len = 0;
 		}
 		seq->strip->len = seq->len;
+#else
+		return;
+#endif
 		break;
 	case SEQ_SCENE:
 	{
@@ -3494,6 +3501,7 @@
 	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 @@
 
 	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)
 {

Modified: branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c
===================================================================
--- branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c	2011-06-23 17:29:18 UTC (rev 37757)
+++ branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c	2011-06-23 17:30:56 UTC (rev 37758)
@@ -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 @@
 	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_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 @@
 {
 	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; }

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list