aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/playback.scm
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-01-25 18:06:55 +0100
committerThomas White <taw@physics.org>2022-01-25 23:23:01 +0100
commit03baaa73727f3a6ba720da5f2f9791e2b0e29c57 (patch)
tree475cf59422f945ff5ffbe52812af7af945926316 /guile/starlet/playback.scm
parentbd8cf7df1c51230cf19f42408eb2dd79048774ce (diff)
Track time taken for cue transition
Diffstat (limited to 'guile/starlet/playback.scm')
-rw-r--r--guile/starlet/playback.scm33
1 files changed, 16 insertions, 17 deletions
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)