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:
authorJoerg Mueller <nexyon@gmail.com>2012-02-13 21:31:33 +0400
committerJoerg Mueller <nexyon@gmail.com>2012-02-13 21:31:33 +0400
commit2f516f46dafd34da1a14ef03e8c6b40326eab63b (patch)
tree5b89aef310bb405f31fe036a3530a3342b99b287 /source/blender
parent840ffba82cb6676ddfee85c9ea09b08a1ea1e626 (diff)
Fix for [#27349] Sequencer: Meta Strips plays unavailable audio
Hopefully at least... Sequencer code is like <insert name of random ancient language that nobody knows anymore here>.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c58
1 files changed, 31 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index d18a71d3c55..904e97c8f67 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -523,6 +523,31 @@ void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq,
}
+static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq)
+{
+ Sequence *seq;
+
+ /* for sound we go over full meta tree to update bounds of the sound strips,
+ since sound is played outside of evaluating the imbufs, */
+ for(seq=metaseq->seqbase.first; seq; seq=seq->next) {
+ if(seq->type == SEQ_META) {
+ seq_update_sound_bounds_recursive(scene, seq);
+ }
+ else if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) {
+ if(seq->scene_sound) {
+ int startofs = seq->startofs;
+ int endofs = seq->endofs;
+ if(seq->startofs + seq->start < metaseq->start + metaseq->startofs)
+ startofs = metaseq->start + metaseq->startofs - seq->start;
+
+ if(seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs)
+ endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs;
+ sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start+seq->len - endofs, startofs);
+ }
+ }
+ }
+}
+
void calc_sequence_disp(Scene *scene, Sequence *seq)
{
if(seq->startofs && seq->startstill) seq->startstill= 0;
@@ -539,32 +564,11 @@ void calc_sequence_disp(Scene *scene, Sequence *seq)
seq->handsize= (float)((seq->enddisp-seq->startdisp)/25);
}
- seq_update_sound_bounds(scene, seq);
-}
-
-static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq)
-{
- Sequence *seq;
-
- /* for sound we go over full meta tree to update bounds of the sound strips,
- since sound is played outside of evaluating the imbufs, */
- for(seq=metaseq->seqbase.first; seq; seq=seq->next) {
- if(seq->type == SEQ_META) {
- seq_update_sound_bounds_recursive(scene, seq);
- }
- else if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) {
- if(seq->scene_sound) {
- int startofs = seq->startofs;
- int endofs = seq->endofs;
- if(seq->startofs + seq->start < metaseq->start + metaseq->startofs)
- startofs = metaseq->start + metaseq->startofs - seq->start;
-
- if(seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs)
- endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs;
- sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start+seq->len - endofs, startofs);
- }
- }
- }
+ if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) {
+ seq_update_sound_bounds(scene, seq);
+ }
+ else if(seq->type == SEQ_META)
+ seq_update_sound_bounds_recursive(scene, seq);
}
void calc_sequence(Scene *scene, Sequence *seq)
@@ -3228,7 +3232,7 @@ void seq_update_sound_bounds_all(Scene *scene)
void seq_update_sound_bounds(Scene* scene, Sequence *seq)
{
- sound_move_scene_sound_defaults(scene, seq);
+ sound_move_scene_sound_defaults(scene, seq);
/* mute is set in seq_update_muting_recursive */
}