diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-03 18:47:44 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-03 18:50:43 +0300 |
commit | 888852055c1b203f5a89c7e229f87f412a6624da (patch) | |
tree | bc0a0752ec236eae297e19ea30cf00dee9672aa1 /source/blender/editors | |
parent | 712fe561d58c78c2f9ecda2f07d4d45d36a384bf (diff) |
Sound: Fix for being unable to jump to a frame during playback with A/V sync
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/anim_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index f95429fd47c..97ba7132c3d 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -116,7 +116,7 @@ static void change_frame_apply(bContext *C, wmOperator *op) FRAMENUMBER_MIN_CLAMP(CFRA); /* do updates */ - BKE_sound_seek_scene(CTX_data_main(C), DEG_get_evaluated_scene(CTX_data_depsgraph(C))); + BKE_sound_update_and_seek(CTX_data_main(C), CTX_data_depsgraph(C)); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 8219a629b49..61fa05f243f 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2771,7 +2771,7 @@ static int frame_offset_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, false); - BKE_sound_seek_scene(bmain, scene); + BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C)); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -2833,8 +2833,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, true); - /* TODO(sergey): Make more reusable. */ - BKE_sound_seek_scene(bmain, DEG_get_evaluated_scene(CTX_data_depsgraph(C))); + BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C)); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); } @@ -2950,7 +2949,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) else { areas_do_frame_follow(C, true); - BKE_sound_seek_scene(bmain, scene); + BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C)); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -3017,7 +3016,7 @@ static int marker_jump_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, true); - BKE_sound_seek_scene(bmain, scene); + BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C)); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -4404,7 +4403,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv } if (sad->flag & ANIMPLAY_FLAG_JUMPED) { - BKE_sound_seek_scene(bmain, scene_eval); + BKE_sound_update_and_seek(bmain, depsgraph); #ifdef PROFILE_AUDIO_SYNCH old_frame = CFRA; #endif |