queue-clip-buffer ( audio-clip al-buffer -- )


Vocabulary
audio.engine.private

Inputs
audio-clipan object
al-bufferan object


Outputs
None

Definition


:: queue-clip-buffer ( audio-clip al-buffer -- )
audio-clip done?>> [
audio-clip al-source>> :> al-source audio-clip
generator>> :> generator generator generate-audio
:> ( data size ) size { [ not ] [ zero? ] } 1||
[ audio-clip t >>done? drop ] [
al-buffer audio-clip openal-format data size
audio-clip sample-rate>> alBufferData
al-source 1 al-buffer uint <ref>
alSourceQueueBuffers
] if
] unless ;