OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 // We don't test the value of pitch gain and lags as they are created by iSAC | 11 // We don't test the value of pitch gain and lags as they are created by iSAC |
12 // routines. However, interpolation of pitch-gain and lags is in a separate | 12 // routines. However, interpolation of pitch-gain and lags is in a separate |
13 // class and has its own unit-test. | 13 // class and has its own unit-test. |
14 | 14 |
15 #include "webrtc/modules/audio_processing/vad/vad_audio_proc.h" | 15 #include "webrtc/modules/audio_processing/vad/vad_audio_proc.h" |
16 | 16 |
17 #include <math.h> | 17 #include <math.h> |
18 #include <stdio.h> | 18 #include <stdio.h> |
19 | 19 |
20 #include <string> | 20 #include <string> |
21 | 21 |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "webrtc/modules/audio_processing/vad/common.h" | 23 #include "webrtc/modules/audio_processing/vad/common.h" |
24 #include "webrtc/modules/interface/module_common_types.h" | 24 #include "webrtc/modules/include/module_common_types.h" |
25 #include "webrtc/test/testsupport/fileutils.h" | 25 #include "webrtc/test/testsupport/fileutils.h" |
26 | 26 |
27 namespace webrtc { | 27 namespace webrtc { |
28 | 28 |
29 TEST(AudioProcessingTest, DISABLED_ComputingFirstSpectralPeak) { | 29 TEST(AudioProcessingTest, DISABLED_ComputingFirstSpectralPeak) { |
30 VadAudioProc audioproc; | 30 VadAudioProc audioproc; |
31 | 31 |
32 std::string peak_file_name = | 32 std::string peak_file_name = |
33 test::ResourcePath("audio_processing/agc/agc_spectral_peak", "dat"); | 33 test::ResourcePath("audio_processing/agc/agc_spectral_peak", "dat"); |
34 FILE* peak_file = fopen(peak_file_name.c_str(), "rb"); | 34 FILE* peak_file = fopen(peak_file_name.c_str(), "rb"); |
(...skipping 19 matching lines...) Expand all Loading... |
54 for (size_t n = 0; n < features.num_frames; n++) | 54 for (size_t n = 0; n < features.num_frames; n++) |
55 EXPECT_NEAR(features.spectral_peak[n], sp[n], 3); | 55 EXPECT_NEAR(features.spectral_peak[n], sp[n], 3); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 fclose(peak_file); | 59 fclose(peak_file); |
60 fclose(pcm_file); | 60 fclose(pcm_file); |
61 } | 61 } |
62 | 62 |
63 } // namespace webrtc | 63 } // namespace webrtc |
OLD | NEW |