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 |