AudioSinkFactory

Creates the audio sink of a session. An OutputBackend carries one.

Properties

Link copied to clipboard
abstract val name: String

For logs and diagnostics.

Functions

Link copied to clipboard
abstract suspend fun create(): AudioSink

A new sink that is not open yet. The engine opens it, and closes it when the session ends.

Link copied to clipboard
open fun outputChannelCount(): Int?

How many channels the output the next sink would play through carries, or null when the platform does not say (#466). Two for headphones, a phone speaker or a stereo device, six for a 5.1 receiver. This is the route's own count, not what a sink would accept: a sink may take six channels and fold them to two itself. The engine asks at an open when io.github.yuroyami.kiteplayer.AudioConfig.matchOutputChannels is on, so it must answer quickly and never throw. Null by default.