Wayverb
filter_coefficients.h
1 #pragma once
2 
3 #include <array>
4 
5 namespace wayverb {
6 namespace core {
7 
8 template <size_t B, size_t A>
9 struct filter_coefficients final {
10  using b_order = std::integral_constant<size_t, B>;
11  using a_order = std::integral_constant<size_t, A>;
12 
13  using b_size = std::integral_constant<size_t, b_order{} + 1>;
14  using a_size = std::integral_constant<size_t, a_order{} + 1>;
15 
16  std::array<double, b_size{}> b;
17  std::array<double, a_size{}> a;
18 };
19 
20 template <size_t B, size_t A>
21 constexpr auto make_filter_coefficients(const std::array<double, B>& b,
22  const std::array<double, A>& a) {
23  return filter_coefficients<B - 1, A - 1>{b, a};
24 }
25 
26 } // namespace core
27 } // namespace wayverb
Definition: traits.cpp:2
Definition: capsule_base.h:9
Definition: filter_coefficients.h:9