Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
freq_estimator_decim.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Roc authors
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8 
9 //! @file roc_audio/freq_estimator_decim.h
10 //! @brief Frequency estimator config.
11 
12 #ifndef ROC_AUDIO_FREQ_ESTIMATOR_DECIM_H_
13 #define ROC_AUDIO_FREQ_ESTIMATOR_DECIM_H_
14 
15 #include "roc_audio/units.h"
16 #include "roc_core/stddefs.h"
17 
18 namespace roc {
19 namespace audio {
20 
21 // Frequency estimator decimator factor.
22 static const size_t fe_decim_factor = 10;
23 
24 //! Length of decimation filter response length in frequency estimator.
25 //! @remarks
26 //! Should be power of two.
27 static const size_t fe_decim_len = 256;
28 
29 //! Bitmask for fe_decim_len.
30 static const uint32_t fe_decim_len_mask = fe_decim_len - 1;
31 
32 //! Impulse response of decimation filter with factor of 10.
33 extern const sample_t fe_decim_h[fe_decim_len];
34 
35 //! Filters gain, sum(fe_decim_h).
36 extern const sample_t fe_decim_h_gain;
37 
38 } // namespace audio
39 } // namespace roc
40 
41 #endif // ROC_AUDIO_FREQ_ESTIMATOR_DECIM_H_
Various units used in audio processing.
Root namespace.
float sample_t
Audio sample.
Definition: units.h:21
Commonly used types and functions.
const sample_t fe_decim_h[fe_decim_len]
Impulse response of decimation filter with factor of 10.
const sample_t fe_decim_h_gain
Filters gain, sum(fe_decim_h).