JOAL v2.6.0-rc-20250712
JOAL, OpenAL® API Binding for Java™ (public API).
com.jogamp.openal.sound3d.Buffer Class Reference

The Sound3D Buffer is a container for audio data used in the Sound3D environment. More...

Collaboration diagram for com.jogamp.openal.sound3d.Buffer:

Public Member Functions

 Buffer (final int bufferID)
 
int getID ()
 Return the OpenAL buffer ID, -1 if invalid. More...
 
boolean isValid ()
 Returns whether getID() is valid, i.e. More...
 
void delete ()
 Delete this buffer, and free its resources. More...
 
void configure (final ByteBuffer data, final int alFormat, final int freq)
 Configure the Sound3D buffer. More...
 
int getBitDepth ()
 Get the bit-depth of the data, (8 or 16) More...
 
int getNumChannels ()
 Get the number of channels of the data (1-Mono, 2-Stereo) More...
 
ByteBuffer getData ()
 Gets the raw data contained in this buffer. More...
 
int getFrequency ()
 Gets the audio frequency of the data contained in this buffer. More...
 
int getSize ()
 Gets the size (in bytes) of the raw data containe in this buffer. More...
 
String toString ()
 

Static Public Attributes

static final int FORMAT_MONO8 = AL.AL_FORMAT_MONO8
 
static final int FORMAT_MONO16 = AL.AL_FORMAT_MONO16
 
static final int FORMAT_STEREO8 = AL.AL_FORMAT_STEREO8
 
static final int FORMAT_STEREO16 = AL.AL_FORMAT_STEREO16
 

Detailed Description

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

Author
Athomas Goldberg, Sven Gothel, et al.

Definition at line 48 of file Buffer.java.

Constructor & Destructor Documentation

◆ Buffer()

com.jogamp.openal.sound3d.Buffer.Buffer ( final int  bufferID)

Definition at line 60 of file Buffer.java.

Member Function Documentation

◆ configure()

void com.jogamp.openal.sound3d.Buffer.configure ( final ByteBuffer  data,
final int  alFormat,
final int  freq 
)

Configure the Sound3D buffer.

Parameters
datathe raw audio data
alFormatthe OpenAL format of the data, e.g. FORMAT_MONO8, FORMAT_MONO16, FORMAT_STEREO8 and FORMAT_STEREO16
freqthe frequency of the data

Definition at line 91 of file Buffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete()

void com.jogamp.openal.sound3d.Buffer.delete ( )

Delete this buffer, and free its resources.

Definition at line 75 of file Buffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBitDepth()

int com.jogamp.openal.sound3d.Buffer.getBitDepth ( )

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

Returns
the bit-depth of the data

Definition at line 101 of file Buffer.java.

Here is the call graph for this function:

◆ getData()

ByteBuffer com.jogamp.openal.sound3d.Buffer.getData ( )

Gets the raw data contained in this buffer.

Returns
the raw buffer data.

Definition at line 125 of file Buffer.java.

◆ getFrequency()

int com.jogamp.openal.sound3d.Buffer.getFrequency ( )

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

Returns
the frequency of the data

Definition at line 134 of file Buffer.java.

Here is the call graph for this function:

◆ getID()

int com.jogamp.openal.sound3d.Buffer.getID ( )

Return the OpenAL buffer ID, -1 if invalid.

Definition at line 65 of file Buffer.java.

Here is the caller graph for this function:

◆ getNumChannels()

int com.jogamp.openal.sound3d.Buffer.getNumChannels ( )

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

Returns
the number of audio channels.

Definition at line 113 of file Buffer.java.

Here is the call graph for this function:

◆ getSize()

int com.jogamp.openal.sound3d.Buffer.getSize ( )

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

Returns
the size of the data.

Definition at line 146 of file Buffer.java.

Here is the call graph for this function:

◆ isValid()

boolean com.jogamp.openal.sound3d.Buffer.isValid ( )

Returns whether getID() is valid, i.e.

not delete()'ed

Definition at line 68 of file Buffer.java.

Here is the call graph for this function:

◆ toString()

String com.jogamp.openal.sound3d.Buffer.toString ( )

Definition at line 154 of file Buffer.java.

Member Data Documentation

◆ FORMAT_MONO16

final int com.jogamp.openal.sound3d.Buffer.FORMAT_MONO16 = AL.AL_FORMAT_MONO16
static

Definition at line 51 of file Buffer.java.

◆ FORMAT_MONO8

final int com.jogamp.openal.sound3d.Buffer.FORMAT_MONO8 = AL.AL_FORMAT_MONO8
static

Definition at line 49 of file Buffer.java.

◆ FORMAT_STEREO16

final int com.jogamp.openal.sound3d.Buffer.FORMAT_STEREO16 = AL.AL_FORMAT_STEREO16
static

Definition at line 55 of file Buffer.java.

◆ FORMAT_STEREO8

final int com.jogamp.openal.sound3d.Buffer.FORMAT_STEREO8 = AL.AL_FORMAT_STEREO8
static

Definition at line 53 of file Buffer.java.


The documentation for this class was generated from the following file: