Wayverb
capsule_base.h
1 #pragma once
2 
3 #include "utilities/aligned/vector.h"
4 
5 #include "glm/glm.hpp"
6 
7 #include <memory>
8 
9 namespace wayverb {
10 
11 namespace core {
12 class orientation;
13 namespace attenuator {
14 class hrtf;
15 class microphone;
16 } // namespace attenuator
17 } // namespace core
18 
19 namespace combined {
20 
21 class intermediate;
22 
23 class capsule_base {
24 public:
25  capsule_base() = default;
26  capsule_base(const capsule_base&) = default;
27  capsule_base(capsule_base&&) noexcept = default;
28  capsule_base& operator=(const capsule_base&) = default;
29  capsule_base& operator=(capsule_base&&) noexcept = default;
30  virtual ~capsule_base() noexcept = default;
31 
32  virtual std::unique_ptr<capsule_base> clone() const = 0;
33  virtual util::aligned::vector<float> postprocess(
34  const intermediate& intermediate, double sample_rate) const = 0;
35 };
36 
37 std::unique_ptr<capsule_base> make_capsule_ptr(
38  const core::attenuator::hrtf& attenuator,
39  const core::orientation& orientation);
40 
41 std::unique_ptr<capsule_base> make_capsule_ptr(
42  const core::attenuator::microphone& attenuator,
43  const core::orientation& orientation);
44 
45 } // namespace combined
46 } // namespace wayverb
Definition: hrtf.h:12
This is badly designed. Really, the capsules should be polymorphic.
Definition: engine.h:67
Definition: traits.cpp:2
Definition: capsule_base.h:9
Super-simple class which maintains microphone invariants.
Definition: microphone.h:10
Definition: capsule_base.h:23
Invariant: pointing_ is a unit vector.
Definition: orientation.h:15