[Bf-blender-cvs] [d874b40] master: Fix T50240: Rendering crashes when synced to JACK Transport

Jörg Müller noreply at git.blender.org
Tue Dec 27 20:47:59 CET 2016


Commit: d874b40a555790d1ca08a930597f017e59a4b698
Author: Jörg Müller
Date:   Tue Dec 27 20:47:01 2016 +0100
Branches: master
https://developer.blender.org/rBd874b40a555790d1ca08a930597f017e59a4b698

Fix T50240: Rendering crashes when synced to JACK Transport

Disabling synchronization while rendering.
Using G.is_rendering as suggested by bastien. ;-)

===================================================================

M	source/blender/blenkernel/intern/sound.c

===================================================================

diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index f20885b..d5a395f 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -167,6 +167,10 @@ static const char *force_device = NULL;
 #ifdef WITH_JACK
 static void sound_sync_callback(void *data, int mode, float time)
 {
+	// Ugly: Blender doesn't like it when the animation is played back during rendering
+	if (G.is_rendering)
+		return;
+
 	struct Main *bmain = (struct Main *)data;
 	struct Scene *scene;
 
@@ -693,6 +697,10 @@ void BKE_sound_seek_scene(struct Main *bmain, struct Scene *scene)
 
 float BKE_sound_sync_scene(struct Scene *scene)
 {
+	// Ugly: Blender doesn't like it when the animation is played back during rendering
+	if (G.is_rendering)
+		return NAN_FLT;
+
 	if (scene->playback_handle) {
 		if (scene->audio.flag & AUDIO_SYNC)
 			return AUD_getSynchronizerPosition(scene->playback_handle);
@@ -704,6 +712,10 @@ float BKE_sound_sync_scene(struct Scene *scene)
 
 int BKE_sound_scene_playing(struct Scene *scene)
 {
+	// Ugly: Blender doesn't like it when the animation is played back during rendering
+	if (G.is_rendering)
+		return -1;
+
 	if (scene->audio.flag & AUDIO_SYNC)
 		return AUD_isSynchronizerPlaying();
 	else




More information about the Bf-blender-cvs mailing list