com.threerings.openal
Class FileStream

java.lang.Object
  extended by com.threerings.openal.Stream
      extended by com.threerings.openal.URLStream
          extended by com.threerings.openal.FileStream

public class FileStream
extends URLStream

An audio stream read from one or more files.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.openal.URLStream
URLStream.QueuedURL
 
Nested classes/interfaces inherited from class com.threerings.openal.Stream
Stream.FadeMode
 
Field Summary
 
Fields inherited from class com.threerings.openal.URLStream
_decoder, _queue, _url
 
Fields inherited from class com.threerings.openal.Stream
_abuf, _buffers, _fadeElapsed, _fadeInterval, _fadeMode, _gain, _nbuf, _qidx, _qlen, _soundmgr, _source, _state
 
Constructor Summary
FileStream(SoundManager soundmgr, File file, boolean loop)
          Creates a new stream for the specified file.
 
Method Summary
 void queueFile(File file, boolean loop)
          Adds a file to the queue of files to play.
 
Methods inherited from class com.threerings.openal.URLStream
getFormat, getFrequency, populateBuffer, queueURL
 
Methods inherited from class com.threerings.openal.Stream
dispose, fadeIn, fadeOut, getBufferSize, getNumBuffers, getSource, isPlaying, pause, play, populateBuffer, queueBuffers, setGain, stop, update, updateFade
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStream

public FileStream(SoundManager soundmgr,
                  File file,
                  boolean loop)
           throws IOException
Creates a new stream for the specified file.

Parameters:
loop - whether or not to play the file in a continuous loop if there's nothing on the queue
Throws:
IOException
Method Detail

queueFile

public void queueFile(File file,
                      boolean loop)
Adds a file to the queue of files to play.

Parameters:
loop - if true, play this file in a loop if there's nothing else on the queue