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

Unified Diff: media/base/fake_audio_render_callback.h

Issue 2004283002: AudioConverter: Express delay in frames rather than msec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed files & removed rounding Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/audio_renderer_mixer_input_unittest.cc ('k') | media/base/fake_audio_render_callback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/fake_audio_render_callback.h
diff --git a/media/base/fake_audio_render_callback.h b/media/base/fake_audio_render_callback.h
index a7d74dd8e68143b0b928ebdca912b4b3913e35d1..0c5aae5701ed522ac9d90a358afe8e79b3718eb6 100644
--- a/media/base/fake_audio_render_callback.h
+++ b/media/base/fake_audio_render_callback.h
@@ -30,13 +30,12 @@ class FakeAudioRenderCallback
// Renders a sine wave into the provided audio data buffer. If |half_fill_|
// is set, will only fill half the buffer.
int Render(AudioBus* audio_bus,
- uint32_t audio_delay_milliseconds,
+ uint32_t frames_delayed,
uint32_t frames_skipped) override;
MOCK_METHOD0(OnRenderError, void());
// AudioTransform::ProvideAudioTransformInput implementation.
- double ProvideInput(AudioBus* audio_bus,
- base::TimeDelta buffer_delay) override;
+ double ProvideInput(AudioBus* audio_bus, uint32_t frames_delayed) override;
// Toggles only filling half the requested amount during Render().
void set_half_fill(bool half_fill) { half_fill_ = half_fill; }
@@ -44,11 +43,9 @@ class FakeAudioRenderCallback
// Reset the sine state to initial value.
void reset() { x_ = 0; }
- // Returns the last |audio_delay_milliseconds| provided to Render() or -1 if
+ // Returns the last |frames_delayed| provided to Render() or -1 if
// no Render() call occurred.
- int last_audio_delay_milliseconds() const {
- return last_audio_delay_milliseconds_;
- }
+ int last_frames_delayed() const { return last_frames_delayed_; }
// Set volume information used by ProvideAudioTransformInput().
void set_volume(double volume) { volume_ = volume; }
@@ -59,7 +56,7 @@ class FakeAudioRenderCallback
bool half_fill_;
double x_;
double step_;
- int last_audio_delay_milliseconds_;
+ int last_frames_delayed_;
int last_channel_count_;
double volume_;
« no previous file with comments | « media/base/audio_renderer_mixer_input_unittest.cc ('k') | media/base/fake_audio_render_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698