com.threerings.openal
Class Sounder.Clip

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.openal.Sounder.Implementation
          extended by com.threerings.openal.Sounder.BaseClip
              extended by com.threerings.openal.Sounder.Clip
All Implemented Interfaces:
Scope, ScopeUpdateListener
Enclosing class:
Sounder

public static class Sounder.Clip
extends Sounder.BaseClip

Plays a sound clip.


Field Summary
protected  SounderConfig.Clip _config
          The clip config.
 
Fields inherited from class com.threerings.openal.Sounder.BaseClip
_sound, _vector
 
Fields inherited from class com.threerings.openal.Sounder.Implementation
_ctx, _started, _transform
 
Fields inherited from class com.threerings.expr.SimpleScope
_parentScope
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
Sounder.Clip(AlContext ctx, Scope parentScope, SounderConfig.Clip config)
          Creates a new clip implementation.
 
Method Summary
 boolean loops()
          Checks whether the configured sound loops.
 void setConfig(SounderConfig.Clip config)
          (Re)configures the implementation.
 void start()
          Starts playing the sound.
protected  void updateFromConfig()
          Updates the clip from its config.
 
Methods inherited from class com.threerings.openal.Sounder.BaseClip
getSound, getSound, isPlaying, playSound, scopeUpdated, setConfig, stop, update, updateSoundTransform
 
Methods inherited from class com.threerings.openal.Sounder.Implementation
dispose, getScopeName
 
Methods inherited from class com.threerings.expr.SimpleScope
addListener, get, getParentScope, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_config

protected SounderConfig.Clip _config
The clip config.

Constructor Detail

Sounder.Clip

public Sounder.Clip(AlContext ctx,
                    Scope parentScope,
                    SounderConfig.Clip config)
Creates a new clip implementation.

Method Detail

setConfig

public void setConfig(SounderConfig.Clip config)
(Re)configures the implementation.


loops

public boolean loops()
Description copied from class: Sounder.Implementation
Checks whether the configured sound loops.

Overrides:
loops in class Sounder.Implementation

start

public void start()
Description copied from class: Sounder.Implementation
Starts playing the sound.

Specified by:
start in class Sounder.Implementation

updateFromConfig

protected void updateFromConfig()
Description copied from class: Sounder.BaseClip
Updates the clip from its config.

Specified by:
updateFromConfig in class Sounder.BaseClip