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_CRAS_AUDIO_HANDLER_H_ | 5 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // Returns true if audio input is muted. | 93 // Returns true if audio input is muted. |
94 virtual bool IsInputMuted(); | 94 virtual bool IsInputMuted(); |
95 | 95 |
96 // Returns true if audio input is muted for a device. | 96 // Returns true if audio input is muted for a device. |
97 virtual bool IsInputMutedForDevice(uint64 device_id); | 97 virtual bool IsInputMutedForDevice(uint64 device_id); |
98 | 98 |
99 // Returns true if the output volume is below the default mute volume level. | 99 // Returns true if the output volume is below the default mute volume level. |
100 virtual bool IsOutputVolumeBelowDefaultMuteLvel(); | 100 virtual bool IsOutputVolumeBelowDefaultMuteLvel(); |
101 | 101 |
102 // Returns volume level in 0-100% range at which the volume should be muted. | |
103 virtual int GetOutputDefaultVolumeMuteThreshold(); | |
104 | |
105 // Gets volume level in 0-100% range (0 being pure silence) for the current | 102 // Gets volume level in 0-100% range (0 being pure silence) for the current |
106 // active node. | 103 // active node. |
107 virtual int GetOutputVolumePercent(); | 104 virtual int GetOutputVolumePercent(); |
108 | 105 |
109 // Gets volume level in 0-100% range (0 being pure silence) for a device. | 106 // Gets volume level in 0-100% range (0 being pure silence) for a device. |
110 virtual int GetOutputVolumePercentForDevice(uint64 device_id); | 107 virtual int GetOutputVolumePercentForDevice(uint64 device_id); |
111 | 108 |
112 // Gets gain level in 0-100% range (0 being pure silence) for the current | 109 // Gets gain level in 0-100% range (0 being pure silence) for the current |
113 // active node. | 110 // active node. |
114 virtual int GetInputGainPercent(); | 111 virtual int GetInputGainPercent(); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 268 |
272 // Failures are not logged at startup, since CRAS may not be running yet. | 269 // Failures are not logged at startup, since CRAS may not be running yet. |
273 bool log_errors_; | 270 bool log_errors_; |
274 | 271 |
275 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 272 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
276 }; | 273 }; |
277 | 274 |
278 } // namespace chromeos | 275 } // namespace chromeos |
279 | 276 |
280 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 277 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
OLD | NEW |