1 /* 2 * Copyright (c) 2014 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 COMMON_AUDIO_FIR_FILTER_FACTORY_H_ 12 #define COMMON_AUDIO_FIR_FILTER_FACTORY_H_ 13 14 #include <string.h> 15 16 namespace webrtc { 17 18 class FIRFilter; 19 20 // Creates a filter with the given coefficients. All initial state values will 21 // be zeros. 22 // The length of the chunks fed to the filter should never be greater than 23 // |max_input_length|. This is needed because, when vectorizing it is 24 // necessary to concatenate the input after the state, and resizing this array 25 // dynamically is expensive. 26 FIRFilter* CreateFirFilter(const float* coefficients, 27 size_t coefficients_length, 28 size_t max_input_length); 29 30 } // namespace webrtc 31 32 #endif // COMMON_AUDIO_FIR_FILTER_FACTORY_H_ 33