org.j3d.aviatrix3d
Class ByteAudioComponent
java.lang.Object
org.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.NodeComponent
org.j3d.aviatrix3d.AudioComponent
org.j3d.aviatrix3d.ByteAudioComponent
- All Implemented Interfaces:
- AudioSource
- public class ByteAudioComponent
- extends AudioComponent
A Audio component that uses raw byte data to be interpreted by the
format IDs passed in.
- Version:
- $Revision: 1.2 $
- Author:
- Alan Hudson
Constructor Summary |
ByteAudioComponent()
Constructs a sound with default values. |
ByteAudioComponent(int format,
int frequency,
boolean loop,
byte[] srcData)
Constructs a ByteAudioComponent using the specified format. |
ByteAudioComponent(int format,
int frequency,
boolean loop,
java.nio.ByteBuffer srcData)
Constructs a ByteAudioComponent using the specified format. |
Method Summary |
void |
clearLocalData()
Clear the data backing for this Component. |
void |
setData(int format,
int frequency,
byte[] srcData,
int seq)
Set the data for this component. |
void |
setData(int format,
int frequency,
java.nio.ByteBuffer srcData,
int seq)
Set the data for this component. |
Methods inherited from class org.j3d.aviatrix3d.AudioComponent |
addUpdateListener, getBufferId, getFormat, getFrequency, getLoop, getPitch, removeUpdateListener, sendAudioUpdate, sendParamUpdate, setLoop, setPitch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteAudioComponent
public ByteAudioComponent()
- Constructs a sound with default values.
ByteAudioComponent
public ByteAudioComponent(int format,
int frequency,
boolean loop,
java.nio.ByteBuffer srcData)
- Constructs a ByteAudioComponent using the specified format. This is the
most effecient route to pass data in.
- Parameters:
format
- The audio format. FORMAT_MONO8,FORMAT_MONO16,FORMAT_STEREO8,FORMAT_STEREO16frequency
- The frequency of the samplesloop
- True if this sample should be loopedsrcData
- The data to use
ByteAudioComponent
public ByteAudioComponent(int format,
int frequency,
boolean loop,
byte[] srcData)
- Constructs a ByteAudioComponent using the specified format.
- Parameters:
format
- The audio format. FORMAT_MONO8,FORMAT_MONO16,FORMAT_STEREO8,FORMAT_STEREO16frequency
- The frequency of the samples.loop
- True if this sample should be loopedsrcData
- The data to use as a byte array
clearLocalData
public void clearLocalData()
- Clear the data backing for this Component.
- Specified by:
clearLocalData
in class AudioComponent
setData
public void setData(int format,
int frequency,
byte[] srcData,
int seq)
- Set the data for this component.
- Parameters:
format
- The audio format. FORMAT_MONO8,FORMAT_MONO16,FORMAT_STEREO8,FORMAT_STEREO16frequency
- The frequency of the samples.srcData
- The data.seq
- The seq being updated. 0 for non streaming data.
setData
public void setData(int format,
int frequency,
java.nio.ByteBuffer srcData,
int seq)
- Set the data for this component.
- Parameters:
format
- The audio format. FORMAT_MONO8,FORMAT_MONO16,FORMAT_STEREO8,FORMAT_STEREO16frequency
- The frequency of the samples.srcData
- The data.seq
- The seq being updated. 0 for non streaming data.
Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org