|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.openal.Source
public class Source
Represents an OpenAL source object.
| Field Summary | |
|---|---|
protected float |
_coneInnerAngle
The inside angle of the sound cone. |
protected float |
_coneOuterAngle
The outside angle of the sound cone. |
protected float |
_coneOuterGain
The gain outside the sound cone. |
protected float |
_dx
The direction of the source. |
protected float |
_dy
The direction of the source. |
protected float |
_dz
The direction of the source. |
protected float |
_gain
The gain of the source. |
protected int |
_id
The OpenAL identifier for this source. |
protected boolean |
_looping
Whether or not the source is looping. |
protected float |
_maxDistance
The maximum distance for attenuation. |
protected float |
_maxGain
The maximum gain. |
protected float |
_minGain
The minimum gain. |
protected float |
_pitch
The pitch multiplier. |
protected float |
_px
The position of the source. |
protected float |
_py
The position of the source. |
protected float |
_pz
The position of the source. |
protected ArrayList<Buffer> |
_queue
The source's queue of buffers (storing them keeps them from being garbage-collected). |
protected float |
_referenceDistance
The reference distance for attenuation. |
protected float |
_rolloffFactor
The attenuation rolloff factor. |
protected SoundManager |
_soundmgr
The sound manager responsible for this source. |
protected boolean |
_sourceRelative
Whether or not the source's position, velocity, etc. are relative to the listener. |
protected float |
_vx
The velocity of the source. |
protected float |
_vy
The velocity of the source. |
protected float |
_vz
The velocity of the source. |
| Constructor Summary | |
|---|---|
Source(SoundManager soundmgr)
Creates a new source for the specified sound manager. |
|
| Method Summary | |
|---|---|
void |
delete()
Deletes this source, rendering it unusable. |
protected void |
finalize()
|
int |
getBuffersProcessed()
Returns the number of buffers that have been processed. |
int |
getByteOffset()
Returns the position offset of the source within the queued buffers, in bytes. |
int |
getId()
Returns this source's OpenAL identifier. |
int |
getSampleOffset()
Returns the position offset of the source within the queued buffers, in samples. |
float |
getSecOffset()
Returns the position offset of the source within the queued buffers, in seconds. |
int |
getSourceState()
Returns the state of the source: AL10.AL_INITIAL, AL10.AL_PLAYING,
AL10.AL_PAUSED, or AL10.AL_STOPPED. |
boolean |
isPaused()
Determines whether the source is paused. |
boolean |
isPlaying()
Determines whether the source is playing. |
boolean |
isStopped()
Determines whether the source is stopped. |
void |
pause()
Pauses the source. |
void |
play()
Starts playing the source. |
void |
queueBuffers(Buffer... buffers)
Enqueues the specified buffers. |
void |
rewind()
Rewinds the source. |
void |
setBuffer(Buffer buffer)
Sets the source buffer. |
void |
setConeInnerAngle(float angle)
Sets the inside angle of the sound cone. |
void |
setConeOuterAngle(float angle)
Sets the outside angle of the sound cone. |
void |
setConeOuterGain(float gain)
Sets the gain outside of the sound cone. |
void |
setDirection(float x,
float y,
float z)
Sets the direction of the source. |
void |
setGain(float gain)
Sets the gain of the source. |
void |
setLooping(boolean looping)
Sets whether or not the source is looping. |
void |
setMaxDistance(float distance)
Sets the maximum distance for attenuation. |
void |
setMaxGain(float gain)
Sets the maximum gain. |
void |
setMinGain(float gain)
Sets the minimum gain. |
void |
setPitch(float pitch)
Sets the pitch multiplier. |
void |
setPosition(float x,
float y,
float z)
Sets the position of the source. |
void |
setReferenceDistance(float distance)
Sets the reference distance for attenuation. |
void |
setRolloffFactor(float rolloff)
Sets the rolloff factor for attenuation. |
void |
setSourceRelative(boolean relative)
Sets whether or not the position, velocity, etc., of the source are relative to the listener. |
void |
setVelocity(float x,
float y,
float z)
Sets the velocity of the source. |
void |
stop()
Stops the source. |
void |
unqueueBuffers(Buffer... buffers)
Removes the specified buffers from the queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SoundManager _soundmgr
protected int _id
protected float _px
protected float _py
protected float _pz
protected float _vx
protected float _vy
protected float _vz
protected float _gain
protected boolean _sourceRelative
protected boolean _looping
protected float _minGain
protected float _maxGain
protected float _referenceDistance
protected float _rolloffFactor
protected float _maxDistance
protected float _pitch
protected float _dx
protected float _dy
protected float _dz
protected float _coneInnerAngle
protected float _coneOuterAngle
protected float _coneOuterGain
protected ArrayList<Buffer> _queue
| Constructor Detail |
|---|
public Source(SoundManager soundmgr)
| Method Detail |
|---|
public final int getId()
public void setPosition(float x,
float y,
float z)
public void setVelocity(float x,
float y,
float z)
public void setGain(float gain)
public void setSourceRelative(boolean relative)
public void setLooping(boolean looping)
public void setMinGain(float gain)
public void setMaxGain(float gain)
public void setReferenceDistance(float distance)
public void setRolloffFactor(float rolloff)
public void setMaxDistance(float distance)
public void setPitch(float pitch)
public void setDirection(float x,
float y,
float z)
public void setConeInnerAngle(float angle)
public void setConeOuterAngle(float angle)
public void setConeOuterGain(float gain)
public void setBuffer(Buffer buffer)
buffer - the buffer to set, or null to clear.public void queueBuffers(Buffer... buffers)
public void unqueueBuffers(Buffer... buffers)
public boolean isPlaying()
public boolean isPaused()
public boolean isStopped()
public int getSourceState()
AL10.AL_INITIAL, AL10.AL_PLAYING,
AL10.AL_PAUSED, or AL10.AL_STOPPED.
public int getBuffersProcessed()
public float getSecOffset()
public int getSampleOffset()
public int getByteOffset()
public void play()
public void pause()
public void stop()
public void rewind()
public void delete()
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||