Packagecom.noteflight.standingwave2.performance
Classpublic class AudioPerformer
InheritanceAudioPerformer Inheritance Object
Implements IAudioSource

An AudioPerformer takes a Performance containing a queryable collection of PerformanceElements (i.e. timed playbacks of audio sources) and exposes it as an IAudioSource that can realize time samples of the performance output. The main job of the AudioPerformer is to mix together all the performance elements, time-shifted appropriately.



Public Properties
 PropertyDefined By
  descriptor : AudioDescriptor
[read-only] The AudioDescriptor describing the audio characteristics of this source.
AudioPerformer
  duration : Number
The total duration of this performance.
AudioPerformer
  frameCount : Number
Return the number of sample frames in this source.
AudioPerformer
  position : Number
[read-only] The position of the audio cursor in this source, as a frame index.
AudioPerformer
Public Methods
 MethodDefined By
  
Construct a new AudioPerformer for a performance.
AudioPerformer
  
AudioPerformer
  
getSample(numFrames:Number):Sample
Retrieve a number of sample frames from this source as a Sample object, starting from the audio cursor position.
AudioPerformer
  
Resets the audio cursor to the beginning of the source, and causes any cursor-dependent state in the source to be initialized.
AudioPerformer
Property Detail
descriptorproperty
descriptor:AudioDescriptor  [read-only]

The AudioDescriptor describing the audio characteristics of this source.


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

The total duration of this performance. The duration may be decreased from its default to truncate the performance, or increased in order to extend it with silence.


Implementation
    public function get duration():Number
    public function set duration(value:Number):void
frameCountproperty 
frameCount:Number

Return the number of sample frames in this source.


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

The position of the audio cursor in this source, as a frame index.


Implementation
    public function get position():Number
Constructor Detail
AudioPerformer()Constructor
public function AudioPerformer(performance:IPerformance)

Construct a new AudioPerformer for a performance.

Parameters
performance:IPerformance — the IPerformance implementation to be performed when this AudioPerformer is rendered as an IAudioSource.
Method Detail
clone()method
public function clone():IAudioSource

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

Retrieve a number of sample frames from this source as a Sample object, starting from the audio cursor position. It is not legal to request frames beyond the maximum index indicated by the frameCount property.

Parameters

numFrames:Number — an integral number of frames.

Returns
Sample — a Sample object containing the requested sample frames.
resetPosition()method 
public function resetPosition():void

Resets the audio cursor to the beginning of the source, and causes any cursor-dependent state in the source to be initialized.