From: Christopher Allan Webber Date: Thu, 19 Nov 2015 04:33:01 +0000 (-0600) Subject: Added add-segments-contents-to-queue! X-Git-Tag: v0.1.0~161 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=cc62faf62f622d7b2bdf02b9a0845fffbadfa517;p=8sync.git Added add-segments-contents-to-queue! --- diff --git a/loopy.scm b/loopy.scm index 73ef568..d878601 100644 --- a/loopy.scm +++ b/loopy.scm @@ -22,6 +22,7 @@ schedule-segments schedule-segments-split schedule-extract-until! + add-segments-contents-to-queue! make-port-mapping port-mapping-set! port-mapping-remove! @@ -204,6 +205,14 @@ (set-schedule-segments! schedule segments-after) segments-before)) +(define (add-segments-contents-to-queue! segments queue) + (for-each + (lambda (segment) + (let ((seg-queue (time-segment-queue segment))) + (while (not (q-empty? seg-queue)) + (enq! queue (deq! seg-queue))))) + segments)) + ;;; Port handling