Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: chromeos/audio/audio_device.cc

Issue 2721733003: Handle the dual microphones and dual cameras cases. Activate the proper microphone when user activa… (Closed)
Patch Set: Nit: log only the invalid camera facing mode value. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | chromeos/audio/cras_audio_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/audio/audio_device.h" 5 #include "chromeos/audio/audio_device.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 "active = %s ", 179 "active = %s ",
180 active ? "true" : "false"); 180 active ? "true" : "false");
181 base::StringAppendF(&result, 181 base::StringAppendF(&result,
182 "plugged_time= %s ", 182 "plugged_time= %s ",
183 base::Uint64ToString(plugged_time).c_str()); 183 base::Uint64ToString(plugged_time).c_str());
184 base::StringAppendF(&result, "mic_positions = %s ", mic_positions.c_str()); 184 base::StringAppendF(&result, "mic_positions = %s ", mic_positions.c_str());
185 185
186 return result; 186 return result;
187 } 187 }
188 188
189 bool AudioDevice::IsExternalDevice() const {
190 if (!is_for_simple_usage())
191 return false;
192
193 if (is_input) {
194 return (type != AUDIO_TYPE_INTERNAL_MIC && type != AUDIO_TYPE_FRONT_MIC &&
195 type != AUDIO_TYPE_REAR_MIC);
196 } else {
197 return (type != AUDIO_TYPE_INTERNAL_SPEAKER);
198 }
199 }
200
189 } // namespace chromeos 201 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | chromeos/audio/cras_audio_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698