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

Unified Diff: media/base/audio_hardware_config_unittest.cc

Issue 275943003: Enable higher latency audio on Windows for basic playback. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: No^2. Created 6 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_hardware_config.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_hardware_config_unittest.cc
diff --git a/media/base/audio_hardware_config_unittest.cc b/media/base/audio_hardware_config_unittest.cc
index 80dd03ab1dba768e0009930b3c057e5175b4ad8d..2cb16fc96a31dd7257acc57ecb1fbcd03aa820cb 100644
--- a/media/base/audio_hardware_config_unittest.cc
+++ b/media/base/audio_hardware_config_unittest.cc
@@ -101,7 +101,17 @@ TEST(AudioHardwareConfig, HighLatencyBufferSizes) {
32);
AudioHardwareConfig fake_config(input_params, output_params);
-#if defined(OS_LINUX) || defined(OS_MACOSX)
+#if defined(OS_WIN)
+ for (int i = 6400; i <= 204800; i *= 2) {
+ fake_config.UpdateOutputConfig(
+ AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY,
+ kOutputChannelLayout,
+ i,
+ 16,
+ i / 100));
+ EXPECT_EQ(2 * (i / 100), fake_config.GetHighLatencyBufferSize());
+ }
+#else
EXPECT_EQ(64, fake_config.GetHighLatencyBufferSize());
for (int i = 6400; i <= 204800; i *= 2) {
@@ -113,11 +123,7 @@ TEST(AudioHardwareConfig, HighLatencyBufferSizes) {
32));
EXPECT_EQ(2 * (i / 100), fake_config.GetHighLatencyBufferSize());
}
-#else
- // If high latency buffer sizes are not supported, the value should just pass
- // through the output buffer size.
- EXPECT_EQ(32, fake_config.GetHighLatencyBufferSize());
-#endif
+#endif // defined(OS_WIN)
}
} // namespace content
« no previous file with comments | « media/base/audio_hardware_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698