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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/debug/trace_event.h" | |
9 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
10 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "base/trace_event/trace_event.h" |
11 #include "media/audio/audio_output_controller.h" | 11 #include "media/audio/audio_output_controller.h" |
12 #include "media/base/limits.h" | 12 #include "media/base/limits.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 | 15 |
16 // Takes care of invoking the render callback on the audio thread. | 16 // Takes care of invoking the render callback on the audio thread. |
17 // An instance of this class is created for each capture stream in | 17 // An instance of this class is created for each capture stream in |
18 // OnStreamCreated(). | 18 // OnStreamCreated(). |
19 class AudioOutputDevice::AudioThreadCallback | 19 class AudioOutputDevice::AudioThreadCallback |
20 : public AudioDeviceThread::Callback { | 20 : public AudioDeviceThread::Callback { |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 291 |
292 TRACE_EVENT0("audio", "AudioOutputDevice::FireRenderCallback"); | 292 TRACE_EVENT0("audio", "AudioOutputDevice::FireRenderCallback"); |
293 | 293 |
294 // Update the audio-delay measurement then ask client to render audio. Since | 294 // Update the audio-delay measurement then ask client to render audio. Since |
295 // |output_bus_| is wrapping the shared memory the Render() call is writing | 295 // |output_bus_| is wrapping the shared memory the Render() call is writing |
296 // directly into the shared memory. | 296 // directly into the shared memory. |
297 render_callback_->Render(output_bus_.get(), audio_delay_milliseconds); | 297 render_callback_->Render(output_bus_.get(), audio_delay_milliseconds); |
298 } | 298 } |
299 | 299 |
300 } // namespace media. | 300 } // namespace media. |
OLD | NEW |