Packagede.popforge.audio.output
Classpublic class SoundFactory

The class SoundFactory provides creating a valid flash.media.Sound object by passing either a custom Array with de.popforge.audio.output.Sample entries or by passing an uncompressed PCM ByteArray.



Public Methods
 MethodDefined by
  
fromArray(samples:Array, channels:uint, bits:uint, rate:uint, onComplete:Function):void
[static] Creates a flash.media.Sound object from dynamic audio material
SoundFactory
  
fromByteArray(bytes:ByteArray, channels:uint, bits:uint, rate:uint, onComplete:Function):void
[static] Creates a flash.media.Sound object from dynamic audio material
SoundFactory
Method detail
fromArray()method
public static function fromArray(samples:Array, channels:uint, bits:uint, rate:uint, onComplete:Function):void

Creates a flash.media.Sound object from dynamic audio material

Parameters
samples:Array — An Array of Samples (de.popforge.audio.output.Sample)
 
channels:uint — Mono(1) or Stereo(2)
 
bits:uint — 8bit(8) or 16bit(16)
 
rate:uint — SamplingRate 5512Hz, 11025Hz, 22050Hz, 44100Hz
 
onComplete:Function — Function, that will be called after the Sound object is created. The signature must accept the Sound object as a parameter!

See also

fromByteArray()method 
public static function fromByteArray(bytes:ByteArray, channels:uint, bits:uint, rate:uint, onComplete:Function):void

Creates a flash.media.Sound object from dynamic audio material

Parameters
bytes:ByteArray — A uncompressed PCM ByteArray
 
channels:uint — Mono(1) or Stereo(2)
 
bits:uint — 8bit(8) or 16bit(16)
 
rate:uint — SamplingRate 5512Hz, 11025Hz, 22050Hz, 44100Hz
 
onComplete:Function — Function, that will be called after the Sound object is created. The signature must accept the Sound object as a parameter!

See also