pjproject icon indicating copy to clipboard operation
pjproject copied to clipboard

iOS AVAudioSession setActive

Open graphiclife opened this issue 2 years ago • 0 comments

Describe the bug

PJSSIP is activating AVAudioSession on iOS even though SETUP_AV_AUDIO_SESSION is not defined.

It is activated here, not respecting SETUP_AV_AUDIO_SESSION: https://github.com/pjsip/pjproject/blob/ea7105c222d657d3c1f7fb18ff9130450e2e40e6/pjmedia/src/pjmedia-audiodev/coreaudio_dev.m#L2179

Deactivation takes the SETUP_AV_AUDIO_SESSION into account: https://github.com/pjsip/pjproject/blob/ea7105c222d657d3c1f7fb18ff9130450e2e40e6/pjmedia/src/pjmedia-audiodev/coreaudio_dev.m#L2238

is this intended behaviour?

Steps to reproduce

Place a call on iOS and CallKit using the documented procedure of:

  1. set the null sound dev (pjsua_set_null_snd_dev)
  2. wait for CallKit to activate audio session
  3. set the default capture devices using pjsua_set_snd_dev
  4. AVAudioSession setActive is called from within pjsua

PJSIP version

2.12

Context

Happens on iOS devices.

Log, call stack, etc

n/a

graphiclife avatar Apr 05 '22 14:04 graphiclife