|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.openal.sound3d.Source
public final class Source
This class is used to represent sound-producing objects in the Sound3D environment. It contains methods for setting the position, direction, pitch, gain and other properties along with methods for starting, pausing, rewinding and stopping sudio projecting from a source.
Method Summary | |
---|---|
void |
delete()
Delete this source, freeing its resources. |
Buffer |
getBuffer()
Gets the buffer associated with this source. |
int |
getBuffersProcessed()
Gets the number of buffers already processed on this source. |
int |
getBuffersQueued()
Gets the number of buffers currently queued on this source. |
float |
getConeOuterGain()
Gets the gain when outside the oriented cone. |
Vec3f |
getDirection()
Gets the direction vector of the source. |
float |
getGain()
Gets the gain of the audio on this source. |
boolean |
getLooping()
indicates whether looping is turned on or off. |
float |
getMaxDistance()
Gets the max distance where there will no longer be any attenuation of the source. |
float |
getMaxGain()
SGets the maximum gain for this source. |
float |
getMinGain()
Gets the minimum gain for this source. |
float |
getPitch()
Gets the pitch of the audio on this source. |
Vec3f |
getPosition()
Gets the x,y,z position of the source. |
float |
getReferenceDistance()
Gets the distance under which the volume for the source would normally drop by half, before being influenced by rolloff factor or max distance. |
float |
getRolloffFactor()
Gets the rolloff rate of the source. |
Vec3f |
getVelocity()
Gets the velocity vector of the source. |
boolean |
isPlaying()
Determines whether or not this source is playing. |
boolean |
isSourceRelative()
Determines if the position of the source is relative to the listener. |
void |
pause()
pauses the audio in this Source. |
void |
play()
Beginning playing the audio in this source. |
void |
queueBuffers(Buffer[] buffers)
Queues one or more buffers on a source. |
void |
rewind()
Rewinds the audio in this source |
void |
setBuffer(Buffer buffer)
Sets the buffer associated with this source. |
void |
setConeOuterGain(float coneOuterGain)
Sets the gain when outside the oriented cone. |
void |
setDirection(float x,
float y,
float z)
Sets the direction vector of the source. |
void |
setDirection(Vec3f direction)
Sets the direction vector of the source. |
void |
setGain(float gain)
Sets the gain of the audio on this source. |
void |
setLooping(boolean isLooping)
turns looping on or off. |
void |
setMaxDistance(float maxDistance)
Sets the max distance where there will no longer be any attenuation of the source. |
void |
setMaxGain(float maxGain)
Sets the maximum gain for this source. |
void |
setMinGain(float minGain)
Sets the minimum gain for this source. |
void |
setPitch(float pitch)
Sets the pitch of the audio on this source. |
void |
setPosition(float x,
float y,
float z)
Sets the x,y,z position of the source. |
void |
setPosition(Vec3f position)
Sets the x,y,z position of the source. |
void |
setReferenceDistance(float referenceDistance)
Sets the distance under which the volume for the source would normally drop by half, before being influenced by rolloff factor or max distance. |
void |
setRolloffFactor(float rolloffFactor)
Sets the rolloff rate of the source. |
void |
setSourceRelative(boolean isRelative)
Determines if the position of the source is relative to the listener. |
void |
setVelocity(float x,
float y,
float z)
Sets the velocity vector of the source. |
void |
setVelocity(Vec3f velocity)
Sets the velocity vector of the source. |
void |
stop()
Stops the audio in this Source |
void |
unqueueBuffers(Buffer[] buffers)
Unqueues one or more buffers on a source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void play()
public void pause()
public void stop()
public void rewind()
public void delete()
public boolean isPlaying()
true
if this source is playing.public void setPitch(float pitch)
pitch
- the pitch value of this source.public float getPitch()
public void setGain(float gain)
gain
- the gain of the audio on this sourcepublic float getGain()
public void setMaxDistance(float maxDistance)
maxDistance
- the max ditance for source attentuation.public float getMaxDistance()
public void setRolloffFactor(float rolloffFactor)
rolloffFactor
- the rolloff rate of the source.public float getRolloffFactor()
public void setReferenceDistance(float referenceDistance)
referenceDistance
- the reference distance for the source.public float getReferenceDistance()
public void setMinGain(float minGain)
minGain
- the minimum gain for this source.public float getMinGain()
public void setMaxGain(float maxGain)
maxGain
- the maximum gain for this sourcepublic float getMaxGain()
public void setConeOuterGain(float coneOuterGain)
coneOuterGain
- the gain when outside the oriented cone.public float getConeOuterGain()
public void setPosition(Vec3f position)
position
- a Vec3f object containing the x,y,z position of the
source.public void setPosition(float x, float y, float z)
x
- the x position of the source.y
- the y position of the source.z
- the z position of the source.public Vec3f getPosition()
public void setVelocity(Vec3f velocity)
velocity
- the velocity vector of the sourcepublic void setVelocity(float x, float y, float z)
x
- the x velocity of the source.y
- the y velocity of the source.z
- the z velocity of the source.public Vec3f getVelocity()
public void setDirection(Vec3f direction)
direction
- the direction vector of the source.public void setDirection(float x, float y, float z)
x
- the x direction of the source.y
- the y direction of the source.z
- the z direction of the source.public Vec3f getDirection()
public void setSourceRelative(boolean isRelative)
isRelative
- true if the position of the source is relative
to the listener, false if the position of the source is relative to the
world.public boolean isSourceRelative()
public void setLooping(boolean isLooping)
isLooping
- true-looping is on, false-looping is offpublic boolean getLooping()
public int getBuffersQueued()
public int getBuffersProcessed()
public void setBuffer(Buffer buffer)
buffer
- the buffer associated with this sourcepublic Buffer getBuffer()
public void queueBuffers(Buffer[] buffers)
buffers
- a set of initialized (loaded) buffers.public void unqueueBuffers(Buffer[] buffers)
buffers
- a set of previously queued buffers.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |