sfFDN
Loading...
Searching...
No Matches
delaybank_time_varying.h
1// Copyright (C) 2025 Alexandre St-Onge
2// SPDX-License-Identifier: MIT
3#pragma once
4
5#include "sffdn/audio_buffer.h"
6#include "sffdn/audio_processor.h"
7#include "sffdn/delay_time_varying.h"
8#include "sffdn/filterbank.h"
9#include "sffdn/types.h"
10
11#include <cstdint>
12#include <span>
13#include <vector>
14
15namespace sfFDN
16{
17
26{
27 public:
33
34 ~DelayBankTimeVarying() = default;
35
40 std::vector<float> GetDelays() const;
41
47 uint32_t InputChannelCount() const override;
48
54 uint32_t OutputChannelCount() const override;
55
60 void Clear() override;
61
69 void Process(const AudioBuffer& input, AudioBuffer& output) noexcept override;
70
74 std::unique_ptr<AudioProcessor> Clone() const override;
75
76 private:
77 FilterBank delay_bank_;
79};
80
81} // 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
A bank of parallel delay lines, each with its own delay setting.
Definition delaybank_time_varying.h:26
DelayBankTimeVarying(const DelayBankTimeVaryingOptions &config)
Constructs a delay bank with a specified set of delays and maximum delay.
uint32_t OutputChannelCount() const override
Returns the number of output channels this processor produces.
uint32_t InputChannelCount() const override
Returns the number of input channels this processor expects.
void Clear() override
Clears the internal delay buffers.
std::unique_ptr< AudioProcessor > Clone() const override
Creates a copy of the delay bank.
std::vector< float > GetDelays() const
Returns the current delays for each delay line in the bank.
void Process(const AudioBuffer &input, AudioBuffer &output) noexcept override
Processes a block of multi-channel audio.
Implements a bank of filters.
Definition filterbank.h:19
Options for configuring a time-varying delay bank.
Definition types.h:210