Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm

Issue 2813493004: Added audioSessionDidActivate and audioSessionDidDectivate (Closed)
Patch Set: remove code not for this cl Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..f4530167f943928e7fe4ef5fb2ada88a273edc52 100644
--- a/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm
+++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm
@@ -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:);
« no previous file with comments | « webrtc/modules/audio_device/ios/objc/RTCAudioSession.h ('k') | webrtc/modules/audio_device/ios/objc/RTCAudioSessionTest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698