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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // Removes an active audio node. | 177 // Removes an active audio node. |
178 // If |node_id| is the only active input/output node, or is an additional | 178 // If |node_id| is the only active input/output node, or is an additional |
179 // active input/output node, it will be removed and becomes inactive. | 179 // active input/output node, it will be removed and becomes inactive. |
180 // Note: It is not proper call this api to remove the primary active node | 180 // Note: It is not proper call this api to remove the primary active node |
181 // while there are additional active nodes. | 181 // while there are additional active nodes. |
182 virtual void RemoveActiveNode(uint64 node_id); | 182 virtual void RemoveActiveNode(uint64 node_id); |
183 | 183 |
184 // Removes all active audio nodes, including the primary active ones. | 184 // Removes all active audio nodes, including the primary active ones. |
185 virtual void RemoveAllActiveNodes(); | 185 virtual void RemoveAllActiveNodes(); |
186 | 186 |
| 187 // Swaps the left and right channel of the primary active output device. |
| 188 // Swap the left and right channel if |swap| is true; otherwise, swap the left |
| 189 // and right channel back to the normal mode. |
| 190 // If the feature is not supported on the primary active output node, nothing |
| 191 // happens. |
| 192 virtual void SwapLeftRight(bool swap); |
| 193 |
187 // Enables error logging. | 194 // Enables error logging. |
188 virtual void LogErrors(); | 195 virtual void LogErrors(); |
189 | 196 |
190 protected: | 197 protected: |
191 explicit CrasAudioHandler( | 198 explicit CrasAudioHandler( |
192 scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler); | 199 scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler); |
193 virtual ~CrasAudioHandler(); | 200 virtual ~CrasAudioHandler(); |
194 | 201 |
195 private: | 202 private: |
196 friend class CrasAudioHandlerTest; | 203 friend class CrasAudioHandlerTest; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 bool log_errors_; | 319 bool log_errors_; |
313 | 320 |
314 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; | 321 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; |
315 | 322 |
316 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 323 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
317 }; | 324 }; |
318 | 325 |
319 } // namespace chromeos | 326 } // namespace chromeos |
320 | 327 |
321 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 328 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
OLD | NEW |