Package 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.
-
-
Constructor Summary
Constructors Constructor Description WAVLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
loadFromFile
public static WAVData loadFromFile(String filename) throws ALException, 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:
ALException
- 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 ALException, 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:
ALException
- if the format of the audio if not supported.IOException
- If the file can no be found or some other IO error occurs
-
-