|
Aviatrix3D 2.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.NodeComponent
org.j3d.aviatrix3d.AudioComponent
public abstract class AudioComponent
Common representation of a component that contains source data to be used in audio.
| Field Summary | |
|---|---|
protected java.nio.ByteBuffer |
data
Buffer to hold the data |
protected int |
format
The format of the data. |
protected int |
frequency
The frequency |
protected boolean |
loop
Does the sample loop |
protected float |
pitch
The pitch |
| Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
|---|
lastParent, liveCount, parentList |
| Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
|---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
| Fields inherited from interface org.j3d.aviatrix3d.AudioSource |
|---|
FORMAT_MONO16, FORMAT_MONO8, FORMAT_SETERO8, FORMAT_STEREO16 |
| Constructor Summary | |
|---|---|
AudioComponent()
Constructs an Audio component with default values. |
|
| Method Summary | |
|---|---|
void |
addUpdateListener(AudioUpdateListener l)
Add a listener for audio change updates. |
abstract void |
clearLocalData()
Clear local data stored in this node. |
int |
getBufferId(net.java.games.joal.AL al,
int seq)
Get a bufferId for a given seq and context. |
int |
getFormat()
Get the format of this audio source. |
int |
getFrequency()
Get the frequency of this sound source. |
boolean |
getLoop()
Does the sample loop. |
float |
getPitch()
The pitch to play the sound at. |
void |
removeUpdateListener(AudioUpdateListener l)
Remove a listener for audio change updates. |
protected void |
sendAudioUpdate(int seq)
Send off a audio update event. |
protected void |
sendParamUpdate()
Send off a audio update event. |
void |
setLoop(boolean val)
Change whether the audio component should loop or not |
void |
setPitch(float val)
Set the pitch to play the sound at. |
| Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
|---|
addParent, getParents, numParents, removeParent |
| Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
|---|
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUpdateHandler, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.nio.ByteBuffer data
protected int format
protected int frequency
protected float pitch
protected boolean loop
| Constructor Detail |
|---|
public AudioComponent()
| Method Detail |
|---|
public int getFormat()
getFormat in interface AudioSourcepublic int getFrequency()
getFrequency in interface AudioSourcepublic boolean getLoop()
getLoop in interface AudioSourcepublic float getPitch()
getPitch in interface AudioSourcepublic void setLoop(boolean val)
val - true if the source should loop
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener data callback methodpublic void setPitch(float val)
val - The pitch multiplier to now use (0 to 2)
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener data callback method
public int getBufferId(net.java.games.joal.AL al,
int seq)
getBufferId in interface AudioSourceseq - The sequence number
public void addUpdateListener(AudioUpdateListener l)
l - The listener instance to addpublic void removeUpdateListener(AudioUpdateListener l)
l - The listener instance to addpublic abstract void clearLocalData()
protected void sendAudioUpdate(int seq)
seq - The sample seq. Seq 0 means complete file. Streamed sources start at 1protected void sendParamUpdate()
|
Aviatrix3D 2.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||