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/RTCAudioSessionConfiguration.h" | 11 #import "WebRTC/RTCAudioSession.h" |
| 12 #import "WebRTC/RTCAudioSessionConfiguration.h" |
12 | 13 |
13 #import "WebRTC/RTCDispatcher.h" | 14 #import "WebRTC/RTCDispatcher.h" |
14 #import "WebRTC/UIDevice+RTCDevice.h" | 15 #import "WebRTC/UIDevice+RTCDevice.h" |
15 | 16 |
16 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h" | |
17 | 17 |
18 // Try to use mono to save resources. Also avoids channel format conversion | 18 // Try to use mono to save resources. Also avoids channel format conversion |
19 // in the I/O audio unit. Initial tests have shown that it is possible to use | 19 // in the I/O audio unit. Initial tests have shown that it is possible to use |
20 // mono natively for built-in microphones and for BT headsets but not for | 20 // mono natively for built-in microphones and for BT headsets but not for |
21 // wired headsets. Wired headsets only support stereo as native channel format | 21 // wired headsets. Wired headsets only support stereo as native channel format |
22 // but it is a low cost operation to do a format conversion to mono in the | 22 // but it is a low cost operation to do a format conversion to mono in the |
23 // audio unit. Hence, we will not hit a RTC_CHECK in | 23 // audio unit. Hence, we will not hit a RTC_CHECK in |
24 // VerifyAudioParametersForActiveAudioSession() for a mismatch between the | 24 // VerifyAudioParametersForActiveAudioSession() for a mismatch between the |
25 // preferred number of channels and the actual number of channels. | 25 // preferred number of channels and the actual number of channels. |
26 const int kRTCAudioSessionPreferredNumberOfChannels = 1; | 26 const int kRTCAudioSessionPreferredNumberOfChannels = 1; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 + (void)setWebRTCConfiguration:(RTCAudioSessionConfiguration *)configuration { | 128 + (void)setWebRTCConfiguration:(RTCAudioSessionConfiguration *)configuration { |
129 @synchronized(self) { | 129 @synchronized(self) { |
130 gWebRTCConfiguration = configuration; | 130 gWebRTCConfiguration = configuration; |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 @end | 134 @end |
OLD | NEW |