wyvern.lib
Interface Alert

All Known Subinterfaces:
Music, Sound
All Known Implementing Classes:
MovableSoundSource, SimpleSound, Soundtrack

public interface Alert

Represents a simple audible alert, such as message-beep when someone has sent you a chat message. Alerts cannot be stopped once they're sent to the client.

You can simply play the alert by passing its filename to player.playAlert(), or you can customize its parameters first.

Version:
1.0, Jul 25, 2003
Author:
Steve Yegge

Method Summary
 double getGain()
          Returns the sound volume
 java.lang.String getPath()
          Returns relative path to the sound file
 void setGain(double gain)
          Sets the sound volume
 void setPath(java.lang.String path)
          Sets relative path to the sound file
 

Method Detail

getPath

public java.lang.String getPath()
Returns relative path to the sound file

Returns:
relative path to the sound file, e.g. "music/midi/beep.mid"

setPath

public void setPath(java.lang.String path)
Sets relative path to the sound file

Parameters:
path - relative path to the sound file, e.g. "wiz/foobar/sounds/mysound.ogg"

getGain

public double getGain()
Returns the sound volume

Returns:
the gain, from 0.0 to 1.0

setGain

public void setGain(double gain)
Sets the sound volume

Parameters:
gain - the sound volume, from 0.0 to 1.0