| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 // Gets the audio devices back in |device_list|. | 131 // Gets the audio devices back in |device_list|. |
| 132 virtual void GetAudioDevices(AudioDeviceList* device_list) const; | 132 virtual void GetAudioDevices(AudioDeviceList* device_list) const; |
| 133 | 133 |
| 134 virtual bool GetActiveOutputDevice(AudioDevice* device) const; | 134 virtual bool GetActiveOutputDevice(AudioDevice* device) const; |
| 135 | 135 |
| 136 // Whether there is alternative input/output audio device. | 136 // Whether there is alternative input/output audio device. |
| 137 virtual bool has_alternative_input() const; | 137 virtual bool has_alternative_input() const; |
| 138 virtual bool has_alternative_output() const; | 138 virtual bool has_alternative_output() const; |
| 139 | 139 |
| 140 // Sets volume level from 0-100%. If less than kMuteThresholdPercent, then | 140 // Sets volume level to |volume_percent|, whose range is from 0-100%. |
| 141 // mutes the sound. If it was muted, and |volume_percent| is larger than | |
| 142 // the threshold, then the sound is unmuted. | |
| 143 virtual void SetOutputVolumePercent(int volume_percent); | 141 virtual void SetOutputVolumePercent(int volume_percent); |
| 144 | 142 |
| 145 // Sets gain level from 0-100%. | 143 // Sets gain level to |gain_percent|, whose range is from 0-100%. |
| 146 virtual void SetInputGainPercent(int gain_percent); | 144 virtual void SetInputGainPercent(int gain_percent); |
| 147 | 145 |
| 148 // Adjusts volume up (positive percentage) or down (negative percentage). | 146 // Adjusts volume up (positive percentage) or down (negative percentage). |
| 149 virtual void AdjustOutputVolumeByPercent(int adjust_by_percent); | 147 virtual void AdjustOutputVolumeByPercent(int adjust_by_percent); |
| 150 | 148 |
| 151 // Adjusts output volume to a minimum audible level if it is too low. | 149 // Adjusts output volume to a minimum audible level if it is too low. |
| 152 virtual void AdjustOutputVolumeToAudibleLevel(); | 150 virtual void AdjustOutputVolumeToAudibleLevel(); |
| 153 | 151 |
| 154 // Mutes or unmutes audio output device. | 152 // Mutes or unmutes audio output device. |
| 155 virtual void SetOutputMute(bool mute_on); | 153 virtual void SetOutputMute(bool mute_on); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 250 |
| 253 bool output_mute_locked_; | 251 bool output_mute_locked_; |
| 254 bool input_mute_locked_; | 252 bool input_mute_locked_; |
| 255 | 253 |
| 256 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 254 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
| 257 }; | 255 }; |
| 258 | 256 |
| 259 } // namespace chromeos | 257 } // namespace chromeos |
| 260 | 258 |
| 261 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 259 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
| OLD | NEW |