diff options
| author | Keith Packard <keithp@keithp.com> | 2010-07-28 13:01:52 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-07-28 13:01:52 -0700 |
| commit | 71da54a5ce255395376a44586782ab8b6f3b289f (patch) | |
| tree | b6dc77d08e3c1dace620249f60e69b7ed0c70b5c /ao-tools/altosui/AltosVoice.java | |
| parent | e76b9cc32bbcc5176d9bdd6f8d79778024627382 (diff) | |
Make voice and channel menus work.
Stores voice and channel data to preferences.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosVoice.java')
| -rw-r--r-- | ao-tools/altosui/AltosVoice.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ao-tools/altosui/AltosVoice.java b/ao-tools/altosui/AltosVoice.java index c39bfb9b..ebe9d5a8 100644 --- a/ao-tools/altosui/AltosVoice.java +++ b/ao-tools/altosui/AltosVoice.java @@ -39,7 +39,8 @@ public class AltosVoice implements Runnable { } catch (InterruptedException e) { } } - public void speak(String s) { + + public void speak_always(String s) { try { if (voice != null) phrases.put(s); @@ -47,6 +48,11 @@ public class AltosVoice implements Runnable { } } + public void speak(String s) { + if (AltosPreferences.voice()) + speak_always(s); + } + public void speak(String format, Object... parameters) { speak(String.format(format, parameters)); } @@ -59,7 +65,6 @@ public class AltosVoice implements Runnable { phrases = new LinkedBlockingQueue<String> (); thread = new Thread(this); thread.start(); - speak("Rocket Flight Monitor Ready"); } else { System.out.printf("Voice manager failed to open %s\n", voice_name); Voice[] voices = voice_manager.getVoices(); |
