From 03baaa73727f3a6ba720da5f2f9791e2b0e29c57 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 25 Jan 2022 18:06:55 +0100 Subject: Track time taken for cue transition --- guile/starlet/playback.scm | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'guile/starlet/playback.scm') diff --git a/guile/starlet/playback.scm b/guile/starlet/playback.scm index 5052ad0..fda6b80 100644 --- a/guile/starlet/playback.scm +++ b/guile/starlet/playback.scm @@ -244,23 +244,22 @@ (let* ((the-cue (vector-ref (get-playback-cue-list pb) cue-index)) (this-cue-state (get-tracked-state the-cue)) (overlay-state (make-empty-state)) - (cue-clock (get-cue-clock the-cue))) - - (atomically-overlay-state! - overlay-state - ((transition-func (get-transition-effect the-cue)) - this-cue-state - cue-clock)) - - (for-each - (lambda (cue-part) - (atomically-overlay-state! - overlay-state - ((transition-func (get-transition-effect the-cue)) - this-cue-state - cue-clock))) - (get-cue-parts the-cue)) - + (cue-clock (get-cue-clock the-cue)) + (fade-time 0)) + + (receive + (overlay-part transition-time) + ((transition-func (get-transition-effect the-cue)) this-cue-state + pb + cue-clock) + (atomically-overlay-state! + overlay-state + overlay-part) + (set! fade-time (max fade-time transition-time))) + + ;; FIXME: Same, for each cue part + + (set-clock-expiration-time! cue-clock fade-time) (atomically-overlay-state! pb overlay-state) (set-pb-cue-clock! pb cue-clock) (set-running-cue! pb the-cue) -- cgit v1.2.3