Top Description Fields Constructors Methods
com.jogamp.openal.sound3d

public Class Buffer

extends Object
Class Inheritance
Imports
com.jogamp.openal.AL, .ALConstants, java.nio.ByteBuffer

The Sound3D Buffer is a container for audio data used in the Sound3D environment.
Author
Athomas Goldberg

Field Summary

Modifier and TypeField and Description
private final AL
pack-priv final int
private ByteBuffer
public static final int
public static final int
public static final int
public static final int
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
Buffer(final AL al, final int bufferID)

Method Summary

Modifier and TypeMethod and Description
public void
configure(final ByteBuffer
the raw audio data
data
,
final int
the format of the data: FORMAT_MONO8, FORMAT_MONO16, FORMAT_STEREO8 and FORMAT_STEREO16
format
,
final int
the frequency of the data
freq
)

Configure the Sound3D buffer

public void
delete()

Delete this buffer, and free its resources.

public int

Returns:

the bit-depth of the data
getBitDepth
()

Get the bit-depth of the data, (8 or 16)

public ByteBuffer

Returns:

the raw buffer data.
getData
()

Gets the raw data contained in this buffer.

public int

Returns:

the frequency of the data
getFrequency
()

Gets the audio frequency of the data contained in this buffer.

public int

Returns:

the number of audio channels.
getNumChannels
()

Get the number of channels of the data (1-Mono, 2-Stereo)

public int

Returns:

the size of the data.
getSize
()

Gets the size (in bytes) of the raw data containe in this buffer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

alback to summary
private final AL al
bufferIDback to summary
pack-priv final int bufferID
databack to summary
private ByteBuffer data
FORMAT_MONO16back to summary
public static final int FORMAT_MONO16
FORMAT_MONO8back to summary
public static final int FORMAT_MONO8
FORMAT_STEREO16back to summary
public static final int FORMAT_STEREO16
FORMAT_STEREO8back to summary
public static final int FORMAT_STEREO8
isConfiguredback to summary
private final boolean isConfigured

Constructor Detail

Bufferback to summary
pack-priv Buffer(final AL al, final int bufferID)

Method Detail

configureback to summary
public void configure(final ByteBuffer data, final int format, final int freq)

Configure the Sound3D buffer

Parameters
data:ByteBuffer

the raw audio data

format:int

the format of the data: FORMAT_MONO8, FORMAT_MONO16, FORMAT_STEREO8 and FORMAT_STEREO16

freq:int

the frequency of the data

deleteback to summary
public void delete()

Delete this buffer, and free its resources.

getBitDepthback to summary
public int getBitDepth()

Get the bit-depth of the data, (8 or 16)

Returns:int

the bit-depth of the data

getDataback to summary
public ByteBuffer getData()

Gets the raw data contained in this buffer.

Returns:ByteBuffer

the raw buffer data.

getFrequencyback to summary
public int getFrequency()

Gets the audio frequency of the data contained in this buffer.

Returns:int

the frequency of the data

getNumChannelsback to summary
public int getNumChannels()

Get the number of channels of the data (1-Mono, 2-Stereo)

Returns:int

the number of audio channels.

getSizeback to summary
public int getSize()

Gets the size (in bytes) of the raw data containe in this buffer.

Returns:int

the size of the data.