aboutsummaryrefslogtreecommitdiffstats
path: root/TODO
diff options
context:
space:
mode:
authorTeddy Wing2018-10-29 23:23:35 +0100
committerTeddy Wing2018-10-29 23:23:35 +0100
commit73b27de4dcb823dbb978f154522fc0a383903dce (patch)
tree6cfcbfde18afa250320f0e31aabf0a81949ff6c7 /TODO
parentec6c2f262c6823460264c6d765443c5f5e5ec604 (diff)
downloadDomeKey-73b27de4dcb823dbb978f154522fc0a383903dce.tar.bz2
HeadphoneKey: Play audio only with the `--audio` command line flag
Allow users to decide whether interface audio (mode activated & deactivated) should play. The flag value is in a `Config`, so to make it easier to pass both the audio flag and the timeout config value to `HeadphoneKey`, rename `initWithTimeout:` to `initWithConfig:`. Only allocate a `Sounds` instance if `--audio` is passed, because there's no reason to allocate memory for it otherwise. Add a `_play_audio` flag as a static variable to make it accessible to the `on_mode_change()` function, just like we did for `sounds_inst`. In `on_mode_change()`, don't play any audio if `_play_audio` is on.
Diffstat (limited to 'TODO')
0 files changed, 0 insertions, 0 deletions