OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 // MSVC++ requires this to be set before any other includes to get M_PI. | 11 // MSVC++ requires this to be set before any other includes to get M_PI. |
12 #define _USE_MATH_DEFINES | 12 #define _USE_MATH_DEFINES |
13 | 13 |
14 #include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h" | 14 #include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h" |
15 | 15 |
16 #include <math.h> | 16 #include <math.h> |
17 | 17 |
18 #include "webrtc/test/gtest.h" | |
19 #include "webrtc/base/array_view.h" | 18 #include "webrtc/base/array_view.h" |
20 #include "webrtc/modules/audio_processing/audio_buffer.h" | 19 #include "webrtc/modules/audio_processing/audio_buffer.h" |
21 #include "webrtc/modules/audio_processing/test/audio_buffer_tools.h" | 20 #include "webrtc/modules/audio_processing/test/audio_buffer_tools.h" |
22 #include "webrtc/modules/audio_processing/test/bitexactness_tools.h" | 21 #include "webrtc/modules/audio_processing/test/bitexactness_tools.h" |
| 22 #include "webrtc/test/gtest.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 namespace { | 25 namespace { |
26 | 26 |
27 const int kChunkSizeMs = 10; | 27 const int kChunkSizeMs = 10; |
28 const int kSampleRateHz = 16000; | 28 const int kSampleRateHz = 16000; |
29 | 29 |
30 SphericalPointf AzimuthToSphericalPoint(float azimuth_radians) { | 30 SphericalPointf AzimuthToSphericalPoint(float azimuth_radians) { |
31 return SphericalPointf(azimuth_radians, 0.f, 1.f); | 31 return SphericalPointf(azimuth_radians, 0.f, 1.f); |
32 } | 32 } |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 TEST(BeamformerBitExactnessTest, | 366 TEST(BeamformerBitExactnessTest, |
367 DISABLED_Stereo16kHz_ArrayGeometry3_TargetDirection1) { | 367 DISABLED_Stereo16kHz_ArrayGeometry3_TargetDirection1) { |
368 const float kOutputReference[] = {-0.000161f, 0.000171f, -0.000096f, | 368 const float kOutputReference[] = {-0.000161f, 0.000171f, -0.000096f, |
369 0.001007f, 0.000427f, 0.000977f}; | 369 0.001007f, 0.000427f, 0.000977f}; |
370 | 370 |
371 RunBitExactnessTest(AudioProcessing::kSampleRate16kHz, CreateArrayGeometry(3), | 371 RunBitExactnessTest(AudioProcessing::kSampleRate16kHz, CreateArrayGeometry(3), |
372 TargetDirection1, kOutputReference); | 372 TargetDirection1, kOutputReference); |
373 } | 373 } |
374 | 374 |
375 } // namespace webrtc | 375 } // namespace webrtc |
OLD | NEW |