| 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 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // parts that are associated with this call. | 91 // parts that are associated with this call. |
| 92 class JavaAudioManager { | 92 class JavaAudioManager { |
| 93 public: | 93 public: |
| 94 JavaAudioManager(NativeRegistration* native_registration, | 94 JavaAudioManager(NativeRegistration* native_registration, |
| 95 rtc::scoped_ptr<GlobalRef> audio_manager); | 95 rtc::scoped_ptr<GlobalRef> audio_manager); |
| 96 ~JavaAudioManager(); | 96 ~JavaAudioManager(); |
| 97 | 97 |
| 98 bool Init(); | 98 bool Init(); |
| 99 void Close(); | 99 void Close(); |
| 100 bool IsCommunicationModeEnabled(); | 100 bool IsCommunicationModeEnabled(); |
| 101 bool IsDeviceBlacklistedForOpenSLESUsage(); |
| 101 | 102 |
| 102 private: | 103 private: |
| 103 rtc::scoped_ptr<GlobalRef> audio_manager_; | 104 rtc::scoped_ptr<GlobalRef> audio_manager_; |
| 104 jmethodID init_; | 105 jmethodID init_; |
| 105 jmethodID dispose_; | 106 jmethodID dispose_; |
| 106 jmethodID is_communication_mode_enabled_; | 107 jmethodID is_communication_mode_enabled_; |
| 108 jmethodID is_device_blacklisted_for_open_sles_usage_; |
| 107 }; | 109 }; |
| 108 | 110 |
| 109 AudioManager(); | 111 AudioManager(); |
| 110 ~AudioManager(); | 112 ~AudioManager(); |
| 111 | 113 |
| 112 // Sets the currently active audio layer combination. Must be called before | 114 // Sets the currently active audio layer combination. Must be called before |
| 113 // Init(). | 115 // Init(). |
| 114 void SetActiveAudioLayer(AudioDeviceModule::AudioLayer audio_layer); | 116 void SetActiveAudioLayer(AudioDeviceModule::AudioLayer audio_layer); |
| 115 | 117 |
| 116 // Initializes the audio manager and stores the current audio mode. | 118 // Initializes the audio manager and stores the current audio mode. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // Contains native parameters (e.g. sample rate, channel configuration). | 201 // Contains native parameters (e.g. sample rate, channel configuration). |
| 200 // Set at construction in OnCacheAudioParameters() which is called from | 202 // Set at construction in OnCacheAudioParameters() which is called from |
| 201 // Java on the same thread as this object is created on. | 203 // Java on the same thread as this object is created on. |
| 202 AudioParameters playout_parameters_; | 204 AudioParameters playout_parameters_; |
| 203 AudioParameters record_parameters_; | 205 AudioParameters record_parameters_; |
| 204 }; | 206 }; |
| 205 | 207 |
| 206 } // namespace webrtc | 208 } // namespace webrtc |
| 207 | 209 |
| 208 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_ | 210 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_ |
| OLD | NEW |