com.threerings.openal
Class Sounder.BaseStream

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.openal.Sounder.Implementation
          extended by com.threerings.openal.Sounder.BaseStream
All Implemented Interfaces:
Scope, ScopeUpdateListener
Direct Known Subclasses:
Sounder.MetaStream, Sounder.Stream
Enclosing class:
Sounder

public abstract static class Sounder.BaseStream
extends Sounder.Implementation

Base class for Sounder.BaseStream.StackedStream and Sounder.MetaStream.


Nested Class Summary
protected  class Sounder.BaseStream.StackedStream
          A stream that is part of a stack where only the top level of the stack is playing.
protected  class Sounder.BaseStream.TransformedStream
          Updates the transform of the stream as it plays.
 
Field Summary
protected  SounderConfig.BaseStream _config
          The implementation configuration.
protected  Sounder.BaseStream.StackedStream _stream
          The (current) stream.
protected  MutableFloat _streamGain
          The stream gain.
 
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.BaseStream(AlContext ctx, Scope parentScope)
          Creates a new implementation.
 
Method Summary
 boolean isPlaying()
          Checks whether the sound is currently playing.
 void setConfig(SounderConfig.BaseStream config)
          (Re)configures the implementation.
protected  void startStream(Sounder.BaseStream.StackedStream stream, float fadeIn)
          Starts the specified stream.
 void stop()
          Stops the sound.
protected  void stopStream(float fadeOut)
          Stops the current stream, if any.
 
Methods inherited from class com.threerings.openal.Sounder.Implementation
dispose, getScopeName, loops, start, update
 
Methods inherited from class com.threerings.expr.SimpleScope
addListener, get, getParentScope, removeListener, scopeUpdated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_config

protected SounderConfig.BaseStream _config
The implementation configuration.


_stream

protected Sounder.BaseStream.StackedStream _stream
The (current) stream.


_streamGain

@Bound
protected MutableFloat _streamGain
The stream gain.

Constructor Detail

Sounder.BaseStream

public Sounder.BaseStream(AlContext ctx,
                          Scope parentScope)
Creates a new implementation.

Method Detail

setConfig

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


stop

public void stop()
Description copied from class: Sounder.Implementation
Stops the sound.

Specified by:
stop in class Sounder.Implementation

isPlaying

public boolean isPlaying()
Description copied from class: Sounder.Implementation
Checks whether the sound is currently playing.

Specified by:
isPlaying in class Sounder.Implementation

startStream

protected void startStream(Sounder.BaseStream.StackedStream stream,
                           float fadeIn)
Starts the specified stream.


stopStream

protected void stopStream(float fadeOut)
Stops the current stream, if any.