Package | com.noteflight.standingwave2.elements |
Interface | public interface IAudioSource |
Implementors | AbstractSource, AudioPerformer, ResamplingFilter, Sample |
position
property is a
cursor that indicates the frame index of the next portion of
data that will be retrieved by calling getSample()
.
The ability to extract slices of data allows audio processing to take
place in small enough chunks that CPU intensive operations do not tie up
the Flash Player's event processing.
Property | Defined By | ||
---|---|---|---|
descriptor : AudioDescriptor [read-only]
The AudioDescriptor describing the audio characteristics of this source. | IAudioSource | ||
frameCount : Number [read-only]
The number of sample frames in this source. | IAudioSource | ||
position : Number [read-only]
The position of the audio cursor in this source, as a frame index. | IAudioSource |
Method | Defined By | ||
---|---|---|---|
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. | IAudioSource | ||
Retrieve a number of sample frames from this source as a Sample object,
starting from the audio cursor position. | IAudioSource | ||
resetPosition():void
Resets the audio cursor to the beginning of the source, and causes any
cursor-dependent state in the source to be initialized. | IAudioSource |
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
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.