(bind-func toString
"specialised toString function for AudioBuffer*"
(lambda (ab:AudioBuffer*)
(let ((str:i8* (salloc 1024)))
(if (null? ab)
(sprintf str "<AudioBuffer 0x0>")
(sprintf str "<AudioBuffer %p
filepath: %s
playhead: %lld
frames: %lld
channels: %lld
data: %p
samplerate: %f
loop_start: %lld
loop_frames: %lld
root_frq: %lld
phase: %f>"
ab
(tref ab 0)
(tref ab 1)
(tref ab 2)
(tref ab 3)
(tref ab 4)
(tref ab 5)
(tref ab 6)
(tref ab 7)
(tref ab 8)
(tref ab 9)))
(Str str))))