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 #include "chromeos/dbus/fake_cras_audio_client.h" | 5 #include "chromeos/dbus/fake_cras_audio_client.h" |
6 | 6 |
7 namespace chromeos { | 7 namespace chromeos { |
8 | 8 |
9 FakeCrasAudioClient::FakeCrasAudioClient() | 9 FakeCrasAudioClient::FakeCrasAudioClient() |
10 : active_input_node_id_(0), | 10 : active_input_node_id_(0), |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 void FakeCrasAudioClient::RemoveActiveInputNode(uint64_t node_id) { | 161 void FakeCrasAudioClient::RemoveActiveInputNode(uint64_t node_id) { |
162 for (size_t i = 0; i < node_list_.size(); ++i) { | 162 for (size_t i = 0; i < node_list_.size(); ++i) { |
163 if (node_list_[i].id == node_id) | 163 if (node_list_[i].id == node_id) |
164 node_list_[i].active = false; | 164 node_list_[i].active = false; |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
168 void FakeCrasAudioClient::SwapLeftRight(uint64_t node_id, bool swap) {} | 168 void FakeCrasAudioClient::SwapLeftRight(uint64_t node_id, bool swap) {} |
169 | 169 |
| 170 void FakeCrasAudioClient::SetGlobalOutputChannelRemix( |
| 171 int32_t channels, const std::vector<double>& mixer) {} |
| 172 |
170 void FakeCrasAudioClient::AddActiveOutputNode(uint64_t node_id) { | 173 void FakeCrasAudioClient::AddActiveOutputNode(uint64_t node_id) { |
171 for (size_t i = 0; i < node_list_.size(); ++i) { | 174 for (size_t i = 0; i < node_list_.size(); ++i) { |
172 if (node_list_[i].id == node_id) | 175 if (node_list_[i].id == node_id) |
173 node_list_[i].active = true; | 176 node_list_[i].active = true; |
174 } | 177 } |
175 } | 178 } |
176 | 179 |
177 void FakeCrasAudioClient::WaitForServiceToBeAvailable( | 180 void FakeCrasAudioClient::WaitForServiceToBeAvailable( |
178 const WaitForServiceToBeAvailableCallback& callback) { | 181 const WaitForServiceToBeAvailableCallback& callback) { |
179 callback.Run(true); | 182 callback.Run(true); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); | 217 FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); |
215 } | 218 } |
216 | 219 |
217 AudioNodeList::iterator FakeCrasAudioClient::FindNode(uint64_t node_id) { | 220 AudioNodeList::iterator FakeCrasAudioClient::FindNode(uint64_t node_id) { |
218 return std::find_if( | 221 return std::find_if( |
219 node_list_.begin(), node_list_.end(), | 222 node_list_.begin(), node_list_.end(), |
220 [node_id](const AudioNode& node) { return node_id == node.id; }); | 223 [node_id](const AudioNode& node) { return node_id == node.id; }); |
221 } | 224 } |
222 | 225 |
223 } // namespace chromeos | 226 } // namespace chromeos |
OLD | NEW |