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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/numerics/safe_conversions.h" | 11 #include "base/numerics/safe_conversions.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/time/time.h" | |
14 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
15 #include "build/build_config.h" | 14 #include "build/build_config.h" |
16 #include "media/audio/audio_io.h" | |
17 #include "media/audio/audio_output_dispatcher_impl.h" | |
18 #include "media/audio/audio_output_proxy.h" | 15 #include "media/audio/audio_output_proxy.h" |
19 #include "media/audio/sample_rates.h" | 16 #include "media/audio/sample_rates.h" |
20 #include "media/base/audio_converter.h" | 17 #include "media/base/audio_converter.h" |
21 #include "media/base/limits.h" | 18 #include "media/base/limits.h" |
22 | 19 |
23 namespace media { | 20 namespace media { |
24 | 21 |
25 class OnMoreDataConverter | 22 class OnMoreDataConverter |
26 : public AudioOutputStream::AudioSourceCallback, | 23 : public AudioOutputStream::AudioSourceCallback, |
27 public AudioConverter::InputCallback { | 24 public AudioConverter::InputCallback { |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 if (frames > 0 && frames < dest->frames()) | 383 if (frames > 0 && frames < dest->frames()) |
387 dest->ZeroFramesPartial(frames, dest->frames() - frames); | 384 dest->ZeroFramesPartial(frames, dest->frames() - frames); |
388 return frames > 0 ? 1 : 0; | 385 return frames > 0 ? 1 : 0; |
389 } | 386 } |
390 | 387 |
391 void OnMoreDataConverter::OnError(AudioOutputStream* stream) { | 388 void OnMoreDataConverter::OnError(AudioOutputStream* stream) { |
392 source_callback_->OnError(stream); | 389 source_callback_->OnError(stream); |
393 } | 390 } |
394 | 391 |
395 } // namespace media | 392 } // namespace media |
OLD | NEW |