|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.openal.Stream
com.threerings.openal.URLStream
public class URLStream
An audio stream read from one or more URLs.
| Nested Class Summary | |
|---|---|
protected class |
URLStream.QueuedURL
A URL queued for play. |
| Nested classes/interfaces inherited from class com.threerings.openal.Stream |
|---|
Stream.FadeMode |
| Field Summary | |
|---|---|
protected StreamDecoder |
_decoder
The stream decoder for the current URL. |
protected ArrayList<URLStream.QueuedURL> |
_queue
The queue of URLs to play after the current one. |
protected URLStream.QueuedURL |
_url
The URL currently being played. |
| Fields inherited from class com.threerings.openal.Stream |
|---|
_abuf, _buffers, _fadeElapsed, _fadeInterval, _fadeMode, _gain, _nbuf, _qidx, _qlen, _soundmgr, _source, _state |
| Constructor Summary | |
|---|---|
URLStream(SoundManager soundmgr,
URL url,
boolean loop)
Creates a new stream for the specified URL. |
|
| Method Summary | |
|---|---|
protected int |
getFormat()
Returns the OpenAL audio format of the stream. |
protected int |
getFrequency()
Returns the stream's playback frequency in samples per second. |
protected int |
populateBuffer(ByteBuffer buf)
Populates the given buffer with audio data. |
void |
queueURL(URL url,
boolean loop)
Adds an element to the queue of URLs 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 |
| Field Detail |
|---|
protected URLStream.QueuedURL _url
protected StreamDecoder _decoder
protected ArrayList<URLStream.QueuedURL> _queue
| Constructor Detail |
|---|
public URLStream(SoundManager soundmgr,
URL url,
boolean loop)
throws IOException
loop - whether or not to play the file in a continuous loop
if there's nothing on the queue
IOException| Method Detail |
|---|
public void queueURL(URL url,
boolean loop)
loop - if true, play this file in a loop if there's nothing else
on the queueprotected int getFormat()
Stream
getFormat in class Streamprotected int getFrequency()
Stream
getFrequency in class Stream
protected int populateBuffer(ByteBuffer buf)
throws IOException
Stream
populateBuffer in class StreamIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||