| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // Gets volume level in 0-100% range (0 being pure silence) for a device. | 121 // Gets volume level in 0-100% range (0 being pure silence) for a device. |
| 122 virtual int GetInputGainPercentForDevice(uint64_t device_id); | 122 virtual int GetInputGainPercentForDevice(uint64_t device_id); |
| 123 | 123 |
| 124 // Returns node_id of the primary active output node. | 124 // Returns node_id of the primary active output node. |
| 125 virtual uint64_t GetPrimaryActiveOutputNode() const; | 125 virtual uint64_t GetPrimaryActiveOutputNode() const; |
| 126 | 126 |
| 127 // Returns the node_id of the primary active input node. | 127 // Returns the node_id of the primary active input node. |
| 128 virtual uint64_t GetPrimaryActiveInputNode() const; | 128 virtual uint64_t GetPrimaryActiveInputNode() const; |
| 129 | 129 |
| 130 // Gets the audio devices back in |device_list|. | 130 // Gets the audio devices back in |device_list|. |
| 131 // This call can be invoked from I/O thread or UI thread because | |
| 132 // it does not need to access CrasAudioClient on DBus. | |
| 133 virtual void GetAudioDevices(AudioDeviceList* device_list) const; | 131 virtual void GetAudioDevices(AudioDeviceList* device_list) const; |
| 134 | 132 |
| 135 virtual bool GetPrimaryActiveOutputDevice(AudioDevice* device) const; | 133 virtual bool GetPrimaryActiveOutputDevice(AudioDevice* device) const; |
| 136 | 134 |
| 137 // Whether there is alternative input/output audio device. | 135 // Whether there is alternative input/output audio device. |
| 138 virtual bool has_alternative_input() const; | 136 virtual bool has_alternative_input() const; |
| 139 virtual bool has_alternative_output() const; | 137 virtual bool has_alternative_output() const; |
| 140 | 138 |
| 141 // Sets all active output devices' volume level to |volume_percent|, whose | 139 // Sets all active output devices' volume level to |volume_percent|, whose |
| 142 // range is from 0-100%. | 140 // range is from 0-100%. |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 bool hdmi_rediscovering_; | 354 bool hdmi_rediscovering_; |
| 357 | 355 |
| 358 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; | 356 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; |
| 359 | 357 |
| 360 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 358 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
| 361 }; | 359 }; |
| 362 | 360 |
| 363 } // namespace chromeos | 361 } // namespace chromeos |
| 364 | 362 |
| 365 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 363 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
| OLD | NEW |