com.threerings.openal
Class ResourceStream
java.lang.Object
com.threerings.openal.Stream
com.threerings.openal.URLStream
com.threerings.openal.ResourceStream
public class ResourceStream
- extends URLStream
An audio stream read from one or more resources (via "resource://" URLs, so
ResourceManager.activateResourceProtocol() must be called).
| Fields inherited from class com.threerings.openal.Stream |
_abuf, _buffers, _fadeElapsed, _fadeInterval, _fadeMode, _gain, _nbuf, _qidx, _qlen, _soundmgr, _source, _state |
|
Method Summary |
void |
queueResource(String resource,
boolean loop)
Adds a resource (from the default bundle) to the queue of files to play. |
void |
queueResource(String bundle,
String resource,
boolean loop)
Adds a resource to the queue of files to play. |
| 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 |
ResourceStream
public ResourceStream(SoundManager soundmgr,
String resource,
boolean loop)
throws IOException
- Creates a new stream for the specified resource (from the default bundle).
- Parameters:
loop - whether or not to play the file in a continuous loop
if there's nothing on the queue
- Throws:
IOException
ResourceStream
public ResourceStream(SoundManager soundmgr,
String bundle,
String resource,
boolean loop)
throws IOException
- Creates a new stream for the specified resource.
- Parameters:
loop - whether or not to play the file in a continuous loop
if there's nothing on the queue
- Throws:
IOException
queueResource
public void queueResource(String resource,
boolean loop)
- Adds a resource (from the default bundle) 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
queueResource
public void queueResource(String bundle,
String resource,
boolean loop)
- Adds a resource 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