;; simple quad weights (from mono)
(bind-func static mix4_c
(lambda ()
(let ((out 0.0))
(lambda (chan:i64 x:SAMPLE c1 c2 c3 c4)
(cond ((= chan 0) (set! out x) (* out c1))
((= chan 1) (* out c2))
((= chan 2) (* out c3))
((= chan 3) (* out c4))
(else 0.0))))))