pipeline_stage   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/stream.xtm

Implementation

;; input->output node
(bind-func pipeline_stage:[FilterData*,!a,i64,i64,!b]*
  (lambda (filt rate depth input)
    (let ((r (/ rate (zero_check (filt.pop))))
    (p:i1 (or (refcheck filt prepush)
        (refcheck filt prepeek)
        (refcheck filt prepop)))
    (datasize (* rate (filt.push) depth))
    (d (alloc datasize))
    (b (QBuffer 0 0 datasize d))
    (work (filt input b))
    (makelwork:i1 (refcheck work make_lwork))
    (lwork:[void]*
     (if makelwork
         (let ((maker:[[void]*,i64]* (work.make_lwork)))
     (maker r))
         (lambda () (doloop (ii r) (work)))))
    (prework:[void]* (if p (work.prework) work)))
      (FilterData r input b work lwork prework #t #t))))


Back to Index

Similar Entries