OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h" | 11 #import "WebRTC/RTCAudioSession.h" |
12 | 12 |
13 #import <UIKit/UIKit.h> | 13 #import <UIKit/UIKit.h> |
14 | 14 |
15 #include "webrtc/base/atomicops.h" | 15 #include "webrtc/base/atomicops.h" |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/criticalsection.h" | 17 #include "webrtc/base/criticalsection.h" |
18 #include "webrtc/modules/audio_device/ios/audio_device_ios.h" | |
19 | 18 |
| 19 |
| 20 #import "WebRTC/RTCAudioSessionConfiguration.h" |
20 #import "WebRTC/RTCLogging.h" | 21 #import "WebRTC/RTCLogging.h" |
21 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h" | 22 |
22 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSessionConfiguration.h" | 23 #import "RTCAudioSession+Private.h" |
| 24 |
23 | 25 |
24 NSString * const kRTCAudioSessionErrorDomain = @"org.webrtc.RTCAudioSession"; | 26 NSString * const kRTCAudioSessionErrorDomain = @"org.webrtc.RTCAudioSession"; |
25 NSInteger const kRTCAudioSessionErrorLockRequired = -1; | 27 NSInteger const kRTCAudioSessionErrorLockRequired = -1; |
26 NSInteger const kRTCAudioSessionErrorConfiguration = -2; | 28 NSInteger const kRTCAudioSessionErrorConfiguration = -2; |
27 NSString * const kRTCAudioSessionOutputVolumeSelector = @"outputVolume"; | 29 NSString * const kRTCAudioSessionOutputVolumeSelector = @"outputVolume"; |
28 | 30 |
29 // This class needs to be thread-safe because it is accessed from many threads. | 31 // This class needs to be thread-safe because it is accessed from many threads. |
30 // TODO(tkchin): Consider more granular locking. We're not expecting a lot of | 32 // TODO(tkchin): Consider more granular locking. We're not expecting a lot of |
31 // lock contention so coarse locks should be fine for now. | 33 // lock contention so coarse locks should be fine for now. |
32 @implementation RTCAudioSession { | 34 @implementation RTCAudioSession { |
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 - (void)notifyDidChangeOutputVolume:(float)volume { | 908 - (void)notifyDidChangeOutputVolume:(float)volume { |
907 for (auto delegate : self.delegates) { | 909 for (auto delegate : self.delegates) { |
908 SEL sel = @selector(audioSession:didChangeOutputVolume:); | 910 SEL sel = @selector(audioSession:didChangeOutputVolume:); |
909 if ([delegate respondsToSelector:sel]) { | 911 if ([delegate respondsToSelector:sel]) { |
910 [delegate audioSession:self didChangeOutputVolume:volume]; | 912 [delegate audioSession:self didChangeOutputVolume:volume]; |
911 } | 913 } |
912 } | 914 } |
913 } | 915 } |
914 | 916 |
915 @end | 917 @end |
OLD | NEW |