generate-audio ( generator -- c-ptr size )
Audio playback engine ยป Audio generator protocol

Next:generator-audio-format ( generator -- channels sample-bits sample-rate )


Vocabulary
audio.engine

Inputs
generatoran object implementing the Audio generator protocol


Outputs
c-ptra c-ptr or f
sizean integer or f


Word description
Tells generator to generate another block of PCM data. c-ptr can be a byte-array or alien pointer. size indicates the size in bytes of the returned buffer. The generator is allowed to reuse the buffer; the engine will copy the data to its own internal buffer before its next call to generate-audio. The method can provide f for both outputs or a size of 0 to indicate that its stream is exhausted.

Definition

GENERIC: generate-audio ( generator -- c-ptr size )


Methods