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

public Class WAVLoader

extends Object
Class Inheritance
Imports
java.io.File, .FileInputStream, .IOException, .InputStream, java.nio.ByteOrder, com.jogamp.common.util.Bitstream, com.jogamp.openal.ALException

A Loader utility for (.wav) files. Creates a WAVData object containing the data used by the AL.alBufferData method.

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static WAVData

Returns:

a WAVData object containing the audio data
loadFromFile
(final String
The name of the (.wav) file
filename
)

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

public static WAVData

Returns:

a WAVData object containing the audio data
loadFromStream
(final InputStream
An InputStream for the .WAV stream.
stream
)

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

private static WAVData
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DATAback to summary
private static final int DATA
FACTback to summary
private static final int FACT
FMTback to summary
private static final int FMT
RIFFback to summary
private static final int RIFF
RIFXback to summary
private static final int RIFX
WAVEback to summary
private static final int WAVE

Constructor Detail

WAVLoaderback to summary
public WAVLoader()

Method Detail

loadFromFileback to summary
public static WAVData loadFromFile(final String filename) throws ALException, IOException

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

Parameters
filename:String

The name of the (.wav) file

Returns:WAVData

a WAVData object containing the audio data

Exceptions
ALException:
if the format of the audio if not supported.
IOException:
If the file can no be found or some other IO error occurs
loadFromStreamback to summary
public static WAVData loadFromStream(final InputStream stream) throws ALException, IOException

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

Parameters
stream:InputStream

An InputStream for the .WAV stream.

Returns:WAVData

a WAVData object containing the audio data

Exceptions
ALException:
if the format of the audio if not supported.
IOException:
If the file can no be found or some other IO error occurs
loadFromStreamImplback to summary
private static WAVData loadFromStreamImpl(final InputStream aIn) throws ALException, IOException