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

Unified Diff: media/base/multi_channel_resampler_unittest.cc

Issue 14189035: Reduce jitter from uneven SincResampler buffer size requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 7 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/multi_channel_resampler.cc ('k') | media/base/sinc_resampler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/multi_channel_resampler_unittest.cc
diff --git a/media/base/multi_channel_resampler_unittest.cc b/media/base/multi_channel_resampler_unittest.cc
index ad675500c80a0fb17cf5a005847bcdd3dd599a71..efaf0c54bddc490fa58b2907a47c8ca84bba4c2c 100644
--- a/media/base/multi_channel_resampler_unittest.cc
+++ b/media/base/multi_channel_resampler_unittest.cc
@@ -50,7 +50,7 @@ class MultiChannelResamplerTest
// MultiChannelResampler::MultiChannelAudioSourceProvider implementation, just
// fills the provided audio_data with |kFillValue|.
virtual void ProvideInput(int frame_delay, AudioBus* audio_bus) {
- EXPECT_GT(frame_delay, last_frame_delay_);
+ EXPECT_GE(frame_delay, last_frame_delay_);
last_frame_delay_ = frame_delay;
float fill_value = fill_junk_values_ ? (1 / kFillValue) : kFillValue;
@@ -63,12 +63,13 @@ class MultiChannelResamplerTest
void MultiChannelTest(int channels, int frames, double expected_max_rms_error,
double expected_max_error) {
InitializeAudioData(channels, frames);
- MultiChannelResampler resampler(channels, kScaleFactor, base::Bind(
- &MultiChannelResamplerTest::ProvideInput, base::Unretained(this)));
+ MultiChannelResampler resampler(
+ channels, kScaleFactor, SincResampler::kDefaultRequestSize, base::Bind(
+ &MultiChannelResamplerTest::ProvideInput, base::Unretained(this)));
// First prime the resampler with some junk data, so we can verify Flush().
fill_junk_values_ = true;
- resampler.Resample(audio_bus_.get(), 1);
+ resampler.Resample(1, audio_bus_.get());
resampler.Flush();
fill_junk_values_ = false;
@@ -77,7 +78,7 @@ class MultiChannelResamplerTest
last_frame_delay_ = -1;
// If Flush() didn't work, the rest of the tests will fail.
- resampler.Resample(audio_bus_.get(), frames);
+ resampler.Resample(frames, audio_bus_.get());
TestValues(expected_max_rms_error, expected_max_error);
}
« no previous file with comments | « media/base/multi_channel_resampler.cc ('k') | media/base/sinc_resampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698