(bind-func toString
"specialised toString function for IffChunkHeader*"
(lambda (hdr:IffChunkHeader*)
(let ((str:i8* (salloc 256)))
(if (null? hdr)
(sprintf str "<IffChunkHeader 0x0>")
(sprintf str
"<IffChunkHeader chunk ID: %.4s chunk size: %d>"
(aref-ptr (tref-ptr hdr 0) 0)
(iffchunk_size hdr #t))) ;; this will only work for WAVE
(Str str))))