Constructor

new(app:Clay, data:AudioData)

Variables

@:value(176400)streamBufferLength:Int = 176400

Streams only: The size in bytes of a single stream buffer. This is ~1 sec in 16 bit mono. default:176400 for most cases this can be left alone.

@:value(2)streamBufferCount:Int = 2

Streams only: The number of buffers to queue up. default:2 For most cases this can be left alone.

@:value(false)destroyed:Bool = false

Whether this source has been destroyed

sourceId:String

A unique key for this source

Methods

instance(handle:AudioHandle):AudioInstance

Called by the audio system to obtain a new instance of this source.

bytesToSeconds(bytes:Int):Float

A helper for converting bytes to seconds for a sound source

secondsToBytes(seconds:Float):Int

A helper for converting seconds to bytes for this audio source