Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Side by Side Diff: media/audio/audio_output_device.cc

Issue 1856673002: Mojofication of the Chrome Audio Rendering Prototype Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/audio/audio_output_controller.cc ('k') | media/audio/audio_parameters.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/callback_helpers.h" 13 #include "base/callback_helpers.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/threading/thread_restrictions.h" 15 #include "base/threading/thread_restrictions.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "base/trace_event/trace_event.h" 17 #include "base/trace_event/trace_event.h"
18 #include "build/build_config.h" 18 #include "build/build_config.h"
19 #include "media/audio/audio_output_controller.h" 19 #include "media/audio/audio_output_controller.h"
20 #include "media/base/limits.h" 20 #include "media/base/limits.h"
21 #include "content/renderer/media/audio_output_client.h"
22 #include "content/browser/mojo/mojo_application_host.h"
21 23
22 namespace media { 24 namespace media {
23 25
24 // Takes care of invoking the render callback on the audio thread. 26 // Takes care of invoking the render callback on the audio thread.
25 // An instance of this class is created for each capture stream in 27 // An instance of this class is created for each capture stream in
26 // OnStreamCreated(). 28 // OnStreamCreated().
27 class AudioOutputDevice::AudioThreadCallback 29 class AudioOutputDevice::AudioThreadCallback
28 : public AudioDeviceThread::Callback { 30 : public AudioDeviceThread::Callback {
29 public: 31 public:
30 AudioThreadCallback(const AudioParameters& audio_parameters, 32 AudioThreadCallback(const AudioParameters& audio_parameters,
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 443
442 // Update the audio-delay measurement, inform about the number of skipped 444 // Update the audio-delay measurement, inform about the number of skipped
443 // frames, and ask client to render audio. Since |output_bus_| is wrapping 445 // frames, and ask client to render audio. Since |output_bus_| is wrapping
444 // the shared memory the Render() call is writing directly into the shared 446 // the shared memory the Render() call is writing directly into the shared
445 // memory. 447 // memory.
446 render_callback_->Render(output_bus_.get(), std::round(frames_delayed), 448 render_callback_->Render(output_bus_.get(), std::round(frames_delayed),
447 frames_skipped); 449 frames_skipped);
448 } 450 }
449 451
450 } // namespace media 452 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_controller.cc ('k') | media/audio/audio_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698