org.newdawn.slick.openal
Class AudioLoader

java.lang.Object
  extended by org.newdawn.slick.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.io.InputStream in)
          Get audio data in a playable state by loading the complete audio into memory.
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
clone, equals, finalize, 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.io.InputStream in)
                      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

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

update

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



Copyright © 2006 New Dawn Software. All Rights Reserved.