AudioRenderer

fun interface AudioRenderer(source)

Produces audio for an AudioDevice. klyph's mixer implements it.

render runs on SDL's audio thread, not the thread that opened the device. It must not allocate, block or wait on the main thread: a late buffer is heard as a click.

Functions

Link copied to clipboard
abstract fun render(output: FloatArray, frames: Int)

Writes frames frames of stereo audio into the start of output, interleaved left then right, so frames * 2 values in all. Every one of those values must be written; silence is