Commit graph

21 commits

Author SHA1 Message Date
Michael Kirk 64a0c4bfaa auto-migrate to Swift5 2019-04-04 13:44:42 -06:00
Michael Kirk 5632bd2d83 Use reference counting to disable proximity monitoring after audio message
Multiple overlapping activities require proximity monitoring (namely,
CallViewController and listening to audio messages).

These activities can overlap arbitrarily, so we use a reference counting
strategy to keep proximity monitoring on as long as one of these activities is
active.
2018-10-26 15:32:12 -06:00
Michael Kirk ce9ca1bdaa audio player type 2018-10-24 07:46:27 -06:00
Michael Kirk 4b4b18c625 Proximity playsback through earpiece
This is kind of unfortunate because playback doesn't allow the earpiece as an
output device.
2018-10-24 07:46:27 -06:00
Michael Kirk 3b4188f34b hoist audio session singleton to Environment 2018-10-24 07:46:25 -06:00
Michael Kirk 3d022adf4e WIP: audio activities 2018-10-24 07:44:50 -06:00
Matthew Chen 5b50e81b4f Rename fail macros in Swift. 2018-08-27 10:27:48 -04:00
Matthew Chen d4f7b5d45b Respond to CR. 2018-08-27 10:02:28 -04:00
Matthew Chen e1049fdfcc Respond to CR. 2018-08-27 10:02:28 -04:00
Matthew Chen cf6f3841a8 Apply new Swift logging. 2018-08-27 10:02:28 -04:00
Jesse Squires 6dc74ddcaf Fix some project warnings + other fixes
- Prefer checking `.isEmpty` rather than `.count == 0` for Swift collections (can be more optimal)
- Avoid comparing `BOOL` explicitly to `NO` (considered bad practice since `BOOL` is a `signed char`)
- Specify unused `SGX_FLAGS` as `__unused` to silence warnings
2018-07-31 09:48:58 -06:00
Matthew Chen 3964b78ff7 Reduce usage of JSQ. 2018-06-01 17:44:18 -04:00
Matthew Chen 28e26e1f75 Migrate to Swift 4. 2018-05-30 15:05:02 -04:00
Michael Kirk 2412ab092e Avoid occasional audio crash
// FREEBIE
2018-03-19 20:24:47 -04:00
Michael Kirk 1ddf3bb4e1 Fix "use ambient" for notifications
// FREEBIE
2018-03-06 10:12:55 -05:00
Michael Kirk 4e64b09ad6 Don't set audio to ambient while other audioActivity exists
// FREEBIE
2018-03-05 20:45:23 -05:00
Michael Kirk d7fcac8a5a In-App notifications don't pause background audio
// FREEBIE
2018-03-05 17:59:09 -05:00
Michael Kirk 707ab5f5a8 Minimize changes around call audio activity
// FREEBIE
2018-02-16 14:00:15 -08:00
Michael Kirk 4dd1c7813a Instrument calls to ensure audio session is maintained
// FREEBIE
2018-02-16 14:00:15 -08:00
Michael Kirk abb51b565a Don't de-activate audio sesion when other audio activities are happening
// FREEBIE
2018-02-16 14:00:15 -08:00
Michael Kirk c646f76335 Garther audio concerns, clean up session when done
- sync speakerphone state manipulated from system call screen
  - Revert audio session after call failure, ensures media plays out of
    speaker after placing a failing call.
  - Replace notification with delegate pattern since we're already using
    delegate pattern here.
- Fixes voiceover accessibility after voice memo
- Avoid audio blip after pressing hangup
- Rename CallAudioSession -> OWSAudioSession
  Going to start using it for other non-call things since we want to
  gather all our audio session concerns.
- Resume background audio when done playing video
  - Extract OWSVideoPlayer which ensures audio is in proper state before
    playback
  - Move recording session logic to shared OWSAudioSession
  - Deactivate audio session when complete

// FREEBIE
2018-02-06 18:45:51 -08:00