diff options
author | Teddy Wing | 2018-10-29 23:23:35 +0100 |
---|---|---|
committer | Teddy Wing | 2018-10-29 23:23:35 +0100 |
commit | 73b27de4dcb823dbb978f154522fc0a383903dce (patch) | |
tree | 6cfcbfde18afa250320f0e31aabf0a81949ff6c7 /TODO | |
parent | ec6c2f262c6823460264c6d765443c5f5e5ec604 (diff) | |
download | DomeKey-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