;; so we don't need to import math.xtm ;; simple (non vectorised) sum (bind-func static calc_vsum (lambda (buf:SAMPLE* len:i64) (let ((sum 0.0) (i 0)) (dotimes (i len) (set! sum (+ sum (pref buf i)))) sum)))