zombie.openal
Class AudioLoader

java.lang.Object
  extended by zombie.openal.AudioLoader

public class AudioLoader
extends java.lang.Object

A utility to provide a simple and rational interface to the slick internals

Author:
kevin

Constructor Summary
AudioLoader()
           
 
Method Summary
static Audio getAudio(java.lang.String format, java.lang.String ref)
          get audio data in a playable state by loading the complete audio into memory.
static Audio getAudioFile(java.lang.String format, java.lang.String ref)
           
static Audio getStreamingAudio(java.lang.String format, java.lang.String url)
           
static Audio getStreamingAudio(java.lang.String format, java.net.URL url)
          get audio data in a playable state by setting up a stream that can be piped into OpenAL - i.e.
static void update()
          Allow the streaming system to update itself
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioLoader

public AudioLoader()
Method Detail

getAudio

public static Audio getAudio(java.lang.String format,
                             java.lang.String ref)
                      throws java.io.IOException
get audio data in a playable state by loading the complete audio into memory.

Parameters:
format - The format of the audio to be loaded (something like "XM" or "OGG")
in - The input stream from which to load the audio data
Returns:
An object representing the audio data
Throws:
java.io.IOException - Indicates a failure to access the audio data

getAudioFile

public static Audio getAudioFile(java.lang.String format,
                                 java.lang.String ref)
                          throws java.io.IOException
Throws:
java.io.IOException

getStreamingAudio

public static Audio getStreamingAudio(java.lang.String format,
                                      java.net.URL url)
                               throws java.io.IOException
get audio data in a playable state by setting up a stream that can be piped into OpenAL - i.e. streaming audio

Parameters:
format - The format of the audio to be loaded (something like "XM" or "OGG")
url - The location of the data that should be streamed
Returns:
An object representing the audio data
Throws:
java.io.IOException - Indicates a failure to access the audio data

getStreamingAudio

public static Audio getStreamingAudio(java.lang.String format,
                                      java.lang.String url)
                               throws java.io.IOException
Throws:
java.io.IOException

update

public static void update()
Allow the streaming system to update itself