FileDocCategorySizeDatePackage
QSoundTonePlayer.javaAPI DocphoneME MR2 API (J2ME)1832Wed May 02 18:00:46 BST 2007com.sun.mmedia

QSoundTonePlayer

public class QSoundTonePlayer extends Object implements TonePlayer

Fields Summary
private QSoundSynthPerformance
qsSP
Constructors Summary
public QSoundTonePlayer()

        qsSP = new QSoundSynthPerformance();
        qsSP.setChannel(5);
    
Methods Summary
public voidplayTone(int note, int duration, int volume)

        
        if((note<0) || (note >127))
            throw new IllegalArgumentException("illegal note");
        
        if(duration <= 0)
            throw new IllegalArgumentException("duration must be positive");
        
        if(volume < 0)
            volume = 0;
        else if(volume > 100)
            volume = 100;
        
        qsSP.playTone(note, duration, volume);