Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: webrtc/modules/audio_device/android/audio_manager.h

Issue 2411263003: Android audio playout now supports non-call media streams (Closed)
Patch Set: Adding support for SetCommunicationMode in AudioManager Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/android/audio_manager.h
diff --git a/webrtc/modules/audio_device/android/audio_manager.h b/webrtc/modules/audio_device/android/audio_manager.h
index 341d426e418bc99d7ed4c7297f1759f3d036c14a..8c32f0b08221deae8470bf8fdd6830becebdf49c 100644
--- a/webrtc/modules/audio_device/android/audio_manager.h
+++ b/webrtc/modules/audio_device/android/audio_manager.h
@@ -47,6 +47,7 @@ class AudioManager {
bool Init();
void Close();
+ void SetCommunicationMode(bool enable);
bool IsCommunicationModeEnabled();
bool IsDeviceBlacklistedForOpenSLESUsage();
@@ -54,6 +55,7 @@ class AudioManager {
std::unique_ptr<GlobalRef> audio_manager_;
jmethodID init_;
jmethodID dispose_;
+ jmethodID set_communication_mode_;
jmethodID is_communication_mode_enabled_;
jmethodID is_device_blacklisted_for_open_sles_usage_;
};
@@ -82,6 +84,9 @@ class AudioManager {
// Revert any setting done by Init().
bool Close();
+ // Set audio mode to AudioManager.MODE_IN_COMMUNICATION if |enable| is true
+ // and AudioManager.MODE_NORMAL otherwise.
+ void SetCommunicationMode(bool enable);
// Returns true if current audio mode is AudioManager.MODE_IN_COMMUNICATION.
bool IsCommunicationModeEnabled() const;
« no previous file with comments | « webrtc/modules/audio_device/android/audio_device_unittest.cc ('k') | webrtc/modules/audio_device/android/audio_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698