Static variables

@:value(1.75)staticVOLUME_FACTOR:Float = 1.75

Static methods

staticdataFromBytes(app:Clay, id:String, bytes:Uint8Array, ?format:AudioFormat):AudioData

Returns an AudioData instance from the given bytes

Constructor

new(app:Clay)

Variables

@:value(false)read onlyactive:Bool = false

Methods

play(source:AudioSource, volume:Float, paused:Bool, bus:Int):AudioHandle

loop(source:AudioSource, volume:Float, paused:Bool, bus:Int):AudioHandle

createBusFilter(busIndex:Int, createFunc:Callable<(busIndex:Int, instanceId:Int) ‑> Void>, destroyFunc:Callable<(busIndex:Int, instanceId:Int) ‑> Void>, filterFunc:Callable<(busIndex:Int, instanceId:Int, aBuffer:RawPointer<Float32>, aSamples:UInt32, aChannels:UInt32, aSamplerate:Float32, time:Float64) ‑> Void>):Void

pan(handle:AudioHandle, pan:Float):Void

volume(handle:AudioHandle, volume:Float):Void

pitch(handle:AudioHandle, pitch:Float):Void

@:has_untyped@:value({ interleaved : true })dataFromPCM(id:String, pcmData:Float32Array, sampleFrames:Int, channels:Int, sampleRate:Float, interleaved:Bool = true, ?format:AudioFormat, ?callback:(data:AudioData) ‑> Void):AudioData

Creates AudioData from raw PCM Float32 samples.

Parameters:

id

Unique identifier for this audio data

pcmData

Float32Array containing the raw PCM samples

sampleFrames

Number of sample frames (samples per channel)

channels

Number of audio channels (1 = mono, 2 = stereo, etc.)

sampleRate

Sample rate in Hz (e.g., 44100)

interleaved

Whether the PCM data is interleaved (LRLRLR...) or planar (LLL...RRR...)

format

Optional audio format information

callback

Optional callback when AudioData is ready

Inherited Variables

Defined by BaseAudio

read onlyapp:Clay

Clay app

Inherited Methods

Defined by BaseAudio