Packagecom.noteflight.standingwave2.output
Classpublic class AudioSampleHandler
InheritanceAudioSampleHandler Inheritance flash.events.EventDispatcher

A delegate object that takes care of the work for audio playback by moving data from an IAudioSource into a SampleDataEvent's ByteArray.



Public Properties
 PropertyDefined By
  channel : SoundChannel
[write-only]
AudioSampleHandler
  cpuPercentage : Number = 0
Reports % of CPU used after each SampleDataEvent based on last event interval
AudioSampleHandler
  framesPerCallback : Number
frames supplied for each SampleDataEvent
AudioSampleHandler
  gainFactor : Number = 1
Overall gain factor for output
AudioSampleHandler
  latency : Number
[read-only] The latency in seconds.
AudioSampleHandler
  position : Number
[read-only] The position in seconds relative to the start of the current source, else zero
AudioSampleHandler
  source : IAudioSource
AudioSampleHandler
  sourceStarted : Boolean
[write-only]
AudioSampleHandler
Public Methods
 MethodDefined By
  
AudioSampleHandler(framesPerCallback:Number = 4096)
AudioSampleHandler
  
handleSampleData(e:SampleDataEvent):void
Handle a request by the player for a block of samples.
AudioSampleHandler
Events
 Event Summary Defined By
  AudioSampleHandler
Property Detail
channelproperty
channel:SoundChannel  [write-only]


Implementation
    public function set channel(value:SoundChannel):void
cpuPercentageproperty 
public var cpuPercentage:Number = 0

Reports % of CPU used after each SampleDataEvent based on last event interval

framesPerCallbackproperty 
public var framesPerCallback:Number

frames supplied for each SampleDataEvent

gainFactorproperty 
public var gainFactor:Number = 1

Overall gain factor for output

latencyproperty 
latency:Number  [read-only]

The latency in seconds.


Implementation
    public function get latency():Number
positionproperty 
position:Number  [read-only]

The position in seconds relative to the start of the current source, else zero


Implementation
    public function get position():Number
sourceproperty 
source:IAudioSource


Implementation
    public function get source():IAudioSource
    public function set source(value:IAudioSource):void
sourceStartedproperty 
sourceStarted:Boolean  [write-only]


Implementation
    public function set sourceStarted(value:Boolean):void
Constructor Detail
AudioSampleHandler()Constructor
public function AudioSampleHandler(framesPerCallback:Number = 4096)



Parameters
framesPerCallback:Number (default = 4096)
Method Detail
handleSampleData()method
public function handleSampleData(e:SampleDataEvent):void

Handle a request by the player for a block of samples.

Parameters

e:SampleDataEvent

Event Detail
complete Event
Event Object Type: flash.events.Event