diff options
Diffstat (limited to 'media/base/fake_audio_render_callback.cc')
-rw-r--r-- | media/base/fake_audio_render_callback.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/media/base/fake_audio_render_callback.cc b/media/base/fake_audio_render_callback.cc index 65b6ac9..af55910 100644 --- a/media/base/fake_audio_render_callback.cc +++ b/media/base/fake_audio_render_callback.cc @@ -5,16 +5,17 @@ // MSVC++ requires this to be set before any other includes to get M_PI. #define _USE_MATH_DEFINES -#include "media/base/fake_audio_render_callback.h" - #include <cmath> +#include "media/base/fake_audio_render_callback.h" + namespace media { FakeAudioRenderCallback::FakeAudioRenderCallback(double step) : half_fill_(false), step_(step), - last_audio_delay_milliseconds_(-1) { + last_audio_delay_milliseconds_(-1), + volume_(1) { reset(); } @@ -40,4 +41,10 @@ int FakeAudioRenderCallback::Render(AudioBus* audio_bus, return number_of_frames; } +double FakeAudioRenderCallback::ProvideInput(AudioBus* audio_bus, + base::TimeDelta buffer_delay) { + Render(audio_bus, buffer_delay.InMilliseconds()); + return volume_; +} + } // namespace media |