org.xith3d.loaders.sound.impl.ogg
Class OggLoader

java.lang.Object
  extended by org.xith3d.loaders.sound.SoundLoader
      extended by org.xith3d.loaders.sound.impl.ogg.OggLoader

public class OggLoader
extends SoundLoader

This is a SoundLoader implementation for Oggle Vorbis sounds (.ogg).


Field Summary
static java.lang.String DEFAULT_EXTENSION
          The default extension to assume for Oggle Vorbis files.
 
Constructor Summary
OggLoader()
           
 
Method Summary
static OggLoader getInstance()
           
 OggSoundContainer loadSound(java.io.InputStream in)
          This method loads the Sound from an InputStream.
 OggSoundContainer loadSound(java.lang.String filename)
          This method loads the Sound from a file.
 OggSoundContainer loadSound(java.net.URL url)
          This method loads the Sound from a URL.
 
Methods inherited from class org.xith3d.loaders.sound.SoundLoader
loadBackgroundSound, loadBackgroundSound, loadBackgroundSound, loadPointSound, loadPointSound, loadPointSound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EXTENSION

public static final java.lang.String DEFAULT_EXTENSION
The default extension to assume for Oggle Vorbis files.

See Also:
Constant Field Values
Constructor Detail

OggLoader

public OggLoader()
Method Detail

getInstance

public static OggLoader getInstance()
Returns:
the OggLoader instance to use as singleton.

loadSound

public OggSoundContainer loadSound(java.io.InputStream in)
                            throws java.io.IOException
This method loads the Sound from an InputStream.

Specified by:
loadSound in class SoundLoader
Parameters:
in - the InputStream to load the Sound from. It isn't necessary to explicitly pass an instance of BufferedInputStream, since it is created on demand.
Throws:
java.io.IOException

loadSound

public OggSoundContainer loadSound(java.net.URL url)
                            throws java.io.IOException
This method loads the Sound from a URL.

Specified by:
loadSound in class SoundLoader
Parameters:
url - the URL to load the Sound from.
Throws:
java.io.IOException

loadSound

public OggSoundContainer loadSound(java.lang.String filename)
                            throws java.io.IOException
This method loads the Sound from a file.

Specified by:
loadSound in class SoundLoader
Parameters:
filename - the file's name to load the Sound from.
Throws:
java.io.IOException