;; helper functions for setting an individual samples offset
;; i.e. set sample index 60 to start at 40000 samples into the audio buffer
(bind-func set_sample_offset_
(lambda (inst:[SAMPLE,SAMPLE,i64,i64,SAMPLE*]* index:i64 bank:i64 offset:i64)
(let ((offsets:|20,|128,i64||* (inst.samples_offsets)))
(aset! (aref-ptr offsets bank) index offset)
1)))