OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 <AVFoundation/AVFoundation.h> | 11 #import <AVFoundation/AVFoundation.h> |
12 #import <Foundation/Foundation.h> | 12 #import <Foundation/Foundation.h> |
13 | 13 |
14 #include "webrtc/modules/audio_device/ios/audio_device_ios.h" | 14 #include "webrtc/modules/audio_device/ios/audio_device_ios.h" |
15 | 15 |
16 #include <cmath> | 16 #include <cmath> |
17 | 17 |
18 #include "webrtc/base/array_view.h" | 18 #include "webrtc/base/array_view.h" |
19 #include "webrtc/base/atomicops.h" | 19 #include "webrtc/base/atomicops.h" |
20 #include "webrtc/base/bind.h" | 20 #include "webrtc/base/bind.h" |
21 #include "webrtc/base/checks.h" | 21 #include "webrtc/base/checks.h" |
22 #include "webrtc/base/criticalsection.h" | 22 #include "webrtc/base/criticalsection.h" |
23 #include "webrtc/base/logging.h" | 23 #include "webrtc/base/logging.h" |
24 #include "webrtc/base/thread.h" | 24 #include "webrtc/base/thread.h" |
25 #include "webrtc/base/thread_annotations.h" | 25 #include "webrtc/base/thread_annotations.h" |
26 #include "webrtc/modules/audio_device/fine_audio_buffer.h" | 26 #include "webrtc/modules/audio_device/fine_audio_buffer.h" |
27 #include "webrtc/sdk/objc/Framework/Classes/Common/helpers.h" | 27 #include "webrtc/sdk/objc/Framework/Classes/Common/helpers.h" |
28 | 28 |
29 #import "WebRTC/RTCLogging.h" | 29 #import "WebRTC/RTCLogging.h" |
30 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h" | |
31 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h" | |
32 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSessionConfiguration.h" | |
33 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h" | 30 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h" |
| 31 #import "webrtc/sdk/objc/Framework/Classes/Audio/RTCAudioSession+Private.h" |
| 32 #import "webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSession.h" |
| 33 #import "webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h
" |
| 34 |
34 | 35 |
35 namespace webrtc { | 36 namespace webrtc { |
36 | 37 |
37 #define LOGI() LOG(LS_INFO) << "AudioDeviceIOS::" | 38 #define LOGI() LOG(LS_INFO) << "AudioDeviceIOS::" |
38 | 39 |
39 #define LOG_AND_RETURN_IF_ERROR(error, message) \ | 40 #define LOG_AND_RETURN_IF_ERROR(error, message) \ |
40 do { \ | 41 do { \ |
41 OSStatus err = error; \ | 42 OSStatus err = error; \ |
42 if (err) { \ | 43 if (err) { \ |
43 LOG(LS_ERROR) << message << ": " << err; \ | 44 LOG(LS_ERROR) << message << ": " << err; \ |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 | 816 |
816 // All I/O should be stopped or paused prior to deactivating the audio | 817 // All I/O should be stopped or paused prior to deactivating the audio |
817 // session, hence we deactivate as last action. | 818 // session, hence we deactivate as last action. |
818 [session lockForConfiguration]; | 819 [session lockForConfiguration]; |
819 UnconfigureAudioSession(); | 820 UnconfigureAudioSession(); |
820 [session endWebRTCSession:nil]; | 821 [session endWebRTCSession:nil]; |
821 [session unlockForConfiguration]; | 822 [session unlockForConfiguration]; |
822 } | 823 } |
823 | 824 |
824 } // namespace webrtc | 825 } // namespace webrtc |
OLD | NEW |