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

Unified Diff: chromeos/audio/audio_device.cc

Issue 2721733003: Handle the dual microphones and dual cameras cases. Activate the proper microphone when user activa… (Closed)
Patch Set: Nit: log only the invalid camera facing mode value. Created 3 years, 10 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
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | chromeos/audio/cras_audio_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/audio/audio_device.cc
diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc
index b77fd4effac9060d41b6221e7c3ef36ac9c9e57a..24a2a5c9b394755598584820c8b0eeebdbf05b56 100644
--- a/chromeos/audio/audio_device.cc
+++ b/chromeos/audio/audio_device.cc
@@ -186,4 +186,16 @@ std::string AudioDevice::ToString() const {
return result;
}
+bool AudioDevice::IsExternalDevice() const {
+ if (!is_for_simple_usage())
+ return false;
+
+ if (is_input) {
+ return (type != AUDIO_TYPE_INTERNAL_MIC && type != AUDIO_TYPE_FRONT_MIC &&
+ type != AUDIO_TYPE_REAR_MIC);
+ } else {
+ return (type != AUDIO_TYPE_INTERNAL_SPEAKER);
+ }
+}
+
} // namespace chromeos
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | chromeos/audio/cras_audio_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698