OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/audio_output_resampler.h" | 5 #include "media/audio/audio_output_resampler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 streams_opened_ = true; | 214 streams_opened_ = true; |
215 return true; | 215 return true; |
216 } | 216 } |
217 | 217 |
218 DLOG(ERROR) << "Unable to open audio device in high latency mode. Falling " | 218 DLOG(ERROR) << "Unable to open audio device in high latency mode. Falling " |
219 << "back to fake audio output."; | 219 << "back to fake audio output."; |
220 | 220 |
221 // Finally fall back to a fake audio output device. | 221 // Finally fall back to a fake audio output device. |
222 output_params_.Reset( | 222 output_params_.Reset( |
223 AudioParameters::AUDIO_FAKE, params_.channel_layout(), | 223 AudioParameters::AUDIO_FAKE, params_.channel_layout(), |
224 params_.channels(), params_.input_channels(), params_.sample_rate(), | 224 params_.input_channels(), params_.sample_rate(), |
225 params_.bits_per_sample(), params_.frames_per_buffer()); | 225 params_.bits_per_sample(), params_.frames_per_buffer()); |
226 Initialize(); | 226 Initialize(); |
227 if (dispatcher_->OpenStream()) { | 227 if (dispatcher_->OpenStream()) { |
228 streams_opened_ = true; | 228 streams_opened_ = true; |
229 return true; | 229 return true; |
230 } | 230 } |
231 | 231 |
232 return false; | 232 return false; |
233 } | 233 } |
234 | 234 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 source_callback_->OnError(stream, code); | 391 source_callback_->OnError(stream, code); |
392 } | 392 } |
393 | 393 |
394 void OnMoreDataConverter::WaitTillDataReady() { | 394 void OnMoreDataConverter::WaitTillDataReady() { |
395 base::AutoLock auto_lock(source_lock_); | 395 base::AutoLock auto_lock(source_lock_); |
396 if (source_callback_) | 396 if (source_callback_) |
397 source_callback_->WaitTillDataReady(); | 397 source_callback_->WaitTillDataReady(); |
398 } | 398 } |
399 | 399 |
400 } // namespace media | 400 } // namespace media |
OLD | NEW |