sfFDN
Loading...
Searching...
No Matches
delay_matrix.h
1// Copyright (C) 2025 Alexandre St-Onge
2// SPDX-License-Identifier: MIT
3#pragma once
4
5#include "sffdn/audio_processor.h"
6
7#include <cstdint>
8#include <span>
9
10namespace sfFDN
11{
12// Forward declaration
13class ScalarFeedbackMatrix;
14
24{
25 public:
32 DelayMatrix(uint32_t order, std::span<const uint32_t> delays, const ScalarFeedbackMatrix& mixing_matrix);
33
34 ~DelayMatrix() override;
35
40
44 DelayMatrix& operator=(DelayMatrix&&) noexcept;
45
50 void Process(const AudioBuffer& input, AudioBuffer& output) noexcept override;
51
53 uint32_t InputChannelCount() const override;
54
56 uint32_t OutputChannelCount() const override;
57
61 void Clear() override;
62
64 void PrintInfo() const;
65
69 std::unique_ptr<AudioProcessor> Clone() const override;
70
71 private:
72 class DelayMatrixImpl;
73 std::unique_ptr<DelayMatrixImpl> impl_;
74
75 DelayMatrix() = default; // Default constructor used internally by Clone()
76};
77} // namespace sfFDN
A class representing an audio buffer with multiple channels of non-interleaved audio data.
Definition audio_buffer.h:18
Base class for audio processors.
Definition audio_processor.h:23
DelayMatrix implementation as presented in [1].
Definition delay_matrix.h:24
uint32_t OutputChannelCount() const override
Returns the number of output channels this processor produces.
DelayMatrix(DelayMatrix &&) noexcept
Move constructor.
std::unique_ptr< AudioProcessor > Clone() const override
Creates a copy of the delay matrix.
void PrintInfo() const
Prints information about the delay matrix.
void Process(const AudioBuffer &input, AudioBuffer &output) noexcept override
Processes the input audio buffer through the delay matrix.
uint32_t InputChannelCount() const override
Returns the number of input channels this processor expects.
void Clear() override
Clears the internal delay buffers.
DelayMatrix(uint32_t order, std::span< const uint32_t > delays, const ScalarFeedbackMatrix &mixing_matrix)
Constructs a DelayMatrix with the specified size and delay values.
DelayMatrix(const DelayMatrix &)
Copy constructor.
DelayMatrix & operator=(const DelayMatrix &)
Copy assignment operator.
A scalar feedback matrix processor.
Definition feedback_matrix.h:22