Wayverb
mixdown.h
1 #pragma once
2 
3 #include "hrtf/multiband.h"
4 
5 #include "utilities/map_to_vector.h"
6 #include <iostream>
7 
8 namespace wayverb {
9 namespace core {
10 
11 template <typename It>
12 auto mixdown(It b, It e) {
13  return util::map_to_vector(b, e, [](const auto& i) { return sum(i); });
14 }
15 
16 template <typename It, typename Callback>
17 auto multiband_filter_and_mixdown(It b,
18  It e,
19  double sample_rate,
20  Callback&& callback) {
21  hrtf_data::multiband_filter(
22  b, e, sample_rate, std::forward<Callback>(callback));
23  return mixdown(b, e);
24 }
25 
26 } // namespace core
27 } // namespace wayverb
Definition: traits.cpp:2
Definition: capsule_base.h:9