public class Buffer extends Object
Modifier and Type | Field and Description |
---|---|
static int |
FORMAT_MONO16 |
static int |
FORMAT_MONO8 |
static int |
FORMAT_STEREO16 |
static int |
FORMAT_STEREO8 |
Modifier and Type | Method and Description |
---|---|
void |
configure(ByteBuffer data,
int format,
int freq)
Configure the Sound3D buffer
|
void |
delete()
Delete this buffer, and free its resources.
|
int |
getBitDepth()
Get the bit-depth of the data, (8 or 16)
|
ByteBuffer |
getData()
Gets the raw data contained in this buffer.
|
int |
getFrequency()
Gets the audio frequency of the data contained in this buffer.
|
int |
getNumChannels()
Get the number of channels of the data (1-Mono, 2-Stereo)
|
int |
getSize()
Gets the size (in bytes) of the raw data containe in this buffer.
|
public static final int FORMAT_MONO8
public static final int FORMAT_MONO16
public static final int FORMAT_STEREO8
public static final int FORMAT_STEREO16
public void configure(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 void delete()
public int getBitDepth()
public int getNumChannels()
public ByteBuffer getData()
public int getFrequency()
public int getSize()