public class WaveData extends Object
| Modifier and Type | Field | Description |
|---|---|---|
ByteBuffer |
data |
actual wave data
|
int |
format |
format type of data
|
int |
samplerate |
sample rate of data
|
| Modifier and Type | Method | Description |
|---|---|---|
static WaveData |
create(byte[] buffer) |
Creates a WaveData container from the specified bytes
|
static WaveData |
create(InputStream is) |
Creates a WaveData container from the specified inputstream
|
static WaveData |
create(String path) |
Creates a WaveData container from the specified in the classpath
|
static WaveData |
create(URL path) |
Creates a WaveData container from the specified url
|
static WaveData |
create(ByteBuffer buffer) |
Creates a WaveData container from the specified ByetBuffer.
|
static WaveData |
create(AudioInputStream ais) |
Creates a WaveData container from the specified stream
|
void |
dispose() |
Disposes the wavedata
|
public final ByteBuffer data
public final int format
public final int samplerate
public void dispose()
public static WaveData create(URL path)
path - URL to filepublic static WaveData create(String path)
path - path to file (relative, and in classpath)public static WaveData create(InputStream is)
is - InputStream to read frompublic static WaveData create(byte[] buffer)
buffer - array of bytes containing the complete wave filepublic static WaveData create(ByteBuffer buffer)
buffer - ByteBuffer containing sound filepublic static WaveData create(AudioInputStream ais)
ais - AudioInputStream to read fromCopyright © 2002-2009 lwjgl.org. All Rights Reserved.