mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 09:31:10 -05:00
M17: FirFilter code cleanup
This commit is contained in:
parent
31c7a2c690
commit
c2a91610c9
@ -13,13 +13,7 @@ namespace modemm17
|
|||||||
template <size_t N>
|
template <size_t N>
|
||||||
struct BaseFirFilter : FilterBase<float>
|
struct BaseFirFilter : FilterBase<float>
|
||||||
{
|
{
|
||||||
using array_t = std::array<float, N>;
|
BaseFirFilter(const std::array<float, N>& taps)
|
||||||
|
|
||||||
const array_t& taps_;
|
|
||||||
array_t history_;
|
|
||||||
size_t pos_ = 0;
|
|
||||||
|
|
||||||
BaseFirFilter(const array_t& taps)
|
|
||||||
: taps_(taps)
|
: taps_(taps)
|
||||||
{
|
{
|
||||||
history_.fill(0.0);
|
history_.fill(0.0);
|
||||||
@ -47,6 +41,11 @@ struct BaseFirFilter : FilterBase<float>
|
|||||||
history_.fill(0.0);
|
history_.fill(0.0);
|
||||||
pos_ = 0;
|
pos_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
const std::array<float, N>& taps_;
|
||||||
|
std::array<float, N> history_;
|
||||||
|
size_t pos_ = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <size_t N>
|
template <size_t N>
|
||||||
|
Loading…
Reference in New Issue
Block a user