AudioDecoder

Decodes one audio stream: packets in through send, PCM out through receive. The engine closes it.

Properties

Link copied to clipboard
abstract val isDrained: Boolean

True once receive has reported the end of the stream. See VideoDecoder.isDrained.

Link copied to clipboard

What this decoder produces. May change mid-stream, which the engine handles.

Functions

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
abstract suspend fun flush(newGeneration: Generation)

The only epoch boundary. See VideoDecoder.flush.

Link copied to clipboard
abstract suspend fun receive(): AudioBuffer?

The next decoded buffer, or null when more input is needed. The caller closes it.

Link copied to clipboard
abstract suspend fun send(packet: PlayerPacket?): Boolean

Offers a packet, or null to start the drain. False means receive before offering again, as for VideoDecoder.send.