Packagecom.noteflight.standingwave2.sources
Classpublic class AbstractSource
InheritanceAbstractSource Inheritance Object
Implements IAudioSource
Subclasses SineSource, SoundSource

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.



Public Properties
 PropertyDefined By
  amplitude : Number
AbstractSource
  descriptor : AudioDescriptor
[read-only] Get the AudioDescriptor for this Sample.
AbstractSource
  duration : Number
AbstractSource
  frameCount : Number
[read-only]
AbstractSource
  position : Number
[read-only]
AbstractSource
Protected Properties
 PropertyDefined By
  _descriptor : AudioDescriptor
Audio descriptor for this source.
AbstractSource
  _position : Number
AbstractSource
Public Methods
 MethodDefined By
  
AbstractSource(descriptor:AudioDescriptor, duration:Number, amplitude:Number = 1.0)
Create an AbstractSource of a particular duration and amplitude.
AbstractSource
  
AbstractSource
  
getSample(numFrames:Number):Sample
AbstractSource
  
AbstractSource
Protected Methods
 MethodDefined By
  
generateChannel(data:Vector.<Number>, channel:Number, numFrames:Number):void
AbstractSource
Public Constants
 ConstantDefined By
  MAX_DURATION : Number = 2.147483647E9
[static]
AbstractSource
Property Detail
_descriptorproperty
protected var _descriptor:AudioDescriptor

Audio descriptor for this source.

_positionproperty 
protected var _position:Number

amplitudeproperty 
public var amplitude:Number

descriptorproperty 
descriptor:AudioDescriptor  [read-only]

Get the AudioDescriptor for this Sample.


Implementation
    public function get descriptor():AudioDescriptor
durationproperty 
public var duration:Number

frameCountproperty 
frameCount:Number  [read-only]


Implementation
    public function get frameCount():Number
positionproperty 
position:Number  [read-only]


Implementation
    public function get position():Number
Constructor Detail
AbstractSource()Constructor
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
Method Detail
clone()method
public function clone():IAudioSource

Returns
IAudioSource
generateChannel()method 
protected function generateChannel(data:Vector.<Number>, channel:Number, numFrames:Number):void

Parameters

data:Vector.<Number>
 
channel:Number
 
numFrames:Number

getSample()method 
public function getSample(numFrames:Number):Sample

Parameters

numFrames:Number

Returns
Sample
resetPosition()method 
public function resetPosition():void

Constant Detail
MAX_DURATIONConstant
public static const MAX_DURATION:Number = 2.147483647E9