Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 classifier.Analysis(in.get(), channels * kFrameSize, channels); | 54 classifier.Analysis(in.get(), channels * kFrameSize, channels); |
| 55 EXPECT_EQ(is_music, classifier.is_music()); | 55 EXPECT_EQ(is_music, classifier.is_music()); |
| 56 ASSERT_EQ(1u, fread(&is_music_ref, sizeof(is_music_ref), 1, data_file)); | 56 ASSERT_EQ(1u, fread(&is_music_ref, sizeof(is_music_ref), 1, data_file)); |
| 57 EXPECT_EQ(is_music_ref, is_music); | 57 EXPECT_EQ(is_music_ref, is_music); |
| 58 } | 58 } |
| 59 fclose(audio_file); | 59 fclose(audio_file); |
| 60 fclose(data_file); | 60 fclose(data_file); |
| 61 } | 61 } |
| 62 | 62 |
| 63 TEST(AudioClassifierTest, DoAnalysisMono) { | 63 TEST(AudioClassifierTest, DoAnalysisMono) { |
| 64 #if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) | |
|
minyue-webrtc
2016/01/28 09:42:05
why is only mono affected?
flim-webrtc
2016/02/02 11:58:40
Not sure why it's just mono. However, the differen
| |
| 65 RunAnalysisTest(test::ResourcePath("short_mixed_mono_48", "pcm"), | |
| 66 test::ResourcePath("short_mixed_mono_48_arm", "dat"), | |
| 67 1); | |
| 68 #else | |
| 64 RunAnalysisTest(test::ResourcePath("short_mixed_mono_48", "pcm"), | 69 RunAnalysisTest(test::ResourcePath("short_mixed_mono_48", "pcm"), |
| 65 test::ResourcePath("short_mixed_mono_48", "dat"), | 70 test::ResourcePath("short_mixed_mono_48", "dat"), |
| 66 1); | 71 1); |
| 72 #endif // WEBRTC_ARCH_ARM | |
| 67 } | 73 } |
| 68 | 74 |
| 69 TEST(AudioClassifierTest, DoAnalysisStereo) { | 75 TEST(AudioClassifierTest, DoAnalysisStereo) { |
| 70 RunAnalysisTest(test::ResourcePath("short_mixed_stereo_48", "pcm"), | 76 RunAnalysisTest(test::ResourcePath("short_mixed_stereo_48", "pcm"), |
| 71 test::ResourcePath("short_mixed_stereo_48", "dat"), | 77 test::ResourcePath("short_mixed_stereo_48", "dat"), |
| 72 2); | 78 2); |
| 73 } | 79 } |
| 74 | 80 |
| 75 } // namespace webrtc | 81 } // namespace webrtc |
| OLD | NEW |