com.jogamp.openal.util
Class WAVLoader

java.lang.Object
  extended by com.jogamp.openal.util.WAVLoader

public class WAVLoader
extends Object

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

Author:
Athomas Goldberg, et.al

Constructor Summary
WAVLoader()
           
 
Method Summary
static WAVData loadFromFile(String filename)
          This method loads a (.wav) file into a WAVData object.
static WAVData loadFromStream(InputStream stream)
          This method loads a (.wav) file into a WAVData object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WAVLoader

public WAVLoader()
Method Detail

loadFromFile

public static WAVData loadFromFile(String filename)
                            throws UnsupportedAudioFileException,
                                   IOException
This method loads a (.wav) file into a WAVData object.

Parameters:
filename - The name of the (.wav) file
Returns:
a WAVData object containing the audio data
Throws:
UnsupportedAudioFileException - if the format of the audio if not supported.
IOException - If the file can no be found or some other IO error occurs

loadFromStream

public static WAVData loadFromStream(InputStream stream)
                              throws UnsupportedAudioFileException,
                                     IOException
This method loads a (.wav) file into a WAVData object.

Parameters:
stream - An InputStream for the .WAV stream.
Returns:
a WAVData object containing the audio data
Throws:
UnsupportedAudioFileException - if the format of the audio if not supported.
IOException - If the file can no be found or some other IO error occurs