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

Side by Side Diff: media/audio/cras/audio_manager_cras.cc

Issue 2886993002: Fix compile error in audio_manager_cras when dcheck_always_on=true (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "media/audio/cras/audio_manager_cras.h" 5 #include "media/audio/cras/audio_manager_cras.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return device.mic_positions; 85 return device.mic_positions;
86 } 86 }
87 } 87 }
88 return ""; 88 return "";
89 } 89 }
90 90
91 // Process |device_list| that two shares the same dev_index by creating a 91 // Process |device_list| that two shares the same dev_index by creating a
92 // virtual device name for them. 92 // virtual device name for them.
93 void ProcessVirtualDeviceName(AudioDeviceNames* device_names, 93 void ProcessVirtualDeviceName(AudioDeviceNames* device_names,
94 const chromeos::AudioDeviceList& device_list) { 94 const chromeos::AudioDeviceList& device_list) {
95 DCHECK_EQ(2, device_list.size()); 95 DCHECK_EQ(2U, device_list.size());
96 if (device_list[0].type == chromeos::AUDIO_TYPE_LINEOUT || 96 if (device_list[0].type == chromeos::AUDIO_TYPE_LINEOUT ||
97 device_list[1].type == chromeos::AUDIO_TYPE_LINEOUT) { 97 device_list[1].type == chromeos::AUDIO_TYPE_LINEOUT) {
98 device_names->emplace_back(kHeadphoneLineOutVirtualDevice, 98 device_names->emplace_back(kHeadphoneLineOutVirtualDevice,
99 base::Uint64ToString(device_list[0].id)); 99 base::Uint64ToString(device_list[0].id));
100 } else if (device_list[0].type == chromeos::AUDIO_TYPE_INTERNAL_SPEAKER || 100 } else if (device_list[0].type == chromeos::AUDIO_TYPE_INTERNAL_SPEAKER ||
101 device_list[1].type == chromeos::AUDIO_TYPE_INTERNAL_SPEAKER) { 101 device_list[1].type == chromeos::AUDIO_TYPE_INTERNAL_SPEAKER) {
102 device_names->emplace_back(kInternalOutputVirtualDevice, 102 device_names->emplace_back(kInternalOutputVirtualDevice,
103 base::Uint64ToString(device_list[0].id)); 103 base::Uint64ToString(device_list[0].id));
104 } else { 104 } else {
105 DCHECK(device_list[0].type == chromeos::AUDIO_TYPE_INTERNAL_MIC || 105 DCHECK(device_list[0].type == chromeos::AUDIO_TYPE_INTERNAL_MIC ||
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 bool AudioManagerCras::IsDefault(const std::string& device_id, bool is_input) { 364 bool AudioManagerCras::IsDefault(const std::string& device_id, bool is_input) {
365 AudioDeviceNames device_names; 365 AudioDeviceNames device_names;
366 GetAudioDeviceNamesImpl(is_input, &device_names); 366 GetAudioDeviceNamesImpl(is_input, &device_names);
367 DCHECK(!device_names.empty()); 367 DCHECK(!device_names.empty());
368 const AudioDeviceName& device_name = device_names.front(); 368 const AudioDeviceName& device_name = device_names.front();
369 return device_name.unique_id == device_id; 369 return device_name.unique_id == device_id;
370 } 370 }
371 371
372 } // namespace media 372 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698