| Index: webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm
|
| diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm b/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm
|
| index 4ce24e7c3fd56b7d2472d91b236862c26dd8b860..8ebd640305a0bfd5b21a86a29eef1dad95382d95 100644
|
| --- a/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm
|
| +++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm
|
| @@ -688,7 +688,7 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2;
|
| if (![self setConfiguration:webRTCConfig active:YES error:&error]) {
|
| RTCLogError(@"Failed to set WebRTC audio configuration: %@",
|
| error.localizedDescription);
|
| - [self unconfigureWebRTCSession:nil];
|
| + // Don't call unconfigureWebRTCSession if the audio session wasn't configured successfully
|
| if (outError) {
|
| *outError = error;
|
| }
|
| @@ -787,6 +787,22 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2;
|
| }
|
| }
|
|
|
| +- (void)audioSessionDidActivate:(AVAudioSession *)session {
|
| + if (_session != session) {
|
| + RTCLogError(@"audioSessionDidActivate called on different AVAudioSession");
|
| + }
|
| + [self incrementActivationCount];
|
| + self.isActive = YES;
|
| +}
|
| +
|
| +- (void)audioSessionDidDeactivate:(AVAudioSession *)session {
|
| + if (_session != session) {
|
| + RTCLogError(@"audioSessionDidDeactivate called on different AVAudioSession");
|
| + }
|
| + self.isActive = NO;
|
| + [self decrementActivationCount];
|
| +}
|
| +
|
| - (void)notifyDidBeginInterruption {
|
| for (auto delegate : self.delegates) {
|
| SEL sel = @selector(audioSessionDidBeginInterruption:);
|
|
|