(bind-func AudioBuffer_read_looped
(lambda (ab:AudioBuffer* chan)
(let ((ph (AudioBuffer_playhead ab)))
(if (= chan 0)
(AudioBuffer_set_playhead ab (% (+ ph 1) (AudioBuffer_frames ab))))
(pref (AudioBuffer_data ab)
(+ (* ph (AudioBuffer_channels ab)) chan)))))