OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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_processing/aec3/decimator_by_4.h" | 11 #include "webrtc/modules/audio_processing/aec3/decimator_by_4.h" |
12 | 12 |
13 #include <math.h> | 13 #include <math.h> |
14 #include <algorithm> | 14 #include <algorithm> |
15 #include <array> | 15 #include <array> |
16 #include <numeric> | 16 #include <numeric> |
17 #include <sstream> | 17 #include <sstream> |
18 #include <string> | 18 #include <string> |
19 #include <vector> | 19 #include <vector> |
20 | 20 |
21 #include "webrtc/modules/audio_processing/aec3/aec3_constants.h" | 21 #include "webrtc/modules/audio_processing/aec3/aec3_common.h" |
22 #include "webrtc/test/gtest.h" | 22 #include "webrtc/test/gtest.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 std::string ProduceDebugText(int sample_rate_hz) { | 28 std::string ProduceDebugText(int sample_rate_hz) { |
29 std::ostringstream ss; | 29 std::ostringstream ss; |
30 ss << "Sample rate: " << sample_rate_hz; | 30 ss << "Sample rate: " << sample_rate_hz; |
31 return ss.str(); | 31 return ss.str(); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // Verifies the check for non-null output parameter. | 118 // Verifies the check for non-null output parameter. |
119 TEST(DecimatorBy4, NullOutput) { | 119 TEST(DecimatorBy4, NullOutput) { |
120 DecimatorBy4 decimator; | 120 DecimatorBy4 decimator; |
121 std::vector<float> x(std::vector<float>(kBlockSize, 0.f)); | 121 std::vector<float> x(std::vector<float>(kBlockSize, 0.f)); |
122 EXPECT_DEATH(decimator.Decimate(x, nullptr), ""); | 122 EXPECT_DEATH(decimator.Decimate(x, nullptr), ""); |
123 } | 123 } |
124 | 124 |
125 #endif | 125 #endif |
126 | 126 |
127 } // namespace webrtc | 127 } // namespace webrtc |
OLD | NEW |