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

Side by Side Diff: content/renderer/media/renderer_webaudiodevice_impl.h

Issue 2452183003: Revert of Make more media APIs aware of |delay| and |delay_timestamp| (Closed)
Patch Set: Created 4 years, 1 month 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
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 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 23 matching lines...) Expand all
34 int session_id, 34 int session_id,
35 const url::Origin& security_origin); 35 const url::Origin& security_origin);
36 ~RendererWebAudioDeviceImpl() override; 36 ~RendererWebAudioDeviceImpl() override;
37 37
38 // blink::WebAudioDevice implementation. 38 // blink::WebAudioDevice implementation.
39 void start() override; 39 void start() override;
40 void stop() override; 40 void stop() override;
41 double sampleRate() override; 41 double sampleRate() override;
42 42
43 // AudioRendererSink::RenderCallback implementation. 43 // AudioRendererSink::RenderCallback implementation.
44 int Render(base::TimeDelta delay, 44 int Render(media::AudioBus* dest,
45 base::TimeTicks delay_timestamp, 45 uint32_t frames_delayed,
46 int prior_frames_skipped, 46 uint32_t frames_skipped) override;
47 media::AudioBus* dest) override;
48 47
49 void OnRenderError() override; 48 void OnRenderError() override;
50 49
51 private: 50 private:
52 const media::AudioParameters params_; 51 const media::AudioParameters params_;
53 52
54 // Weak reference to the callback into WebKit code. 53 // Weak reference to the callback into WebKit code.
55 blink::WebAudioDevice::RenderCallback* const client_callback_; 54 blink::WebAudioDevice::RenderCallback* const client_callback_;
56 55
57 // To avoid the need for locking, ensure the control methods of the 56 // To avoid the need for locking, ensure the control methods of the
(...skipping 11 matching lines...) Expand all
69 68
70 // Used to suspend |sink_| usage when silence has been detected for too long. 69 // Used to suspend |sink_| usage when silence has been detected for too long.
71 std::unique_ptr<media::SilentSinkSuspender> webaudio_suspender_; 70 std::unique_ptr<media::SilentSinkSuspender> webaudio_suspender_;
72 71
73 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); 72 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl);
74 }; 73 };
75 74
76 } // namespace content 75 } // namespace content
77 76
78 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 77 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/audio_sync_reader.cc ('k') | content/renderer/media/renderer_webaudiodevice_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698