| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_ | 5 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
| 6 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_ | 6 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 AUDIO_TYPE_KEYBOARD_MIC, | 28 AUDIO_TYPE_KEYBOARD_MIC, |
| 29 AUDIO_TYPE_AOKR, | 29 AUDIO_TYPE_AOKR, |
| 30 AUDIO_TYPE_POST_MIX_LOOPBACK, | 30 AUDIO_TYPE_POST_MIX_LOOPBACK, |
| 31 AUDIO_TYPE_POST_DSP_LOOPBACK, | 31 AUDIO_TYPE_POST_DSP_LOOPBACK, |
| 32 AUDIO_TYPE_OTHER, | 32 AUDIO_TYPE_OTHER, |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 struct CHROMEOS_EXPORT AudioDevice { | 35 struct CHROMEOS_EXPORT AudioDevice { |
| 36 AudioDevice(); | 36 AudioDevice(); |
| 37 explicit AudioDevice(const AudioNode& node); | 37 explicit AudioDevice(const AudioNode& node); |
| 38 AudioDevice(const AudioDevice& other); |
| 38 std::string ToString() const; | 39 std::string ToString() const; |
| 39 | 40 |
| 40 // Converts between the string type sent via D-Bus and AudioDeviceType. | 41 // Converts between the string type sent via D-Bus and AudioDeviceType. |
| 41 // Static so they can be used by tests. | 42 // Static so they can be used by tests. |
| 42 static std::string GetTypeString(chromeos::AudioDeviceType type); | 43 static std::string GetTypeString(chromeos::AudioDeviceType type); |
| 43 static chromeos::AudioDeviceType GetAudioType(const std::string& node_type); | 44 static chromeos::AudioDeviceType GetAudioType(const std::string& node_type); |
| 44 | 45 |
| 45 // Indicates that an input or output audio device is for simple usage like | 46 // Indicates that an input or output audio device is for simple usage like |
| 46 // playback or recording for user. In contrast, audio device such as | 47 // playback or recording for user. In contrast, audio device such as |
| 47 // loopback, always on keyword recognition (AOKR), and keyboard mic are | 48 // loopback, always on keyword recognition (AOKR), and keyboard mic are |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 return true; | 99 return true; |
| 99 } else { | 100 } else { |
| 100 return false; | 101 return false; |
| 101 } | 102 } |
| 102 } | 103 } |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace chromeos | 106 } // namespace chromeos |
| 106 | 107 |
| 107 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_ | 108 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
| OLD | NEW |