Package | com.noteflight.standingwave2.filters |
Class | public class CacheFilter |
Inheritance | CacheFilter ![]() |
Implements | IAudioFilter, IRandomAccessSource |
Property | Defined By | ||
---|---|---|---|
descriptor : AudioDescriptor [read-only]
Get the AudioDescriptor for this Sample. | CacheFilter | ||
frameCount : Number [read-only]
The number of sample frames in this source. | CacheFilter | ||
position : Number [read-only]
The position of the audio cursor in this source, as a frame index. | CacheFilter | ||
source : IAudioSource
The underlying audio source for this filter. | CacheFilter |
Method | Defined By | ||
---|---|---|---|
CacheFilter(source:IAudioSource = null) | CacheFilter | ||
CacheFilter | |||
fill(toOffset:Number = -1):void
Instruct this cache to fill itself up to the given frame offset from its source. | CacheFilter | ||
Get the next run of audio by calling getSampleRange() based on the current cursor position. | CacheFilter | ||
getSampleRange(fromOffset:Number, toOffset:Number):Sample
Get the concrete audio data from this source that occurs within a given time interval. | CacheFilter | ||
resetPosition():void | CacheFilter |
descriptor | property |
descriptor:AudioDescriptor
[read-only] Get the AudioDescriptor for this Sample.
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
CacheFilter | () | Constructor |
public function CacheFilter(source:IAudioSource = null)
source:IAudioSource (default = null )
|
clone | () | method |
fill | () | method |
public function fill(toOffset:Number = -1):void
Instruct this cache to fill itself up to the given frame offset from its source.
Parameters
toOffset:Number (default = -1 ) — a sample frame index; if negative/omitted, reads the entire source.
|
getSample | () | method |
public function getSample(numFrames:Number):Sample
Get the next run of audio by calling getSampleRange() based on the current cursor position.
Parameters
numFrames:Number |
Sample |
getSampleRange | () | method |
public function getSampleRange(fromOffset:Number, toOffset:Number):Sample
Get the concrete audio data from this source that occurs within a given time interval. The interval must lie within the bounds of the length of the underlying source.
Parameters
fromOffset:Number — the inclusive start of the interval, in sample frames.
| |
toOffset:Number — the exclusive end of the interval (that is, one past the last sample frame in the interval)
|
Sample — a Sample representing the data in the interval.
|
resetPosition | () | method |
public function resetPosition():void