OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_ |
12 #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_ | 12 #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include <jni.h> | 16 #include <jni.h> |
17 #include <SLES/OpenSLES.h> | 17 #include <SLES/OpenSLES.h> |
18 | 18 |
19 #include "webrtc/base/thread_checker.h" | 19 #include "webrtc/base/thread_checker.h" |
20 #include "webrtc/modules/audio_device/android/audio_common.h" | 20 #include "webrtc/modules/audio_device/android/audio_common.h" |
21 #include "webrtc/modules/audio_device/android/helpers_android.h" | 21 #include "webrtc/modules/audio_device/audio_device_config.h" |
22 #include "webrtc/modules/audio_device/android/jvm_android.h" | 22 #include "webrtc/modules/audio_device/include/audio_device_defines.h" |
23 #include "webrtc/modules/audio_device/android/opensles_common.h" | 23 #include "webrtc/modules/audio_device/android/opensles_common.h" |
24 #include "webrtc/modules/audio_device/audio_device_config.h" | |
25 #include "webrtc/modules/audio_device/audio_device_generic.h" | 24 #include "webrtc/modules/audio_device/audio_device_generic.h" |
26 #include "webrtc/modules/audio_device/include/audio_device_defines.h" | 25 #include "webrtc/modules/utility/include/helpers_android.h" |
| 26 #include "webrtc/modules/utility/include/jvm_android.h" |
27 | 27 |
28 namespace webrtc { | 28 namespace webrtc { |
29 | 29 |
30 // Implements support for functions in the WebRTC audio stack for Android that | 30 // Implements support for functions in the WebRTC audio stack for Android that |
31 // relies on the AudioManager in android.media. It also populates an | 31 // relies on the AudioManager in android.media. It also populates an |
32 // AudioParameter structure with native audio parameters detected at | 32 // AudioParameter structure with native audio parameters detected at |
33 // construction. This class does not make any audio-related modifications | 33 // construction. This class does not make any audio-related modifications |
34 // unless Init() is called. Caching audio parameters makes no changes but only | 34 // unless Init() is called. Caching audio parameters makes no changes but only |
35 // reads data from the Java side. | 35 // reads data from the Java side. |
36 class AudioManager { | 36 class AudioManager { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // Contains native parameters (e.g. sample rate, channel configuration). | 199 // Contains native parameters (e.g. sample rate, channel configuration). |
200 // Set at construction in OnCacheAudioParameters() which is called from | 200 // Set at construction in OnCacheAudioParameters() which is called from |
201 // Java on the same thread as this object is created on. | 201 // Java on the same thread as this object is created on. |
202 AudioParameters playout_parameters_; | 202 AudioParameters playout_parameters_; |
203 AudioParameters record_parameters_; | 203 AudioParameters record_parameters_; |
204 }; | 204 }; |
205 | 205 |
206 } // namespace webrtc | 206 } // namespace webrtc |
207 | 207 |
208 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_ | 208 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_ |
OLD | NEW |