com.jogamp.openal.util
Class WAVLoader
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WAVLoader
public WAVLoader()
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