AbstractSource is an implementation superclass for IAudioSource implementations
that wish to generate their output on a per-channel basis. An AbstractSource
has standard amplitude and duration properties.
protected var _descriptor:AudioDescriptor
Audio descriptor for this source.
protected var _position:Number
public var amplitude:Number
descriptor:AudioDescriptor
[read-only]
Get the AudioDescriptor for this Sample.
Implementation public function get descriptor():AudioDescriptor
public var duration:Number
frameCount:Number
[read-only]
Implementation public function get frameCount():Number
position:Number
[read-only]
Implementation public function get position():Number
public function AbstractSource(descriptor:AudioDescriptor , duration:Number, amplitude:Number = 1.0)
Create an AbstractSource of a particular duration and amplitude.
Parameters descriptor :AudioDescriptor
— an AudioDescriptor for the source's audio
duration :Number
(default = NaN
)
— the duration of the source's output
amplitude :Number
(default = 1.0
)
— the amplitude of the source's output
public function clone():IAudioSource
Returns protected function generateChannel(data:Vector.<Number>, channel:Number, numFrames:Number):void
Parameters
data :Vector.<Number>
channel :Number
numFrames :Number
public function getSample(numFrames:Number):Sample
Parameters
Returns public function resetPosition():void
public static const MAX_DURATION:Number = 2.147483647E9
Copyright 2011-2012 AI Speech Ltd Tue Mar 26 2013, 01:05 PM +08:00