private void startAudio() { SFApplication app = SFApplication.get(); AudioDriver driver = app.getAudioDriverFactory().produce(app, this.alarm.getAudioSource()); app.setAudioDriver(driver); driver.play(this.alarm.getAudioConfig()); }
private void lowerVolume() { AudioDriver d = SFApplication.get().getAudioDriver(); int origVolume = this.alarm.getAudioConfig().getVolume(); d.setVolume(origVolume / 5); }