|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jinx.audio.Source
net.jinx.audio.StreamSource
public class StreamSource
Extension of Source that uses buffers to stream audio from a java.net.URL,
instead of loading the entire file into memory. This uses an extra Thread to
read the audio data in the background (stream, not channel based).
API Stability: Alpha; this is subject to change at any time.
| Constructor Summary | |
|---|---|
StreamSource(net.java.games.joal.AL al,
net.java.games.joal.ALC alc,
java.io.File file)
Constructs a new StreamSource that will stream from the given File. |
|
StreamSource(net.java.games.joal.AL al,
net.java.games.joal.ALC alc,
java.net.URL url)
Constructs a new StreamSource that will stream from the given URL. |
|
| Method Summary | |
|---|---|
void |
delete()
Frees the resources that this Source consumes. |
boolean |
isLooping()
Indicates if this Source will loop. |
boolean |
isStreaming()
Indicates if the stream thread is currently running. |
void |
pause()
Pauses this source. |
void |
play()
Begins playing this Source. |
void |
rewind()
Rewinds this source. |
void |
run()
|
void |
setLooping(boolean loop)
Sets wether or not this Source loops back to the beginning when it finishes. |
void |
stop()
Stops this Source. |
| Methods inherited from class net.jinx.audio.Source |
|---|
buffersProcessed, buffersQueued, getAL, getALC, getBooleanInt, getBuffer, getConeOuterGain, getDirection, getFloat, getGain, getInt, getMaxDistance, getMaxGain, getMinGain, getPitch, getPosition, getReferenceDistance, getRolloffFactor, getSourceID, getVelocity, isInitialized, isSourceRelative, queueBuffer, queueBuffers, setBooleanInt, setBuffer, setConeOuterGain, setDirection, setDirection, setFloat, setGain, setInt, setMaxDistance, setMaxGain, setMinGain, setPitch, setPosition, setPosition, setReferenceDistance, setRolloffFactor, setSourceRelative, setVelocity, setVelocity, unqueueBuffer, unqueueBuffers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamSource(net.java.games.joal.AL al,
net.java.games.joal.ALC alc,
java.io.File file)
throws java.net.MalformedURLException
file - the File to stream from.al - the AL object to use for audio rendering.alc - the ALC object to use for audio rendering.
java.lang.NullPointerException - will be thrown if any of the parameters are
null.
java.net.MalformedURLException
public StreamSource(net.java.games.joal.AL al,
net.java.games.joal.ALC alc,
java.net.URL url)
url - the URL to stream from.al - the AL object to use for audio rendering.alc - the ALC object to use for audio rendering.
java.lang.NullPointerException - will be thrown if any of the parameters are
null.| Method Detail |
|---|
public void play()
Source
play in class Sourcepublic void pause()
Source
pause in class Sourcepublic void stop()
Source
stop in class Sourcepublic void rewind()
Source
rewind in class Sourcepublic void setLooping(boolean loop)
Source
setLooping in class Sourceloop - boolean value for setting this option.public boolean isLooping()
Source
isLooping in class Sourcepublic boolean isStreaming()
public void run()
run in interface java.lang.Runnablepublic void delete()
Source
delete in class Source
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||