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:
authorPeter Kim <pk15950@gmail.com>2022-09-08 07:00:12 +0300
committerPeter Kim <pk15950@gmail.com>2022-09-08 07:00:12 +0300
commit00dcfdf916c69672210b006e62d966f1bc2fbeb7 (patch)
tree0cbb1b91fe26c750197126085b74224a795a103c /source/blender/sequencer/intern/sound.c
parenta39532670f6b668da7be5810fb1f844b82feeba3 (diff)
parentd5934974219135102f364f57c45a8b1465e2b8d9 (diff)
Merge branch 'master' into xr-devxr-dev
Diffstat (limited to 'source/blender/sequencer/intern/sound.c')
-rw-r--r--source/blender/sequencer/intern/sound.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/sequencer/intern/sound.c b/source/blender/sequencer/intern/sound.c
index 50c8b76a9a0..c4992848cb5 100644
--- a/source/blender/sequencer/intern/sound.c
+++ b/source/blender/sequencer/intern/sound.c
@@ -23,6 +23,7 @@
#include "SEQ_sound.h"
#include "SEQ_time.h"
+#include "sequencer.h"
#include "strip_time.h"
/* Unlike _update_sound_ funcs, these ones take info from audaspace to update sequence length! */
@@ -99,8 +100,8 @@ void SEQ_sound_update_bounds(Scene *scene, Sequence *seq)
BKE_sound_move_scene_sound(scene,
seq->scene_sound,
- SEQ_time_left_handle_frame_get(seq),
- SEQ_time_right_handle_frame_get(seq),
+ SEQ_time_left_handle_frame_get(scene, seq),
+ SEQ_time_right_handle_frame_get(scene, seq),
startofs,
0.0);
}
@@ -133,3 +134,12 @@ void SEQ_sound_update(Scene *scene, bSound *sound)
seq_update_sound_recursive(scene, &scene->ed->seqbase, sound);
}
}
+
+float SEQ_sound_pitch_get(const Scene *scene, const Sequence *seq)
+{
+ Sequence *meta_parent = seq_sequence_lookup_meta_by_seq(scene, seq);
+ if (meta_parent != NULL) {
+ return seq->speed_factor * SEQ_sound_pitch_get(scene, meta_parent);
+ }
+ return seq->speed_factor;
+}