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:
authorRichard Antalik <richardantalik@gmail.com>2022-03-08 15:15:41 +0300
committerRichard Antalik <richardantalik@gmail.com>2022-03-08 15:16:36 +0300
commit3cb3167278a7f9d488b66a7fc591aea8288408e9 (patch)
treea66e3e0386369b8666d896c4026190194a316cf0 /source/blender/blenkernel/intern/sound.c
parent73dc8c24e44ba8b462f88c1c629a84c98979ef41 (diff)
Simplify sound property handling
Sound properties like volume, pitch and muting are handled in `BKE_sound_add_scene_sound()`. This is unnecessary, because in properties are then set to real values in `SEQ_edit_update_muting()` and `seq_update_seq_cb()`. Alternatively, it may be better to remove all other updates leave them in `BKE_sound_add_scene_sound()`. But I want to add muting per channel, whhich is easier and probably cleaner to do with function `SEQ_edit_update_muting()`. Reviewed By: sergey Differential Revision: https://developer.blender.org/D14269
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index fd9735ff07f..8b72fd05057 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -727,16 +727,11 @@ void *BKE_sound_add_scene_sound(
}
sound_verify_evaluated_id(&sequence->sound->id);
const double fps = FPS;
- void *handle = AUD_Sequence_add(scene->sound_scene,
- sequence->sound->playback_handle,
- startframe / fps,
- endframe / fps,
- frameskip / fps + sequence->sound->offset_time);
- AUD_SequenceEntry_setMuted(handle, (sequence->flag & SEQ_MUTE) != 0);
- AUD_SequenceEntry_setAnimationData(handle, AUD_AP_VOLUME, CFRA, &sequence->volume, 0);
- AUD_SequenceEntry_setAnimationData(handle, AUD_AP_PITCH, CFRA, &sequence->pitch, 0);
- AUD_SequenceEntry_setAnimationData(handle, AUD_AP_PANNING, CFRA, &sequence->pan, 0);
- return handle;
+ return AUD_Sequence_add(scene->sound_scene,
+ sequence->sound->playback_handle,
+ startframe / fps,
+ endframe / fps,
+ frameskip / fps + sequence->sound->offset_time);
}
void *BKE_sound_add_scene_sound_defaults(Scene *scene, Sequence *sequence)