twilio / voice-quickstart-objc

Twilio Voice Quickstart for iOS with Objective-C
MIT License
39 stars 24 forks source link

Remove audio device toggling when ending CallKit calls #199

Closed bobiechen-twilio closed 4 years ago

bobiechen-twilio commented 4 years ago

Description

The audio-device toggling in the provider:performEndCallAction: delegate method would cause the audio engine to print out error messages like these:

provider:didDeactivateAudioSession:
[aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch,  16000 Hz, Int16> inf< 1 ch,  16000 Hz, Int16>)
[aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch,  16000 Hz, Int16> inf< 1 ch,  16000 Hz, Int16>)
[aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch,  16000 Hz, Int16> inf< 1 ch,  16000 Hz, Int16>)
[aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch,  16000 Hz, Int16> inf< 1 ch,  16000 Hz, Int16>)
[aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch,  16000 Hz, Int16> inf< 1 ch,  16000 Hz, Int16>)

The audio device only needs to be enabled in the provider:didActivateAudioSession: method. Removing the toggling here fixes the error.

Steps to reproduce

paynerc commented 4 years ago

Was this change also made to the shared Quickstart repo? Or does this need to be merged here and then in the shared repo?