qbuf_pop   xtlang


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

Implementation

(bind-func qbuf_pop:[!a,QBuffer*]*
  (lambda (buf)
    (if (>= (tref buf 0) (tref buf 1))
  (begin
    (println "Trying to pop past write! p(" (tref buf 0) ") w(" (tref buf 1) ")")
    (println)))
    (tset! buf 0 (+ (tref buf 0) 1))
    (pref (tref buf 3)
    (% (- (tref buf 0) 1)
       (tref buf 2)))))


Back to Index

Similar Entries