| 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 24 matching lines...) Expand all Loading... |
| 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(media::AudioBus* dest, | 44 int Render(media::AudioBus* dest, |
| 45 uint32_t frames_delayed, | 45 base::TimeDelta delay, |
| 46 base::TimeTicks delay_timestamp, |
| 46 uint32_t frames_skipped) override; | 47 uint32_t frames_skipped) override; |
| 47 | 48 |
| 48 void OnRenderError() override; | 49 void OnRenderError() override; |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 const media::AudioParameters params_; | 52 const media::AudioParameters params_; |
| 52 | 53 |
| 53 // Weak reference to the callback into WebKit code. | 54 // Weak reference to the callback into WebKit code. |
| 54 blink::WebAudioDevice::RenderCallback* const client_callback_; | 55 blink::WebAudioDevice::RenderCallback* const client_callback_; |
| 55 | 56 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 68 | 69 |
| 69 // Used to suspend |sink_| usage when silence has been detected for too long. | 70 // Used to suspend |sink_| usage when silence has been detected for too long. |
| 70 std::unique_ptr<media::SilentSinkSuspender> webaudio_suspender_; | 71 std::unique_ptr<media::SilentSinkSuspender> webaudio_suspender_; |
| 71 | 72 |
| 72 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); | 73 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace content | 76 } // namespace content |
| 76 | 77 |
| 77 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ | 78 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ |
| OLD | NEW |