Static methods

staticinlinefromAudioBuffer(buffer:AudioBuffer):Sound

staticinlinefromFile(path:String):Sound

staticinlineloadFromFile(path:String):Future<Sound>

Constructor

@:value({ context : null, stream : null })new(?stream:Null<URLRequest>, ?context:SoundLoaderContext)

Variables

@:flash.propertyread onlybytesLoaded:UInt

@:flash.propertyread onlybytesTotal:Int

@:flash.propertyread onlyid3:ID3Info

@:flash.propertyread onlyisBuffering:Bool

@:flash.property@:require(flash10_1)read onlyisURLInaccessible:Bool

@:flash.propertyread onlylength:Float

read onlysampleRate:Int

@:flash.propertyread onlyurl:String

Methods

@:value({ startPosition : -1 })@:require(flash10)extract(target:ByteArray, length:Float, startPosition:Float = -1):Float

@:value({ context : null })load(stream:URLRequest, ?context:SoundLoaderContext):Void

@:value({ forcePlayAsMusic : false })@:require(flash11)loadCompressedDataFromByteArray(bytes:ByteArray, bytesLength:Int, forcePlayAsMusic:Bool = false):Void

@:value({ sampleRate : 44100, stereo : true, format : null })@:require(flash11)loadPCMFromByteArray(bytes:ByteArray, samples:Int, ?format:String, stereo:Bool = true, sampleRate:Float = 44100):Void

@:value({ sndTransform : null, loops : 0, startTime : 0.0 })play(startTime:Float = 0.0, loops:Int = 0, ?sndTransform:SoundTransform):SoundChannel

Inherited Variables

Inherited Methods

Defined by EventDispatcher

@:value({ useWeakReference : false, priority : 0, useCapture : false })addEventListener<T>(type:EventType<T>, listener:T ‑> Void, useCapture:Bool = false, priority:Int = 0, useWeakReference:Bool = false):Void

@:value({ useCapture : false })removeEventListener<T>(type:EventType<T>, listener:T ‑> Void, useCapture:Bool = false):Void