org.xith3d.loaders.sound.impl.midi
Class MidiLoader

java.lang.Object
  extended by org.xith3d.loaders.sound.SoundLoader
      extended by org.xith3d.loaders.sound.impl.midi.MidiLoader

public class MidiLoader
extends SoundLoader

This is a SoundLoader implementation for Midi sounds (.mid).


Field Summary
static java.lang.String DEFAULT_EXTENSION
          The default extension to assume for Wave files.
 
Constructor Summary
MidiLoader()
           
 
Method Summary
static MidiLoader getInstance()
           
 MidiSoundContainer loadSound(java.io.InputStream in)
          This method loads the Sound from an InputStream.
 MidiSoundContainer loadSound(java.lang.String filename)
          This method loads the Sound from a file.
 MidiSoundContainer 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 Wave files.

See Also:
Constant Field Values
Constructor Detail

MidiLoader

public MidiLoader()
Method Detail

getInstance

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

loadSound

public MidiSoundContainer 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 MidiSoundContainer 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 MidiSoundContainer 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