Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Müller <nexyon@gmail.com>2016-12-27 22:47:01 +0300
committerJörg Müller <nexyon@gmail.com>2016-12-27 22:47:01 +0300
commitd874b40a555790d1ca08a930597f017e59a4b698 (patch)
tree2a467a5e484442d6c024263254f998619755c4a1 /source/blender/blenkernel/intern/sound.c
parent752a783fa431565d7d964871aceb90bfaa7c9234 (diff)
Fix T50240: Rendering crashes when synced to JACK Transport
Disabling synchronization while rendering. Using G.is_rendering as suggested by bastien. ;-)
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index f20885b1e8f..d5a395ffc4b 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