JOAL v2.6.0-rc-20250706
JOAL, OpenAL® API Binding for Java™ (public API).
com.jogamp.openal.util.WAVData Class Reference

This class is a holder for WAV (.wav ) file Data returned from the WavLoader, or directly via loadFromStream(InputStream, int, int, int). More...

Collaboration diagram for com.jogamp.openal.util.WAVData:

Public Member Functions

 WAVData (final ByteBuffer data, final int format, final int size, final int freq, final boolean loop)
 

Static Public Member Functions

static WAVData loadFromStream (InputStream aIn, final int byteCount, final int numChannels, final int bits, final int sampleRate, final ByteOrder byteOrder, final boolean loop) throws IOException
 This method loads a (.wav) file into a WAVData object. More...
 

Public Attributes

final ByteBuffer data
 The audio data. More...
 
final int format
 the format of the Data. More...
 
final int size
 Size (in bytes) of the data. More...
 
final int freq
 The frequency of the data. More...
 
final boolean loop
 flag indicating whether or not the sound in the data should loop More...
 

Detailed Description

This class is a holder for WAV (.wav ) file Data returned from the WavLoader, or directly via loadFromStream(InputStream, int, int, int).

Author
Athomas Goldberg, et.al.

Definition at line 53 of file WAVData.java.

Constructor & Destructor Documentation

◆ WAVData()

com.jogamp.openal.util.WAVData.WAVData ( final ByteBuffer  data,
final int  format,
final int  size,
final int  freq,
final boolean  loop 
)

Definition at line 77 of file WAVData.java.

Here is the caller graph for this function:

Member Function Documentation

◆ loadFromStream()

static WAVData com.jogamp.openal.util.WAVData.loadFromStream ( InputStream  aIn,
final int  byteCount,
final int  numChannels,
final int  bits,
final int  sampleRate,
final ByteOrder  byteOrder,
final boolean  loop 
) throws IOException
static

This method loads a (.wav) file into a WAVData object.

Parameters
aInAn InputStream for the .WAV stream
byteCountbyte count of expected wav data to be read
numChannels
bits
sampleRate
byteOrder
Returns
a WAVData object containing the audio data
Exceptions
UnsupportedAudioFileExceptionif the format of the audio if not supported.
IOExceptionIf the file can no be found or some other IO error occurs

Definition at line 100 of file WAVData.java.

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

Member Data Documentation

◆ data

final ByteBuffer com.jogamp.openal.util.WAVData.data

The audio data.

Definition at line 55 of file WAVData.java.

◆ format

final int com.jogamp.openal.util.WAVData.format

the format of the Data.

One of:

AL.AL_FORMAT_MONO8
AL.AL_FORMAT_MONO16
AL.AL_FORMAT_STEREO8
AL.AL_FORMAT_STEREO16

Definition at line 66 of file WAVData.java.

◆ freq

final int com.jogamp.openal.util.WAVData.freq

The frequency of the data.

Definition at line 72 of file WAVData.java.

◆ loop

final boolean com.jogamp.openal.util.WAVData.loop

flag indicating whether or not the sound in the data should loop

Definition at line 75 of file WAVData.java.

◆ size

final int com.jogamp.openal.util.WAVData.size

Size (in bytes) of the data.

Definition at line 69 of file WAVData.java.


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