Packagecom.SeiON
Classpublic final class SeionSample
InheritanceSeionSample Inheritance SeionInstance Inheritance Object

An ISeionInstance that plays gap-less looping MP3 sounds via specifying sample range. It is more intensive than SeionClip, but perhaps not perceivably so.

See also

https://github.com/cardin/SeiON/wiki/Gapless-MP3-Looping


Public Properties
 PropertyDefined By
 Inheritedautodispose : Boolean
[read-only] Whether this sound is auto-disposable.
SeionInstance
  isPaused : Boolean
[override] [read-only] Is the playback paused? (ISeionControl)
SeionSample
  isPlaying : Boolean
[override] [read-only] Is the sound active? (ISeionInstance)
SeionSample
  latency : Number
[read-only] The playback and decode latency.
SeionSample
  length : Number
[override] [read-only] The total sample length of the clip, excluding repeats.
SeionSample
 Inheritedmanager : SeionGroup
[read-only] Returns the manager that holds this ISeionInstance.
SeionInstance
 Inheritedname : String
The name of the clip, non-unique.
SeionInstance
 Inheritedpan : Number
Get: The panning as affected by its parent.
SeionInstance
  position : Number
[override] [read-only] How far into the clip we are.
SeionSample
  progress : Number
[override] [read-only] How far into the clip we are, from 0.0 - 1.0.
SeionSample
 Inheritedrepeat : int
How many times the SeionInstance is programmed to repeat itself.
SeionInstance
 InheritedrepeatLeft : int
[read-only] How many more times the SeionInstance has to repeat itself.
SeionInstance
 Inheritedsoundtransform : SoundTransform
[read-only] Returns the predefined sound properties of the sound.
SeionInstance
 Inheritedvolume : Number
Get: The volume as affected by its parent.
SeionInstance
Public Methods
 MethodDefined By
  
SeionSample(secretKey:*)
Please do not call this constructor directly; it will throw an error.
SeionSample
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
SeionInstance
  
createGaplessMP3(name:String, manager:SeionGroup, snd:Sound, sampleDuration:int, repeat:int, autodispose:Boolean = true, sndTransform:SoundTransform = null):SeionSample
[static] Creates a soundclip that provides for gapless playback of MP3.
SeionSample
 Inherited
dispatchEvent(event:Event):Boolean
SeionInstance
  
dispose():void
[override] Clears all references held.
SeionSample
 Inherited
hasEventListener(type:String):Boolean
SeionInstance
 Inherited
isDisposed(output:Boolean = true):Boolean
Is the SeionInstance already disposed of? (ISeionInstance)
SeionInstance
  
pause():void
[override] Pauses playback of sound.
SeionSample
  
play():void
[override] Plays the sound from the beginning again.
SeionSample
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
SeionInstance
  
resume():void
[override] Resumes playback of sound.
SeionSample
  
stop():void
[override] Stops the sound and resets it to Zero.
SeionSample
 Inherited
willTrigger(type:String):Boolean
SeionInstance
Events
 Event Summary Defined By
 InheritedDefines the value when a SeionInstance finishes playback and does not repeat.SeionInstance
 InheritedDefines the value when a SeionInstance loops itself.SeionInstance
Property Detail
isPausedproperty
isPaused:Boolean  [read-only] [override]

Is the playback paused? (ISeionControl)


Implementation
    public function get isPaused():Boolean
isPlayingproperty 
isPlaying:Boolean  [read-only] [override]

Is the sound active? (ISeionInstance)


Implementation
    public function get isPlaying():Boolean
latencyproperty 
latency:Number  [read-only]

The playback and decode latency.


Implementation
    public function get latency():Number
lengthproperty 
length:Number  [read-only] [override]

The total length of the clip, excluding repeats. (ISeionInstance)


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

How far into the clip we are. In samples. (ISeionInstance)


Implementation
    public function get position():Number
progressproperty 
progress:Number  [read-only] [override]

How far into the clip we are, from 0.0 - 1.0. (ISeionInstance)

Warning: The value may jerk around initially when sound is first played.


Implementation
    public function get progress():Number
Constructor Detail
SeionSample()Constructor
public function SeionSample(secretKey:*)

Please do not call this constructor directly; it will throw an error. Call it through SeionSample.create().

Parameters
secretKey:*

See also

Method Detail
createGaplessMP3()method
public static function createGaplessMP3(name:String, manager:SeionGroup, snd:Sound, sampleDuration:int, repeat:int, autodispose:Boolean = true, sndTransform:SoundTransform = null):SeionSample

Creates a soundclip that provides for gapless playback of MP3.

Parameters

name:String — Any name, even a non-unique one.
 
manager:SeionGroup — The SeionGroup that manages this SeionSample. Immutable.
 
snd:Sound — The sound data. Immutable.
 
sampleDuration:int — The original sample duration.
 
repeat:int — How many times to repeat the clip.
 
autodispose:Boolean (default = true) — Whether the clip will auto-mark for GC. Immutable.
 
sndTransform:SoundTransform (default = null) — The fixed internal property for the sound.

Returns
SeionSample — A SeionSample if allocation was successful. Null if allocation failed, or autodispose is true.

See also

SeionInstance.name
length
SeionInstance.autodispose
SeionInstance.soundtransform
dispose()method 
override public function dispose():void

Clears all references held. This object is now invalid. (ISeionInstance)

pause()method 
override public function pause():void

Pauses playback of sound. (ISeionControl)

play()method 
override public function play():void

Plays the sound from the beginning again. (ISeionInstance)

resume()method 
override public function resume():void

Resumes playback of sound. (ISeionControl)

stop()method 
override public function stop():void

Stops the sound and resets it to Zero. (ISeionInstance)