Index: media/filters/audio_file_reader_unittest.cc |
diff --git a/media/filters/audio_file_reader_unittest.cc b/media/filters/audio_file_reader_unittest.cc |
index dc0669f2a255e56c155f51df516fd47d1b15613d..b11e20c3723a5a4abb740813f4aaa707ed2c0fe8 100644 |
--- a/media/filters/audio_file_reader_unittest.cc |
+++ b/media/filters/audio_file_reader_unittest.cc |
@@ -6,6 +6,7 @@ |
#include "base/md5.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/sys_byteorder.h" |
+#include "build/build_config.h" |
#include "media/base/audio_bus.h" |
#include "media/base/decoder_buffer.h" |
#include "media/base/test_data_util.h" |
@@ -84,12 +85,28 @@ TEST_F(AudioFileReaderTest, InvalidFile) { |
} |
TEST_F(AudioFileReaderTest, WithVideo) { |
- RunTest("bear.ogv", "302e1773ba2f9a194c35a0f8f0b73f15", 2, 44100, |
+ // Windows produces slightly different results due to differences in floating |
+ // point functions (e.g. sin(), cos(), etc). |
scherkus (not reviewing)
2012/12/13 22:40:11
and this is a new thing in the latest roll?
what
DaleCurtis
2012/12/13 22:51:28
This is due to the switch to float decoding. It's
DaleCurtis
2012/12/14 20:48:32
Interleaving to int16 and hashing wasn't enough to
|
+#if defined(OS_WIN) |
+ static const char* kExpectedHash = "6e04000d4de05f317d4c8605250a8b54"; |
+#else |
+ static const char* kExpectedHash = "3251faa24f300b661a38103cfabefdfe"; |
+#endif |
+ |
+ RunTest("bear.ogv", kExpectedHash, 2, 44100, |
base::TimeDelta::FromMicroseconds(1011520), 44608, 44608); |
} |
TEST_F(AudioFileReaderTest, Vorbis) { |
- RunTest("sfx.ogg", "2b84ad6d605abba1125c0dacc9c8dbdd", 1, 44100, |
+ // Windows produces slightly different results due to differences in floating |
+ // point functions (e.g. sin(), cos(), etc). |
+#if defined(OS_WIN) |
+ static const char* kExpectedHash = "2284c9a4434cc59cadad1dd781380086"; |
+#else |
+ static const char* kExpectedHash = "ce722bf840acc7626b66559d820aced7"; |
+#endif |
+ |
+ RunTest("sfx.ogg", kExpectedHash, 1, 44100, |
base::TimeDelta::FromMicroseconds(350001), 15435, 15435); |
} |
@@ -108,12 +125,28 @@ TEST_F(AudioFileReaderTest, WaveS24LE) { |
#if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS) |
TEST_F(AudioFileReaderTest, MP3) { |
- RunTest("sfx.mp3", "2a5847207fdcba1c05e52f65ad010f66", 1, 44100, |
+ // Windows produces slightly different results due to differences in floating |
+ // point functions (e.g. sin(), cos(), etc). |
+#if defined(OS_WIN) |
+ static const char* kExpectedHash = "0e4a429ff19717bb7bf6d12771d403c9"; |
+#else |
+ static const char* kExpectedHash = "2a5847207fdcba1c05e52f65ad010f66"; |
+#endif |
+ |
+ RunTest("sfx.mp3", kExpectedHash, 1, 44100, |
base::TimeDelta::FromMicroseconds(313470), 13824, 12719); |
} |
TEST_F(AudioFileReaderTest, AAC) { |
- RunTest("sfx.m4a", "d4d3207758d1e8cb0aa176ff77fa6932", 1, 44100, |
+ // Windows produces slightly different results due to differences in floating |
+ // point functions (e.g. sin(), cos(), etc). |
+#if defined(OS_WIN) |
+ static const char* kExpectedHash = "c990c7b6979ea8fc3a0b7f6f4b3d5cf2"; |
+#else |
+ static const char* kExpectedHash = "0ce73ca393bb45672d2daec56979aa3d"; |
+#endif |
+ |
+ RunTest("sfx.m4a", kExpectedHash, 1, 44100, |
base::TimeDelta::FromMicroseconds(312001), 13759, 13312); |
} |
#endif |