Class 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 Detail

      • WAVLoader

        public WAVLoader()
    • 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