| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/nix/xdg_util.h" | 10 #include "base/nix/xdg_util.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 72 } |
| 73 | 73 |
| 74 AudioOutputStream* AudioManagerCras::MakeLinearOutputStream( | 74 AudioOutputStream* AudioManagerCras::MakeLinearOutputStream( |
| 75 const AudioParameters& params) { | 75 const AudioParameters& params) { |
| 76 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 76 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 77 return MakeOutputStream(params); | 77 return MakeOutputStream(params); |
| 78 } | 78 } |
| 79 | 79 |
| 80 AudioOutputStream* AudioManagerCras::MakeLowLatencyOutputStream( | 80 AudioOutputStream* AudioManagerCras::MakeLowLatencyOutputStream( |
| 81 const AudioParameters& params, | 81 const AudioParameters& params, |
| 82 const std::string& device_id, | 82 const std::string& device_id) { |
| 83 const std::string& input_device_id) { | |
| 84 DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; | 83 DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; |
| 85 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); | 84 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); |
| 86 // TODO(dgreid): Open the correct input device for unified IO. | 85 // TODO(dgreid): Open the correct input device for unified IO. |
| 87 return MakeOutputStream(params); | 86 return MakeOutputStream(params); |
| 88 } | 87 } |
| 89 | 88 |
| 90 AudioInputStream* AudioManagerCras::MakeLinearInputStream( | 89 AudioInputStream* AudioManagerCras::MakeLinearInputStream( |
| 91 const AudioParameters& params, const std::string& device_id) { | 90 const AudioParameters& params, const std::string& device_id) { |
| 92 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 91 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 93 return MakeInputStream(params, device_id); | 92 return MakeInputStream(params, device_id); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 case 24: | 146 case 24: |
| 148 return SND_PCM_FORMAT_S24; | 147 return SND_PCM_FORMAT_S24; |
| 149 case 32: | 148 case 32: |
| 150 return SND_PCM_FORMAT_S32; | 149 return SND_PCM_FORMAT_S32; |
| 151 default: | 150 default: |
| 152 return SND_PCM_FORMAT_UNKNOWN; | 151 return SND_PCM_FORMAT_UNKNOWN; |
| 153 } | 152 } |
| 154 } | 153 } |
| 155 | 154 |
| 156 } // namespace media | 155 } // namespace media |
| OLD | NEW |