SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
filtermbe.cpp
Go to the documentation of this file.
1 // Copyright (C) 2016 F4EXB //
3 // written by Edouard Griffiths //
4 // //
5 // This program is free software; you can redistribute it and/or modify //
6 // it under the terms of the GNU General Public License as published by //
7 // the Free Software Foundation as version 3 of the License, or //
8 // (at your option) any later version. //
9 // //
10 // This program is distributed in the hope that it will be useful, //
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 // GNU General Public License V3 for more details. //
14 // //
15 // You should have received a copy of the GNU General Public License //
16 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
18 
19 #include "filtermbe.h"
20 
21 const float MBEAudioInterpolatorFilter::m_lpa[3] = {1.0, 1.392667E+00, -5.474446E-01};
22 const float MBEAudioInterpolatorFilter::m_lpb[3] = {3.869430E-02, 7.738860E-02, 3.869430E-02};
23 
24 const float MBEAudioInterpolatorFilter::m_hpa[3] = {1.000000e+00, 1.667871e+00, -7.156964e-01};
25 const float MBEAudioInterpolatorFilter::m_hpb[3] = {8.459039e-01, -1.691760e+00, 8.459039e-01};
26 
28  m_filterLP(m_lpa, m_lpb),
29  m_filterHP(m_hpa, m_hpb),
30  m_useHP(false)
31 {
32 }
33 
35 {}
36 
37 float MBEAudioInterpolatorFilter::run(const float& sample)
38 {
39  return m_useHP ? m_filterLP.run(m_filterHP.run(sample)) : m_filterLP.run(sample);
40 }
41 
42 float MBEAudioInterpolatorFilter::runHP(const float& sample)
43 {
44  return m_filterHP.run(sample);
45 }
46 
47 float MBEAudioInterpolatorFilter::runLP(const float& sample)
48 {
49  return m_filterLP.run(sample);
50 }
float runHP(const float &sample)
Definition: filtermbe.cpp:42
Type run(const Type &sample)
Definition: iirfilter.h:98
float runLP(const float &sample)
Definition: filtermbe.cpp:47
static const float m_hpb[3]
Definition: filtermbe.h:85
IIRFilter< float, 2 > m_filterHP
Definition: filtermbe.h:78
IIRFilter< float, 2 > m_filterLP
Definition: filtermbe.h:77
static const float m_lpb[3]
Definition: filtermbe.h:82
static const float m_hpa[3]
Definition: filtermbe.h:84
float run(const float &sample)
Definition: filtermbe.cpp:37
static const float m_lpa[3]
Definition: filtermbe.h:81