| 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/pulse/audio_manager_pulse.h" | 5 #include "media/audio/pulse/audio_manager_pulse.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/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 } else { | 174 } else { |
| 175 sample_rate = GetNativeSampleRate(); | 175 sample_rate = GetNativeSampleRate(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 int user_buffer_size = GetUserBufferSize(); | 178 int user_buffer_size = GetUserBufferSize(); |
| 179 if (user_buffer_size) | 179 if (user_buffer_size) |
| 180 buffer_size = user_buffer_size; | 180 buffer_size = user_buffer_size; |
| 181 | 181 |
| 182 return AudioParameters( | 182 return AudioParameters( |
| 183 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, input_channels, | 183 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, input_channels, |
| 184 sample_rate, bits_per_sample, buffer_size); | 184 sample_rate, bits_per_sample, buffer_size, AudioParameters::NO_EFFECTS); |
| 185 } | 185 } |
| 186 | 186 |
| 187 AudioOutputStream* AudioManagerPulse::MakeOutputStream( | 187 AudioOutputStream* AudioManagerPulse::MakeOutputStream( |
| 188 const AudioParameters& params, const std::string& input_device_id) { | 188 const AudioParameters& params, const std::string& input_device_id) { |
| 189 if (params.input_channels()) { | 189 if (params.input_channels()) { |
| 190 return new PulseAudioUnifiedStream(params, input_device_id, this); | 190 return new PulseAudioUnifiedStream(params, input_device_id, this); |
| 191 } | 191 } |
| 192 | 192 |
| 193 return new PulseAudioOutputStream(params, this); | 193 return new PulseAudioOutputStream(params, this); |
| 194 } | 194 } |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 void AudioManagerPulse::SampleRateInfoCallback(pa_context* context, | 325 void AudioManagerPulse::SampleRateInfoCallback(pa_context* context, |
| 326 const pa_server_info* info, | 326 const pa_server_info* info, |
| 327 void* user_data) { | 327 void* user_data) { |
| 328 AudioManagerPulse* manager = reinterpret_cast<AudioManagerPulse*>(user_data); | 328 AudioManagerPulse* manager = reinterpret_cast<AudioManagerPulse*>(user_data); |
| 329 | 329 |
| 330 manager->native_input_sample_rate_ = info->sample_spec.rate; | 330 manager->native_input_sample_rate_ = info->sample_spec.rate; |
| 331 pa_threaded_mainloop_signal(manager->input_mainloop_, 0); | 331 pa_threaded_mainloop_signal(manager->input_mainloop_, 0); |
| 332 } | 332 } |
| 333 | 333 |
| 334 } // namespace media | 334 } // namespace media |
| OLD | NEW |