hxn

DecoderStream

Bounded decoder-to-output transfer on the application thread.

Constructor

function new(output:AudioOutput, decoder:AudioDecoder, sampleRate:UInt, channels:UInt, capacityFrames:UInt, options:PlayOptions)

The caller retains ownership of the decoder and output.

Properties

final stream:AudioStream
var transferredFrames(default, null):Int

Methods

function pump(?maxBlocks:Int = 8):Bool

Transfers at most maxBlocks decoded blocks; returns true after output drains.

function close():Void