hxn

AudioOutput

Constructor

function new(options:AudioOptions)

Opens the selected device. An empty device identifier selects the default.

Static methods

function hxnAdopt(hxnRaw:Handle):AudioOutput

An object for a value the library returned.

function offline(options:AudioOptions):AudioOutput

Properties

var hxnRaw:Handle

Methods

function play(buffer:AudioBuffer, options:PlayOptions):AudioVoice
function stream(sampleRate:UInt, channels:UInt, capacityFrames:UInt, options:PlayOptions):AudioStream
function bus(index:UInt):AudioBus

Bus zero is the master; every other bus initially routes to it.

function render(destination:Bytes):Void

Renders an offline output only. Byte length must be a whole stereo frame.

function metrics():AudioMetrics
function pause():Void
function resume():Void
function selectDevice(id:String):Void

Reopens on the control thread, retaining the mixer and its queued audio.

function same(other:Null<AudioOutput>):Bool

Whether other holds the value this does. Two objects can: each time the library returns the value, a new object gets a share of it.

function weak():AudioOutputWeak

A reference to the value that does not keep it alive.

function close():Void

Gives up this object's share of the value now. The collector does it otherwise. The value lives while anything else holds a share. Using this object afterwards throws.