Sound
public Sound(java.io.InputStream is,
java.lang.String name)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
Creates a new Sound instance by the specified file path. Loads the sound
data into a byte array and also retrieves information about the format of
the sound file.
Note that the constructor is private. In order to load files use the static
Resources.sounds().get(String)
method.
- Parameters:
is
- The input stream to load the sound from.
name
- The name of this sound file.
- Throws:
java.io.IOException
- If something went wrong loading the file
javax.sound.sampled.UnsupportedAudioFileException
- If the audio format is not supported