| 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 |
| 11 #include "webrtc/modules/audio_coding/neteq/audio_classifier.h" | 11 #include "webrtc/modules/audio_coding/neteq/audio_classifier.h" |
| 12 | 12 |
| 13 #include <math.h> | 13 #include <math.h> |
| 14 #include <stdio.h> | 14 #include <stdio.h> |
| 15 #include <stdlib.h> | 15 #include <stdlib.h> |
| 16 #include <string.h> | 16 #include <string.h> |
| 17 #include <memory> | 17 #include <memory> |
| 18 #include <string> | 18 #include <string> |
| 19 | 19 |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "webrtc/test/gtest.h" |
| 21 #include "webrtc/test/testsupport/fileutils.h" | 21 #include "webrtc/test/testsupport/fileutils.h" |
| 22 | 22 |
| 23 namespace webrtc { | 23 namespace webrtc { |
| 24 | 24 |
| 25 static const size_t kFrameSize = 960; | 25 static const size_t kFrameSize = 960; |
| 26 | 26 |
| 27 TEST(AudioClassifierTest, AllZeroInput) { | 27 TEST(AudioClassifierTest, AllZeroInput) { |
| 28 int16_t in_mono[kFrameSize] = {0}; | 28 int16_t in_mono[kFrameSize] = {0}; |
| 29 | 29 |
| 30 // Test all-zero vectors and let the classifier converge from its default | 30 // Test all-zero vectors and let the classifier converge from its default |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #endif // WEBRTC_ARCH_ARM | 73 #endif // WEBRTC_ARCH_ARM |
| 74 } | 74 } |
| 75 | 75 |
| 76 TEST(AudioClassifierTest, DoAnalysisStereo) { | 76 TEST(AudioClassifierTest, DoAnalysisStereo) { |
| 77 RunAnalysisTest(test::ResourcePath("short_mixed_stereo_48", "pcm"), | 77 RunAnalysisTest(test::ResourcePath("short_mixed_stereo_48", "pcm"), |
| 78 test::ResourcePath("short_mixed_stereo_48", "dat"), | 78 test::ResourcePath("short_mixed_stereo_48", "dat"), |
| 79 2); | 79 2); |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace webrtc | 82 } // namespace webrtc |
| OLD | NEW |