| Package | com.noteflight.standingwave2.output |
| Class | public class AudioPlayer |
| Inheritance | AudioPlayer flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
| channel : SoundChannel [read-only]
The SoundChannel currently employed for playback, or null if there is none. | AudioPlayer | ||
| cpuPercentage : Number [read-only]
The estimated percentage of CPU resources being consumed by sound synthesis. | AudioPlayer | ||
| latency : Number [read-only]
The estimated time between a SampleDataEvent and the actual production of the
sound provided to that event, if known. | AudioPlayer | ||
| position : Number [read-only]
The actual playback position in seconds, relative to the start of the current source. | AudioPlayer | ||
| source : IAudioSource [read-only]
The source currently being played by this object, or null if there is none. | AudioPlayer | ||
| volume : Number | AudioPlayer | ||
| Method | Defined By | ||
|---|---|---|---|
AudioPlayer(framesPerCallback:Number = 4096)
Construct a new AudioPlayer instance. | AudioPlayer | ||
play(source:IAudioSource, volume:Number):void
Play an audio source through this output. | AudioPlayer | ||
stop(source:IAudioSource = null):void
Stop a given source (if supplied), or stop any source that is playing (if no source
parameter is supplied). | AudioPlayer | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| AudioPlayer | ||||
| channel | property |
channel:SoundChannel [read-only] The SoundChannel currently employed for playback, or null if there is none.
public function get channel():SoundChannel| cpuPercentage | property |
cpuPercentage:Number [read-only] The estimated percentage of CPU resources being consumed by sound synthesis.
This property can be used as the source for data binding.
public function get cpuPercentage():Number| latency | property |
latency:Number [read-only] The estimated time between a SampleDataEvent and the actual production of the sound provided to that event, if known. The time is expressed in seconds.
This property can be used as the source for data binding.
public function get latency():Number| position | property |
position:Number [read-only] The actual playback position in seconds, relative to the start of the current source.
This property can be used as the source for data binding.
public function get position():Number| source | property |
source:IAudioSource [read-only] The source currently being played by this object, or null if there is none.
public function get source():IAudioSource| volume | property |
volume:Number public function get volume():Number public function set volume(value:Number):void| AudioPlayer | () | Constructor |
public function AudioPlayer(framesPerCallback:Number = 4096)Construct a new AudioPlayer instance.
ParametersframesPerCallback:Number (default = 4096) — the number of frames that this AudioPlayer will
obtain for playback on each SampleDataEvent emitted by the playback Sound object.
|
| play | () | method |
public function play(source:IAudioSource, volume:Number):voidPlay an audio source through this output. Only one source may be played at a time.
Parameters
source:IAudioSource — an IAudioSource instance
| |
volume:Number |
| stop | () | method |
public function stop(source:IAudioSource = null):voidStop a given source (if supplied), or stop any source that is playing (if no source parameter is supplied).
Parameters
source:IAudioSource (default = null) — an optional IAudioSource instance
|
| complete | Event |
flash.events.Event