com.jniwrapper.win32.system
Class Beeper

java.lang.Object
  extended by com.jniwrapper.win32.system.Beeper

public class Beeper
extends java.lang.Object

A utility class for making debugging and error handling sounds.


Field Summary
static int MB_ICONASTERISK
          SystemAsterisk sound.
static int MB_ICONEXCLAMATION
          SystemExclamation sound.
static int MB_ICONHAND
          SystemHand sound.
static int MB_ICONQUESTION
          SystemQuestion sound.
static int MB_OK
          SystemDefault sound.
 
Constructor Summary
Beeper()
           
 
Method Summary
static boolean beep(long frequency, long duration)
           
static boolean messageBeep(int type)
          Plays a predefined sound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MB_ICONHAND

public static final int MB_ICONHAND
SystemHand sound.

See Also:
Constant Field Values

MB_ICONQUESTION

public static final int MB_ICONQUESTION
SystemQuestion sound.

See Also:
Constant Field Values

MB_ICONEXCLAMATION

public static final int MB_ICONEXCLAMATION
SystemExclamation sound.

See Also:
Constant Field Values

MB_ICONASTERISK

public static final int MB_ICONASTERISK
SystemAsterisk sound.

See Also:
Constant Field Values

MB_OK

public static final int MB_OK
SystemDefault sound.

See Also:
Constant Field Values
Constructor Detail

Beeper

public Beeper()
Method Detail

beep

public static boolean beep(long frequency,
                           long duration)
Parameters:
frequency - frequency of the sound, in Hertz. Must be in the range between 37 through 32,767.
duration - duration of the sound, in milliseconds.
Returns:
true, if the operation succeeds. If false, extended error information can be obtained via LastError.getValue()

messageBeep

public static boolean messageBeep(int type)
Plays a predefined sound.

Parameters:
type - sound type, one of the MB_XXX values.
Returns:
true, if the operation succeeds. If false, extended error information can be obtained via LastError.getValue()