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. |
131 virtual void GetAudioDevices(AudioDeviceList* device_list) const; | 133 virtual void GetAudioDevices(AudioDeviceList* device_list) const; |
132 | 134 |
133 virtual bool GetPrimaryActiveOutputDevice(AudioDevice* device) const; | 135 virtual bool GetPrimaryActiveOutputDevice(AudioDevice* device) const; |
134 | 136 |
135 // Whether there is alternative input/output audio device. | 137 // Whether there is alternative input/output audio device. |
136 virtual bool has_alternative_input() const; | 138 virtual bool has_alternative_input() const; |
137 virtual bool has_alternative_output() const; | 139 virtual bool has_alternative_output() const; |
138 | 140 |
139 // Sets all active output devices' volume level to |volume_percent|, whose | 141 // Sets all active output devices' volume level to |volume_percent|, whose |
140 // range is from 0-100%. | 142 // range is from 0-100%. |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 bool hdmi_rediscovering_; | 356 bool hdmi_rediscovering_; |
355 | 357 |
356 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; | 358 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; |
357 | 359 |
358 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 360 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
359 }; | 361 }; |
360 | 362 |
361 } // namespace chromeos | 363 } // namespace chromeos |
362 | 364 |
363 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 365 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
OLD | NEW |