1 /* 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_ 12 #define MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_ 13 14 #include <array> 15 16 #include "modules/audio_processing/aec3/aec3_common.h" 17 #include "modules/audio_processing/aec3/fft_data.h" 18 19 namespace webrtc { 20 21 // Stores the values being returned from the echo subtractor. 22 struct SubtractorOutput { 23 std::array<float, kBlockSize> s_main; 24 std::array<float, kBlockSize> e_main; 25 std::array<float, kBlockSize> e_shadow; 26 FftData E_main; 27 std::array<float, kFftLengthBy2Plus1> E2_main; 28 std::array<float, kFftLengthBy2Plus1> E2_shadow; 29 ResetSubtractorOutput30 void Reset() { 31 s_main.fill(0.f); 32 e_main.fill(0.f); 33 e_shadow.fill(0.f); 34 E_main.re.fill(0.f); 35 E_main.im.fill(0.f); 36 E2_main.fill(0.f); 37 E2_shadow.fill(0.f); 38 } 39 }; 40 41 } // namespace webrtc 42 43 #endif // MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_ 44