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

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

Issue 2856493002: [Merge to M59] cros: Update virtual audio label name to Built-in mic/speaker (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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Define bounds for the output buffer size. 43 // Define bounds for the output buffer size.
44 const int kMinimumOutputBufferSize = 512; 44 const int kMinimumOutputBufferSize = 512;
45 const int kMaximumOutputBufferSize = 8192; 45 const int kMaximumOutputBufferSize = 8192;
46 46
47 // Default input buffer size. 47 // Default input buffer size.
48 const int kDefaultInputBufferSize = 1024; 48 const int kDefaultInputBufferSize = 1024;
49 49
50 const char kBeamformingOnDeviceId[] = "default-beamforming-on"; 50 const char kBeamformingOnDeviceId[] = "default-beamforming-on";
51 const char kBeamformingOffDeviceId[] = "default-beamforming-off"; 51 const char kBeamformingOffDeviceId[] = "default-beamforming-off";
52 52
53 const char kInternalInputDevice[] = "Built-in-mic"; 53 const char kInternalInputDevice[] = "Built-in mic";
54 const char kInternalOutputDevice[] = "Built-in-speaker"; 54 const char kInternalOutputDevice[] = "Built-in speaker";
55 55
56 enum CrosBeamformingDeviceState { 56 enum CrosBeamformingDeviceState {
57 BEAMFORMING_DEFAULT_ENABLED = 0, 57 BEAMFORMING_DEFAULT_ENABLED = 0,
58 BEAMFORMING_USER_ENABLED, 58 BEAMFORMING_USER_ENABLED,
59 BEAMFORMING_DEFAULT_DISABLED, 59 BEAMFORMING_DEFAULT_DISABLED,
60 BEAMFORMING_USER_DISABLED, 60 BEAMFORMING_USER_DISABLED,
61 BEAMFORMING_STATE_MAX = BEAMFORMING_USER_DISABLED 61 BEAMFORMING_STATE_MAX = BEAMFORMING_USER_DISABLED
62 }; 62 };
63 63
64 void RecordBeamformingDeviceState(CrosBeamformingDeviceState state) { 64 void RecordBeamformingDeviceState(CrosBeamformingDeviceState state) {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 bool AudioManagerCras::IsDefault(const std::string& device_id, bool is_input) { 360 bool AudioManagerCras::IsDefault(const std::string& device_id, bool is_input) {
361 AudioDeviceNames device_names; 361 AudioDeviceNames device_names;
362 GetAudioDeviceNamesImpl(is_input, &device_names); 362 GetAudioDeviceNamesImpl(is_input, &device_names);
363 DCHECK(!device_names.empty()); 363 DCHECK(!device_names.empty());
364 const AudioDeviceName& device_name = device_names.front(); 364 const AudioDeviceName& device_name = device_names.front();
365 return device_name.unique_id == device_id; 365 return device_name.unique_id == device_id;
366 } 366 }
367 367
368 } // namespace media 368 } // 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