Package | org.si.sion.utils |
Class | public final class SoundClass |
Inheritance | SoundClass ![]() |
Method | Defined By | ||
---|---|---|---|
create(samples:Vector.<Number>, onComplete:Function):void [static] create Sound class from Vector of Number (44.1kHz stereo only). | SoundClass | ||
loadMP3FromByteArray(bytes:ByteArray, onComplete:Function):void [static] load Sound class from mp3 data. | SoundClass | ||
loadPCMFromByteArray(src:ByteArray, onComplete:Function, compressed:Boolean = false, sampleRate:int = 44100, bitRate:int = 16, channels:int = 2):void [static] load Sound class from PCM data. | SoundClass |
create | () | method |
public static function create(samples:Vector.<Number>, onComplete:Function):void
create Sound class from Vector of Number (44.1kHz stereo only).
Parameters
samples:Vector.<Number> — The Vector.<Number> wave data creating from. The LRLR type 44.1kHz stereo data.
| |
onComplete:Function — callback function when finished to create. the format is function(sound:Sound) : void
|
loadMP3FromByteArray | () | method |
public static function loadMP3FromByteArray(bytes:ByteArray, onComplete:Function):void
load Sound class from mp3 data.
Parameters
bytes:ByteArray — source byteArray.
| |
onComplete:Function — callback function when finished to create. the format is function(sound:Sound) : void
|
loadPCMFromByteArray | () | method |
public static function loadPCMFromByteArray(src:ByteArray, onComplete:Function, compressed:Boolean = false, sampleRate:int = 44100, bitRate:int = 16, channels:int = 2):void
load Sound class from PCM data.
Parameters
src:ByteArray — source byteArray.
| |
onComplete:Function — callback function when finished to create. the format is function(sound:Sound) : void
| |
compressed:Boolean (default = false ) — compressed flag, true = mp3, false = raw wave.
| |
sampleRate:int (default = 44100 ) — sampling rate
| |
bitRate:int (default = 16 ) — bit rate
| |
channels:int (default = 2 ) — channels
|