Index: chromeos/audio/audio_device.h |
diff --git a/chromeos/audio/audio_device.h b/chromeos/audio/audio_device.h |
index 67dca1cf338a04335be31cd510619681ef4ac0f4..e9b6a9e24235e541138f03a7df648b888069fc8d 100644 |
--- a/chromeos/audio/audio_device.h |
+++ b/chromeos/audio/audio_device.h |
@@ -41,6 +41,20 @@ struct CHROMEOS_EXPORT AudioDevice { |
static std::string GetTypeString(chromeos::AudioDeviceType type); |
static chromeos::AudioDeviceType GetAudioType(const std::string& node_type); |
+ // Indicates that an input or output audio device is for simple usage like |
+ // playback or recording for user. In contrast, audio device such as |
+ // loopback, always on keyword recognition (AOKR), and keyboard mic are |
+ // not for simple usage. |
+ inline bool IsForSimpleUsage() { |
Daniel Erat
2015/06/23 14:15:49
you don't need 'inline' here, and you should use l
cychiang
2015/06/24 08:11:29
Done.
|
+ return (type == AUDIO_TYPE_HEADPHONE || |
+ type == AUDIO_TYPE_INTERNAL_MIC || |
+ type == AUDIO_TYPE_MIC || |
+ type == AUDIO_TYPE_USB || |
+ type == AUDIO_TYPE_BLUETOOTH || |
+ type == AUDIO_TYPE_HDMI || |
+ type == AUDIO_TYPE_INTERNAL_SPEAKER); |
+ } |
+ |
bool is_input; |
uint64 id; |
std::string display_name; |