hxn

AudioStream

Static methods

function hxnAdopt(hxnRaw:Handle):AudioStream

An object for a value the library returned.

Properties

var hxnRaw:Handle

Methods

function write(pcm:Bytes):UInt

Returns accepted frames. Retry the remaining suffix without blocking.

function availableFrames():UInt
function finish():Void

Marks EOF after the last successful write. Queued audio continues playing.

function stop():Void
function finished():Bool
function setGain(gain:Float):Void
function setPan(pan:Float):Void
function positionSeconds():Float
function same(other:Null<AudioStream>):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():AudioStreamWeak

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.