|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.expr.SimpleScope
com.threerings.openal.Sounder
public class Sounder
Plays a sound.
| Nested Class Summary | |
|---|---|
static class |
Sounder.BaseClip
Base class for Sounder.BaseClip, Sounder.MetaClip, and Sounder.VariableClip. |
static class |
Sounder.BaseStream
Base class for Sounder.BaseStream.StackedStream and Sounder.MetaStream. |
static class |
Sounder.Clip
Plays a sound clip. |
static class |
Sounder.Compound
Plays several sub-sounders at once. |
static class |
Sounder.Conditional
Plays the first sounder whose condition evaluates to true. |
static class |
Sounder.Implementation
The actual sounder implementation. |
static class |
Sounder.MetaClip
Plays a randomly selected clip. |
static class |
Sounder.MetaStream
Selects from a number of streams. |
static class |
Sounder.Random
Plays the first sounder whose condition evaluates to true. |
static class |
Sounder.Scripted
Plays a scripted sequence of sounders. |
static class |
Sounder.Sequential
Plays multiple sub-sounders in sequence. |
static class |
Sounder.Stream
Plays a sound stream. |
static class |
Sounder.VariableClip
Plays a clip with variable parameters. |
| Field Summary | |
|---|---|
protected SounderConfig |
_config
The configuration of this sounder. |
protected AlContext |
_ctx
The application context. |
protected MutableLong |
_epoch
A container for the sound epoch. |
protected Sounder.Implementation |
_impl
The sounder implementation. |
protected MutableLong |
_now
The container for the current time. |
protected MutableBoolean |
_started
Whether or not the sound has been started. |
protected Transform3D |
_transform
The sound transform reference. |
protected static Sounder.Implementation |
NULL_IMPLEMENTATION
An implementation that does nothing. |
| Fields inherited from class com.threerings.expr.SimpleScope |
|---|
_parentScope |
| Fields inherited from interface com.threerings.expr.Scope |
|---|
EPOCH, NOW |
| Constructor Summary | |
|---|---|
Sounder(AlContext ctx,
Scope parentScope,
Transform3D transform)
Creates a new sounder with a null configuration. |
|
Sounder(AlContext ctx,
Scope parentScope,
Transform3D transform,
ConfigReference<SounderConfig> ref)
Creates a new sounder with the referenced configuration. |
|
Sounder(AlContext ctx,
Scope parentScope,
Transform3D transform,
SounderConfig config)
Creates a new sounder with the given configuration. |
|
| Method Summary | |
|---|---|
void |
configUpdated(ConfigEvent<SounderConfig> event)
Called when a configuration has been updated. |
void |
dispose()
Releases the resources associated with this scope. |
String |
getScopeName()
Returns the name of this scope for purposes of qualification. |
boolean |
isPlaying()
Checks whether the sound is currently playing. |
boolean |
loops()
Checks whether the configured sound loops. |
protected void |
resetEpoch()
Resets the epoch value to the current time. |
void |
scopeUpdated(ScopeEvent event)
Called when the scope has been updated. |
void |
setConfig(ConfigReference<SounderConfig> ref)
Sets the configuration of this sounder. |
void |
setConfig(SounderConfig config)
Sets the configuration of this sounder. |
void |
start()
Starts playing the sound. |
void |
stop()
Stops playing the sound. |
void |
update()
Updates the sound for the current frame. |
protected void |
updateFromConfig()
Updates the sounder to match its new or modified configuration. |
| 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 |
|---|
protected AlContext _ctx
@Scoped protected Transform3D _transform
protected SounderConfig _config
protected Sounder.Implementation _impl
@Bound protected MutableLong _now
@Scoped protected MutableLong _epoch
@Scoped protected MutableBoolean _started
protected static final Sounder.Implementation NULL_IMPLEMENTATION
| Constructor Detail |
|---|
public Sounder(AlContext ctx,
Scope parentScope,
Transform3D transform)
transform - a reference to the sound transform to use.
public Sounder(AlContext ctx,
Scope parentScope,
Transform3D transform,
ConfigReference<SounderConfig> ref)
transform - a reference to the sound transform to use.
public Sounder(AlContext ctx,
Scope parentScope,
Transform3D transform,
SounderConfig config)
transform - a reference to the sound transform to use.| Method Detail |
|---|
public void setConfig(ConfigReference<SounderConfig> ref)
public void setConfig(SounderConfig config)
public boolean loops()
public void start()
public void stop()
public boolean isPlaying()
public void update()
ViewerEffectConfig.Sound
calls this method, ActionConfig.PlaySound
does not.
public void configUpdated(ConfigEvent<SounderConfig> event)
ConfigUpdateListener
configUpdated in interface ConfigUpdateListener<SounderConfig>public String getScopeName()
Scopenull
if qualified symbols cannot specifically address this scope.
getScopeName in interface ScopegetScopeName in class SimpleScopepublic void scopeUpdated(ScopeEvent event)
ScopeUpdateListener
scopeUpdated in interface ScopeUpdateListenerscopeUpdated in class SimpleScopepublic void dispose()
SimpleScope
dispose in class SimpleScopeprotected void updateFromConfig()
protected void resetEpoch()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||