|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.audio.AudioBuffer
public class AudioBuffer
A wrapper for the actual sample data byte buffer in memory. The buffer can be queried to find out more information about the underlying audio data.
Field Summary | |
---|---|
static int |
FORMAT_MONO16
Format descriptor for 16bit mono samples |
static int |
FORMAT_MONO8
Format descriptor for 8bit mono samples |
static int |
FORMAT_STEREO16
Format descriptor for 16bit stereo samples |
static int |
FORMAT_STEREO8
Format descriptor for 8bit stereo samples |
Constructor Summary | |
---|---|
AudioBuffer(net.java.games.joal.AL al,
int bufferID)
|
Method Summary | |
---|---|
AudioBuffer |
configure(java.nio.ByteBuffer data,
int format,
int freq)
Configure the audio buffer |
boolean |
delete()
Deletes this buffer, and frees its resources. |
int |
getBitDepth()
Get the bit-depth of the data, (8 or 16) |
int |
getByteSize()
Gets the size (in bytes) of the raw data contained in this buffer. |
java.nio.ByteBuffer |
getData()
Gets the raw data contained in this buffer. |
int |
getFrequency()
Gets the audio frequency of the data contained in this buffer. |
int |
getID()
Returns the OpenAL reference ID for this buffer. |
int |
getNumChannels()
Get the number of channels of the data (1-Mono, 2-Stereo) |
int |
getSampleSize()
Gets the size (in samples) of the raw data contained in this buffer. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FORMAT_MONO8
public static final int FORMAT_MONO16
public static final int FORMAT_STEREO8
public static final int FORMAT_STEREO16
Constructor Detail |
---|
public AudioBuffer(net.java.games.joal.AL al, int bufferID)
Method Detail |
---|
public AudioBuffer configure(java.nio.ByteBuffer data, int format, int freq)
data
- the raw audio dataformat
- the format of the data: FORMAT_MONO8, FORMAT_MONO16,
FORMAT_STEREO8
and FORMAT_STEREO16
freq
- the frequency of the datapublic boolean delete()
public final int getBitDepth()
public final int getByteSize()
public final java.nio.ByteBuffer getData()
public final int getFrequency()
public final int getID()
public final int getNumChannels()
public final int getSampleSize()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |