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_device.h" | 5 #include "media/audio/audio_output_device.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| 11 #include "base/macros.h" |
8 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
9 #include "base/time/time.h" | 13 #include "base/time/time.h" |
10 #include "base/trace_event/trace_event.h" | 14 #include "base/trace_event/trace_event.h" |
| 15 #include "build/build_config.h" |
11 #include "media/audio/audio_output_controller.h" | 16 #include "media/audio/audio_output_controller.h" |
12 #include "media/base/limits.h" | 17 #include "media/base/limits.h" |
13 | 18 |
14 namespace media { | 19 namespace media { |
15 | 20 |
16 // Takes care of invoking the render callback on the audio thread. | 21 // Takes care of invoking the render callback on the audio thread. |
17 // An instance of this class is created for each capture stream in | 22 // An instance of this class is created for each capture stream in |
18 // OnStreamCreated(). | 23 // OnStreamCreated(). |
19 class AudioOutputDevice::AudioThreadCallback | 24 class AudioOutputDevice::AudioThreadCallback |
20 : public AudioDeviceThread::Callback { | 25 : public AudioDeviceThread::Callback { |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 | 434 |
430 // Update the audio-delay measurement, inform about the number of skipped | 435 // Update the audio-delay measurement, inform about the number of skipped |
431 // frames, and ask client to render audio. Since |output_bus_| is wrapping | 436 // frames, and ask client to render audio. Since |output_bus_| is wrapping |
432 // the shared memory the Render() call is writing directly into the shared | 437 // the shared memory the Render() call is writing directly into the shared |
433 // memory. | 438 // memory. |
434 render_callback_->Render(output_bus_.get(), audio_delay_milliseconds, | 439 render_callback_->Render(output_bus_.get(), audio_delay_milliseconds, |
435 frames_skipped); | 440 frames_skipped); |
436 } | 441 } |
437 | 442 |
438 } // namespace media | 443 } // namespace media |
OLD | NEW |