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

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

Issue 1540803002: Switch to standard integer types in chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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/audio_devices_pref_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>
8
7 #include "base/format_macros.h" 9 #include "base/format_macros.h"
8 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
11 13
12 namespace chromeos { 14 namespace chromeos {
13 15
14 namespace { 16 namespace {
15 17
16 // Get the priority for a particular device type. The priority returned 18 // Get the priority for a particular device type. The priority returned
17 // will be between 0 to 3, the higher number meaning a higher priority. 19 // will be between 0 to 3, the higher number meaning a higher priority.
18 uint8 GetDevicePriority(AudioDeviceType type, bool is_input) { 20 uint8_t GetDevicePriority(AudioDeviceType type, bool is_input) {
19 // Lower the priority of bluetooth mic to prevent unexpected bad eperience 21 // Lower the priority of bluetooth mic to prevent unexpected bad eperience
20 // to user because of bluetooth audio profile switching. Make priority to 22 // to user because of bluetooth audio profile switching. Make priority to
21 // zero so this mic will never be automatically chosen. 23 // zero so this mic will never be automatically chosen.
22 if (type == AUDIO_TYPE_BLUETOOTH && is_input) 24 if (type == AUDIO_TYPE_BLUETOOTH && is_input)
23 return 0; 25 return 0;
24 switch (type) { 26 switch (type) {
25 case AUDIO_TYPE_HEADPHONE: 27 case AUDIO_TYPE_HEADPHONE:
26 case AUDIO_TYPE_MIC: 28 case AUDIO_TYPE_MIC:
27 case AUDIO_TYPE_USB: 29 case AUDIO_TYPE_USB:
28 case AUDIO_TYPE_BLUETOOTH: 30 case AUDIO_TYPE_BLUETOOTH:
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 active ? "true" : "false"); 153 active ? "true" : "false");
152 base::StringAppendF(&result, 154 base::StringAppendF(&result,
153 "plugged_time= %s ", 155 "plugged_time= %s ",
154 base::Uint64ToString(plugged_time).c_str()); 156 base::Uint64ToString(plugged_time).c_str());
155 base::StringAppendF(&result, "mic_positions = %s ", mic_positions.c_str()); 157 base::StringAppendF(&result, "mic_positions = %s ", mic_positions.c_str());
156 158
157 return result; 159 return result;
158 } 160 }
159 161
160 } // namespace chromeos 162 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | chromeos/audio/audio_devices_pref_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698