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

Unified Diff: media/base/audio_converter_unittest.cc

Issue 2567143002: media::SilentSinkSuspender should simulate |delay| and |delay_timestamp| (Closed)
Patch Set: Created 4 years 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 | « no previous file | media/base/fake_audio_render_callback.h » ('j') | media/base/fake_audio_render_callback.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_converter_unittest.cc
diff --git a/media/base/audio_converter_unittest.cc b/media/base/audio_converter_unittest.cc
index b3249124357dece0ac3d48955dba483e2185ed8c..dd362648c360931cf338a73d6f62bab2ddc5bc9d 100644
--- a/media/base/audio_converter_unittest.cc
+++ b/media/base/audio_converter_unittest.cc
@@ -15,6 +15,7 @@
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/string_number_conversions.h"
+#include "media/base/audio_timestamp_helper.h"
#include "media/base/fake_audio_render_callback.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -229,8 +230,9 @@ TEST(AudioConverterTest, AudioDelayAndDiscreteChannelCount) {
// first two callbacks, 512 for the last two callbacks). See
// SincResampler.ChunkSize().
int kExpectedDelay = 992;
-
- EXPECT_EQ(kExpectedDelay, callback.last_frames_delayed());
+ auto expected_delay =
+ AudioTimestampHelper::FramesToTime(kExpectedDelay, kSampleRate);
+ EXPECT_EQ(expected_delay, callback.last_delay());
EXPECT_EQ(input_parameters.channels(), callback.last_channel_count());
}
« no previous file with comments | « no previous file | media/base/fake_audio_render_callback.h » ('j') | media/base/fake_audio_render_callback.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698