Ejemplo n.º 1
0
  private void startAudio() {
    SFApplication app = SFApplication.get();
    AudioDriver driver = app.getAudioDriverFactory().produce(app, this.alarm.getAudioSource());
    app.setAudioDriver(driver);

    driver.play(this.alarm.getAudioConfig());
  }
Ejemplo n.º 2
0
  private void lowerVolume() {
    AudioDriver d = SFApplication.get().getAudioDriver();
    int origVolume = this.alarm.getAudioConfig().getVolume();

    d.setVolume(origVolume / 5);
  }