Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
ajm
2015/09/09 01:01:29
It looks like there aren't any bots building the "
| |
| 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/openbsd/audio_manager_openbsd.h" | 5 #include "media/audio/openbsd/audio_manager_openbsd.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 sample_rate = input_params.sample_rate(); | 131 sample_rate = input_params.sample_rate(); |
| 132 bits_per_sample = input_params.bits_per_sample(); | 132 bits_per_sample = input_params.bits_per_sample(); |
| 133 channel_layout = input_params.channel_layout(); | 133 channel_layout = input_params.channel_layout(); |
| 134 buffer_size = std::min(buffer_size, input_params.frames_per_buffer()); | 134 buffer_size = std::min(buffer_size, input_params.frames_per_buffer()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 int user_buffer_size = GetUserBufferSize(); | 137 int user_buffer_size = GetUserBufferSize(); |
| 138 if (user_buffer_size) | 138 if (user_buffer_size) |
| 139 buffer_size = user_buffer_size; | 139 buffer_size = user_buffer_size; |
| 140 | 140 |
| 141 return AudioParameters( | 141 return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, |
| 142 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, | 142 sample_rate, bits_per_sample, buffer_size); |
| 143 sample_rate, bits_per_sample, buffer_size, AudioParameters::NO_EFFECTS); | |
| 144 } | 143 } |
| 145 | 144 |
| 146 AudioOutputStream* AudioManagerOpenBSD::MakeOutputStream( | 145 AudioOutputStream* AudioManagerOpenBSD::MakeOutputStream( |
| 147 const AudioParameters& params) { | 146 const AudioParameters& params) { |
| 148 if (pulse_library_is_initialized_) | 147 if (pulse_library_is_initialized_) |
| 149 return new PulseAudioOutputStream(params, this); | 148 return new PulseAudioOutputStream(params, this); |
| 150 | 149 |
| 151 return NULL; | 150 return NULL; |
| 152 } | 151 } |
| 153 | 152 |
| 154 // TODO(xians): Merge AudioManagerOpenBSD with AudioManagerPulse; | 153 // TODO(xians): Merge AudioManagerOpenBSD with AudioManagerPulse; |
| 155 // static | 154 // static |
| 156 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { | 155 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { |
| 157 return new AudioManagerOpenBSD(audio_log_factory); | 156 return new AudioManagerOpenBSD(audio_log_factory); |
| 158 } | 157 } |
| 159 | 158 |
| 160 } // namespace media | 159 } // namespace media |
| OLD | NEW |