Companion

Holds the factory that opens the playback device.

Functions

Link copied to clipboard
fun open(sampleRate: Int, bufferFrames: Int, renderer: AudioRenderer): AudioDevice

Opens the default playback device for float stereo at sampleRate frames per second and starts playing at once, calling renderer on SDL's audio thread for at most bufferFrames frames at a time. Pass the Int parameters by name.

Link copied to clipboard
fun openOrNull(sampleRate: Int, bufferFrames: Int, renderer: AudioRenderer): AudioDevice?

Opens the default playback device like open, or returns null when there is no playback device, the audio subsystem is not started, or SDL cannot open or start the device.