Fix: #113084 VSE equalizer stutters when any strip is animated

Only update equalizer data, when sound is tagged to be recalculated.

Co-authored-by: menda <alguien@aqui.es>
Pull Request: https://projects.blender.org/blender/blender/pulls/113156
This commit is contained in:
Marcos Perez 2023-10-03 18:13:24 +02:00 committed by Richard Antalik
parent 050c081784
commit 5c76c7bf84
1 changed files with 6 additions and 7 deletions

View File

@ -917,16 +917,15 @@ static bool seq_update_seq_cb(Sequence *seq, void *user_data)
if (seq->sound != nullptr) {
if (scene->id.recalc & ID_RECALC_AUDIO || seq->sound->id.recalc & ID_RECALC_AUDIO) {
BKE_sound_update_scene_sound(seq->scene_sound, seq->sound);
}
void *sound = seq->sound->playback_handle;
void *sound = seq->sound->playback_handle;
if (!BLI_listbase_is_empty(&seq->modifiers)) {
LISTBASE_FOREACH (SequenceModifierData *, smd, &seq->modifiers) {
sound = SEQ_sound_modifier_recreator(seq, smd, sound);
if (!BLI_listbase_is_empty(&seq->modifiers)) {
LISTBASE_FOREACH (SequenceModifierData *, smd, &seq->modifiers) {
sound = SEQ_sound_modifier_recreator(seq, smd, sound);
}
}
BKE_sound_update_sequence_handle(seq->scene_sound, sound);
}
BKE_sound_update_sequence_handle(seq->scene_sound, sound);
}
BKE_sound_set_scene_sound_volume(
seq->scene_sound, seq->volume, (seq->flag & SEQ_AUDIO_VOLUME_ANIMATED) != 0);