| Package | org.as3wavsound |
| Class | public class WavSoundChannel |
| Inheritance | WavSoundChannel flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
| leftPeak : Number [read-only] | WavSoundChannel | ||
| position : Number [read-only]
Returns the current position in milliseconds:
phase wavSound.length / wavSound.samples.length
| WavSoundChannel | ||
| rightPeak : Number [read-only] | WavSoundChannel | ||
| soundTransform : SoundTransform [read-only] | WavSoundChannel | ||
| Method | Defined By | ||
|---|---|---|---|
WavSoundChannel(player:WavSoundPlayer, wavSound:WavSound, startTime:Number, loops:int, soundTransform:SoundTransform)
Constructor: pre-calculates starting phase (and performs some validation for this), see init(). | WavSoundChannel | ||
buffer(sampleBuffer:AudioSamples):void
Called from WavSoundPlayer when the player is ready to mix new samples into the master
sample buffer. | WavSoundChannel | ||
init(startTime:Number, loops:int):void
Calculates and validates the starting time. | WavSoundChannel | ||
stop():void
Tells the WavsoundPlayer to stop this specific SoundWavChannel instance. | WavSoundChannel | ||
| leftPeak | property |
leftPeak:Number [read-only] public function get leftPeak():Number| position | property |
position:Number [read-only] Returns the current position in milliseconds: phase wavSound.length / wavSound.samples.length
public function get position():Number| rightPeak | property |
rightPeak:Number [read-only] public function get rightPeak():Number| soundTransform | property |
soundTransform:SoundTransform [read-only] public function get soundTransform():SoundTransform| WavSoundChannel | () | Constructor |
public function WavSoundChannel(player:WavSoundPlayer, wavSound:WavSound, startTime:Number, loops:int, soundTransform:SoundTransform)Constructor: pre-calculates starting phase (and performs some validation for this), see init().
Parametersplayer:WavSoundPlayer | |
wavSound:WavSound | |
startTime:Number | |
loops:int | |
soundTransform:SoundTransform |
| buffer | () | method |
public function buffer(sampleBuffer:AudioSamples):voidCalled from WavSoundPlayer when the player is ready to mix new samples into the master sample buffer. Fills a target samplebuffer with (optionally transformed) samples from the current WavSoundChannel instance. Keeps filling the buffer until the last samples are buffered or until the buffersize is reached. When the buffer is full, phase and loopsLeft keep track of how which samples still need to be buffered in the next buffering cycle (when this method is called again).
Parameters
sampleBuffer:AudioSamples — The target buffer to mix in the current (transformed) samples.
|
| init | () | method |
public function init(startTime:Number, loops:int):voidCalculates and validates the starting time. Starting time in milliseconds is converted into sample position and then marked as starting phase. Also resets finished state and sets 'loopsLeft' equal to the given 'loops' value.
Parameters
startTime:Number | |
loops:int |
| stop | () | method |
public function stop():voidTells the WavsoundPlayer to stop this specific SoundWavChannel instance.