diff options
author | Thomas White <taw@physics.org> | 2022-06-18 11:18:31 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-06-18 11:18:31 +0200 |
commit | 4962a8a5b2c02322bbd781186884ee7e1c3ed763 (patch) | |
tree | 48c15b1575eb877964b81bbbd044655a700e1308 | |
parent | 07eb061a3dc3350e7f5db26b184bbbf6c3ac029d (diff) |
Add num-cues
-rw-r--r-- | guile/starlet/cue-list.scm | 7 | ||||
-rw-r--r-- | guile/starlet/playback.scm | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/guile/starlet/cue-list.scm b/guile/starlet/cue-list.scm index 78fecc5..dd3edbd 100644 --- a/guile/starlet/cue-list.scm +++ b/guile/starlet/cue-list.scm @@ -48,7 +48,8 @@ cue-number-to-index cue-index-to-number current-cue-clock - read-cue-list-file) + read-cue-list-file + num-cues) #:re-export (snap crossfade)) @@ -75,6 +76,10 @@ (cue-clock get-cue-clock)) +(define-method (num-cues (l <vector>)) + (vector-length l)) + + (define (qnum a) (/ (inexact->exact (* a 1000)) 1000)) diff --git a/guile/starlet/playback.scm b/guile/starlet/playback.scm index 5e6038e..1628d99 100644 --- a/guile/starlet/playback.scm +++ b/guile/starlet/playback.scm @@ -337,6 +337,10 @@ (write-recovery-file! pb (get-cue-number the-cue)))) +(define-method (num-cues (pb <starlet-playback>)) + (num-cues (get-playback-cue-list pb))) + + (define-method (update-state! (pb <starlet-playback>)) (when (and (get-pb-cue-clock pb) (clock-expired? (get-pb-cue-clock pb)) |