aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/playback.scm
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-01-25 17:19:05 +0100
committerThomas White <taw@physics.org>2022-01-25 23:23:01 +0100
commit57ff1a0051266ffaa242d01b383e4f97f62fb06f (patch)
tree1201cc3ed0532581e01c5a46a809fd79e2681fe4 /guile/starlet/playback.scm
parentf7cedbe0ff797df7580908e8fe16d182671e02b2 (diff)
Define write method for playback
Diffstat (limited to 'guile/starlet/playback.scm')
-rw-r--r--guile/starlet/playback.scm21
1 files changed, 7 insertions, 14 deletions
diff --git a/guile/starlet/playback.scm b/guile/starlet/playback.scm
index 69fd444..f8daa7c 100644
--- a/guile/starlet/playback.scm
+++ b/guile/starlet/playback.scm
@@ -269,20 +269,13 @@
(set-playback-state! pb 'running)))
-(define (print-playback pb)
- (format #t "Playback ~a:\n" pb)
- ;;(format #t " Cue list ~a\n" (get-playback-cue-list pb))
- (if (get-next-cue-index pb)
- (if (< (get-next-cue-index pb)
- (vector-length (get-playback-cue-list pb)))
- (let ((the-cue (vector-ref (get-playback-cue-list pb)
- (get-next-cue-index pb))))
- (format #t " Next cue index ~a (~a)\n"
- (get-next-cue-index pb)
- the-cue))
- (format #t " End of cue list.\n"))
- (format #t " Next cue index is unspecified.\n"))
- *unspecified*)
+(define-method (write (pb <starlet-playback>) port)
+ (format port
+ "#<<starlet-playback> state: ~a current-cue-number: ~a next-cue-index: ~a of ~a>"
+ (atomic-box-ref (state-box pb))
+ (exact->inexact (get-playback-cue-number pb))
+ (get-next-cue-index pb)
+ (vector-length (get-playback-cue-list pb))))
(define (reassert-current-cue! pb)