| OLD | NEW |
| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 } else if (device_id == beamforming_off_device_id_) { | 221 } else if (device_id == beamforming_off_device_id_) { |
| 222 if (!IsBeamformingDefaultEnabled()) | 222 if (!IsBeamformingDefaultEnabled()) |
| 223 RecordBeamformingDeviceState(BEAMFORMING_DEFAULT_DISABLED); | 223 RecordBeamformingDeviceState(BEAMFORMING_DEFAULT_DISABLED); |
| 224 else | 224 else |
| 225 RecordBeamformingDeviceState(BEAMFORMING_USER_DISABLED); | 225 RecordBeamformingDeviceState(BEAMFORMING_USER_DISABLED); |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 return params; | 228 return params; |
| 229 } | 229 } |
| 230 | 230 |
| 231 const char* AudioManagerCras::GetName() { |
| 232 return "CRAS"; |
| 233 } |
| 234 |
| 231 AudioOutputStream* AudioManagerCras::MakeLinearOutputStream( | 235 AudioOutputStream* AudioManagerCras::MakeLinearOutputStream( |
| 232 const AudioParameters& params, | 236 const AudioParameters& params, |
| 233 const LogCallback& log_callback) { | 237 const LogCallback& log_callback) { |
| 234 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 238 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 235 return MakeOutputStream(params); | 239 return MakeOutputStream(params); |
| 236 } | 240 } |
| 237 | 241 |
| 238 AudioOutputStream* AudioManagerCras::MakeLowLatencyOutputStream( | 242 AudioOutputStream* AudioManagerCras::MakeLowLatencyOutputStream( |
| 239 const AudioParameters& params, | 243 const AudioParameters& params, |
| 240 const std::string& device_id, | 244 const std::string& device_id, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 case 24: | 310 case 24: |
| 307 return SND_PCM_FORMAT_S24; | 311 return SND_PCM_FORMAT_S24; |
| 308 case 32: | 312 case 32: |
| 309 return SND_PCM_FORMAT_S32; | 313 return SND_PCM_FORMAT_S32; |
| 310 default: | 314 default: |
| 311 return SND_PCM_FORMAT_UNKNOWN; | 315 return SND_PCM_FORMAT_UNKNOWN; |
| 312 } | 316 } |
| 313 } | 317 } |
| 314 | 318 |
| 315 } // namespace media | 319 } // namespace media |
| OLD | NEW |