Manager: playTone(int note, int duration, int volume) throws MediaException : Manager « javax.microedition.media « Java by API






Manager: playTone(int note, int duration, int volume) throws MediaException

 


import javax.microedition.midlet.MIDlet;
import javax.microedition.media.Manager;
import javax.microedition.media.MediaException;

public class CSharpMIDlet extends MIDlet {
  public CSharpMIDlet() {    
  }
  
  public void startApp() {
    try {
      Manager.playTone(61, 5000, 100);
    } catch(MediaException me) { System.err.println(me); }
  }
  
  public void pauseApp() {
  }
  
  public void destroyApp(boolean unconditional) {
  }
  
}

   
  








Related examples in the same category

1.Manager.MIDI_DEVICE_LOCATOR
2.Manager.TONE_DEVICE_LOCATOR
3.Manager: createPlayer(InputStream arg0, String arg1) throws IOException, MediaException
4.Manager: getSupportedContentTypes(String protocol)
5.Manager: getSupportedProtocols(String content_type)