|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SoundSource
A Soundsource represents a single source of sound to be played.
| Method Summary | |
|---|---|
SoundDriver |
getSoundDriver()
|
SoundState |
getState()
|
boolean |
isPlaying()
|
void |
pause()
|
void |
play()
|
void |
queueBuffer(SoundBuffer buffer)
Description: Specify the current Buffer object, which means the head entry in its queue. |
void |
rewind()
|
void |
setContainer(SoundContainer container)
An alternate to explicitly providing the buffers via the queueBuffer method is to provide a sound data container which will generate the data needed to create the buffers. |
void |
setDirection(float dirX,
float dirY,
float dirZ)
Description: If DIRECTION does not equal the zero vector, the Source is directional. |
void |
setDirection(org.openmali.vecmath2.Tuple3f direction)
Description: If DIRECTION does not equal the zero vector, the Source is directional. |
void |
setLoop(boolean loop)
LOOPING is a flag that indicates that the Source will not be in STOPPED state once it reaches the end of last buffer in the buffer queue. |
void |
setMaxDistance(float maxDistance)
|
void |
setMaxTime(long ms)
|
void |
setMaxVolume(float maxVolume)
|
void |
setMinVolume(float minVolume)
|
void |
setPosition(float posX,
float posY,
float posZ)
|
void |
setPosition(org.openmali.vecmath2.Tuple3f position)
|
void |
setReferenceDistance(float refDistance)
REFERENCE_DISTANCE is the distance at which the Listener will experience GAIN (unless the implementation had to clamp effective GAIN to the available dynamic range). |
void |
setRelative(boolean relative)
SOURCE_RELATIVE set to TRUE indicates that the values specified by POSITION are to be interpreted relative to the listener position |
void |
setRolloffFactor(float factor)
ROLLOFF_FACTOR is per-Source parameter the application can use to increase or decrease the range of a source by decreasing or increasing the attenuation, respectively. |
void |
setVelocity(float veloX,
float veloY,
float veloZ)
|
void |
setVelocity(org.openmali.vecmath2.Tuple3f velocity)
|
void |
setVolume(float gain)
|
void |
stop()
|
| Method Detail |
|---|
void queueBuffer(SoundBuffer buffer)
For a PLAYING or PAUSED Source, using the Source command with BUFFER is an INVALID_OPERATION. It can be applied to INITIAL and STOPPED Sources only. Specifying an invalid bufferName will result in an INVALID_VALUE error while specifying an invalid sourceName results in an INVALID_NAME error.
void setContainer(SoundContainer container)
container - void play()
void pause()
void rewind()
void stop()
boolean isPlaying()
void setPosition(float posX,
float posY,
float posZ)
void setPosition(org.openmali.vecmath2.Tuple3f position)
void setVelocity(float veloX,
float veloY,
float veloZ)
void setVelocity(org.openmali.vecmath2.Tuple3f velocity)
void setDirection(float dirX,
float dirY,
float dirZ)
void setDirection(org.openmali.vecmath2.Tuple3f direction)
SoundState getState()
void setVolume(float gain)
void setReferenceDistance(float refDistance)
refDistance - void setRolloffFactor(float factor)
factor - void setRelative(boolean relative)
relative - void setLoop(boolean loop)
loop - void setMaxVolume(float maxVolume)
void setMinVolume(float minVolume)
void setMaxDistance(float maxDistance)
void setMaxTime(long ms)
SoundDriver getSoundDriver()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||