[Bf-blender-cvs] [42ab4b60bd4] blender-v2.93-release: Fix T91012: Scene strip doesn't play audio

Richard Antalik noreply at git.blender.org
Tue Jan 11 16:00:21 CET 2022


Commit: 42ab4b60bd450523d6a583724e74e4538fa26356
Author: Richard Antalik
Date:   Fri Oct 15 22:49:19 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rB42ab4b60bd450523d6a583724e74e4538fa26356

Fix T91012: Scene strip doesn't play audio

Issue was caused by adding `seq->sound` check in ded68fb10275 in
function `BKE_sound_scene_add_scene_sound` as `offset_time` field was
introduced to resolve sub-frame a/v misalignment.

Scene strips don't have `bSound` allocated but also don't suffer from
a/v misalignment.

Remove `seq->sound` check and don't apply any offset for scene strips.

Reviewed By: zeddb, sergey

Differential Revision: https://developer.blender.org/D12819

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

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

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

diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 8737968491e..0ce36a54bc6 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -703,13 +703,13 @@ void *BKE_sound_scene_add_scene_sound(
     Scene *scene, Sequence *sequence, int startframe, int endframe, int frameskip)
 {
   sound_verify_evaluated_id(&scene->id);
-  if (sequence->scene && scene != sequence->scene && sequence->sound) {
+  if (sequence->scene && scene != sequence->scene) {
     const double fps = FPS;
     return AUD_Sequence_add(scene->sound_scene,
                             sequence->scene->sound_scene,
                             startframe / fps,
                             endframe / fps,
-                            frameskip / fps + sequence->sound->offset_time);
+                            frameskip / fps);
   }
   return NULL;
 }
@@ -775,13 +775,13 @@ void BKE_sound_move_scene_sound(
 void BKE_sound_move_scene_sound_defaults(Scene *scene, Sequence *sequence)
 {
   sound_verify_evaluated_id(&scene->id);
-  if (sequence->scene_sound && sequence->sound) {
+  if (sequence->scene_sound) {
     BKE_sound_move_scene_sound(scene,
                                sequence->scene_sound,
                                sequence->startdisp,
                                sequence->enddisp,
                                sequence->startofs + sequence->anim_startofs,
-                               sequence->sound->offset_time);
+                               0.0);
   }
 }
 
diff --git a/source/blender/sequencer/intern/sound.c b/source/blender/sequencer/intern/sound.c
index c53aacddcfe..a50a9fbb179 100644
--- a/source/blender/sequencer/intern/sound.c
+++ b/source/blender/sequencer/intern/sound.c
@@ -111,12 +111,8 @@ void SEQ_sound_update_bounds(Scene *scene, Sequence *seq)
       /* We have to take into account start frame of the sequence's scene! */
       int startofs = seq->startofs + seq->anim_startofs + seq->scene->r.sfra;
 
-      BKE_sound_move_scene_sound(scene,
-                                 seq->scene_sound,
-                                 seq->startdisp,
-                                 seq->enddisp,
-                                 startofs,
-                                 seq->sound->offset_time);
+      BKE_sound_move_scene_sound(
+          scene, seq->scene_sound, seq->startdisp, seq->enddisp, startofs, 0.0);
     }
   }
   else {



More information about the Bf-blender-cvs mailing list