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 #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 19 matching lines...) Expand all Loading... |
30 int session_id, | 30 int session_id, |
31 const url::Origin& security_origin); | 31 const url::Origin& security_origin); |
32 ~RendererWebAudioDeviceImpl() override; | 32 ~RendererWebAudioDeviceImpl() override; |
33 | 33 |
34 // blink::WebAudioDevice implementation. | 34 // blink::WebAudioDevice implementation. |
35 void start() override; | 35 void start() override; |
36 void stop() override; | 36 void stop() override; |
37 double sampleRate() override; | 37 double sampleRate() override; |
38 | 38 |
39 // AudioRendererSink::RenderCallback implementation. | 39 // AudioRendererSink::RenderCallback implementation. |
40 int Render(media::AudioBus* dest, | 40 int Render(base::TimeDelta delay, |
41 uint32_t frames_delayed, | 41 base::TimeTicks delay_timestamp, |
42 uint32_t frames_skipped) override; | 42 int prior_frames_skipped, |
| 43 media::AudioBus* dest) override; |
43 | 44 |
44 void OnRenderError() override; | 45 void OnRenderError() override; |
45 | 46 |
46 private: | 47 private: |
47 const media::AudioParameters params_; | 48 const media::AudioParameters params_; |
48 | 49 |
49 // Weak reference to the callback into WebKit code. | 50 // Weak reference to the callback into WebKit code. |
50 blink::WebAudioDevice::RenderCallback* const client_callback_; | 51 blink::WebAudioDevice::RenderCallback* const client_callback_; |
51 | 52 |
52 // To avoid the need for locking, ensure the control methods of the | 53 // To avoid the need for locking, ensure the control methods of the |
(...skipping 11 matching lines...) Expand all Loading... |
64 | 65 |
65 // Used to suspend |sink_| usage when silence has been detected for too long. | 66 // Used to suspend |sink_| usage when silence has been detected for too long. |
66 std::unique_ptr<media::SilentSinkSuspender> webaudio_suspender_; | 67 std::unique_ptr<media::SilentSinkSuspender> webaudio_suspender_; |
67 | 68 |
68 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); | 69 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); |
69 }; | 70 }; |
70 | 71 |
71 } // namespace content | 72 } // namespace content |
72 | 73 |
73 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ | 74 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ |
OLD | NEW |