;creates a copy of the input buffer and pads with zeros
(bind-func zero_pad
(lambda (buffer:float* buffer_size:i64 padded_buffer:float* padded_size:i64)
(let ((n:i64 0))
(dotimes (n padded_size)
(cond ((< n buffer_size)
(pset! padded_buffer n (pref buffer n)))
(else
(pset! padded_buffer n 0.0))))
void)))