NativeTonePlayerpublic class NativeTonePlayer extends Object implements com.sun.mmedia.TonePlayerTone Player to play a single note of specified duration
and at the specified volume. |
Methods Summary |
---|
private native void | finalize()
| private native boolean | nPlayTone(int note, int dur, int vol)The native implementation method to play a tone.
| private native boolean | nStopTone()
| public void | playTone(int note, int duration, int volume)
if (false == nPlayTone(note, duration, volume)) {
throw new MediaException("can't play tone");
}
| public void | stopTone()Stop current tone playing
nStopTone();
|
|