Fix T80282: Playback start delayed with AV sync

If current frame is set to before start frame, with AV sync there is
delay when playback is started.

Tag scene with ID_RECALC_AUDIO_SEEK, so audio playback starts from
correct position.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8809
This commit is contained in:
Richard Antalik 2020-10-05 02:17:19 +02:00
parent f4f6fdc268
commit f375ec4986
Notes: blender-bot 2023-02-14 05:50:03 +01:00
Referenced by issue #80282, Sequencer: Preview range waits for the virtual playhead to reach it's start before playing
1 changed files with 3 additions and 0 deletions

View File

@ -1521,6 +1521,9 @@ void ED_screen_animation_timer(bContext *C, int redraws, int sync, int enable)
screen->animtimer->customdata = sad;
}
/* Seek audio to ensure playback in preview range with AV sync. */
DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK);
/* notifier catched by top header, for button */
WM_event_add_notifier(C, NC_SCREEN | ND_ANIMPLAY, NULL);
}