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