Package | com.noteflight.standingwave2.filters |
Class | public class AbstractFilter |
Inheritance | AbstractFilter ![]() |
Implements | IAudioFilter |
Subclasses | BiquadFilter, EchoFilter, EnvelopeFilter, GainFilter |
Property | Defined By | ||
---|---|---|---|
descriptor : AudioDescriptor [read-only]
The AudioDescriptor describing the audio characteristics of this source. | AbstractFilter | ||
frameCount : Number [read-only]
The number of sample frames in this source. | AbstractFilter | ||
position : Number [read-only]
The position of the audio cursor in this source, as a frame index. | AbstractFilter | ||
source : IAudioSource
The underlying audio source for this filter. | AbstractFilter |
Property | Defined By | ||
---|---|---|---|
_source : IAudioSource The underlying source that acts as input to this filter. | AbstractFilter |
Method | Defined By | ||
---|---|---|---|
AbstractFilter(source:IAudioSource = null)
Create a new filter based on some underlying source. | AbstractFilter | ||
Return a copy of this source which is functionally identical to it, but which
is not required to preserve the audio cursor position or any other internal
state. | AbstractFilter | ||
Retrieve a number of sample frames from this source as a Sample object,
starting from the audio cursor position. | AbstractFilter | ||
resetPosition():void
Resets the audio cursor to the beginning of the source, and causes any
cursor-dependent state in the source to be initialized. | AbstractFilter |
Method | Defined By | ||
---|---|---|---|
transformChannel(data:Vector.<Number>, channel:Number, start:Number, numFrames:Number):void
Transform the data for a channel by modifying it in place; called by the default implementation
of getSample(). | AbstractFilter |
_source | property |
protected var _source:IAudioSource
The underlying source that acts as input to this filter.
descriptor | property |
descriptor:AudioDescriptor
[read-only] The AudioDescriptor describing the audio characteristics of this source.
public function get descriptor():AudioDescriptor
frameCount | property |
frameCount:Number
[read-only] The number of sample frames in this source. An unbounded source may return Number.MAX_VALUE.
public function get frameCount():Number
position | property |
position:Number
[read-only] The position of the audio cursor in this source, as a frame index.
public function get position():Number
source | property |
source:IAudioSource
The underlying audio source for this filter.
public function get source():IAudioSource
public function set source(value:IAudioSource):void
AbstractFilter | () | Constructor |
public function AbstractFilter(source:IAudioSource = null)
Create a new filter based on some underlying source.
Parameterssource:IAudioSource (default = null ) — the source that this filter transforms to produce its output.
|
clone | () | method |
public function clone():IAudioSource
Return a copy of this source which is functionally identical to it, but which is not required to preserve the audio cursor position or any other internal state. This function is useful for constructing source/filter graphs that can be used as "prototypes", to be duplicated at will.
ReturnsIAudioSource |
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.
|
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.
transformChannel | () | method |
protected function transformChannel(data:Vector.<Number>, channel:Number, start:Number, numFrames:Number):void
Transform the data for a channel by modifying it in place; called by the default implementation
of getSample()
. Overridden by subclasses.
Parameters
data:Vector.<Number> — a Vector of channel data
| |
channel:Number — the index of the channel being transformed
| |
start:Number — the starting sample index of the transformation
| |
numFrames:Number — the number of samples to be transformed
|