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
38 std::vector<float> GetDelays() const;
39
45 uint32_t InputChannelCount() const noexcept SFFDN_NONBLOCKING override;
46
52 uint32_t OutputChannelCount() const noexcept SFFDN_NONBLOCKING override;
53
58 void Clear() override;
59
67 void Process(const AudioBuffer& input, AudioBuffer& output) noexcept SFFDN_NONBLOCKING override;
68
72 std::unique_ptr<AudioProcessor> Clone() const override;
73
74 private:
75 FilterBank delay_bank_;
77};
78
79} // namespace sfFDN
A class representing an audio buffer with multiple channels of non-interleaved audio data.
Definition audio_buffer.h:20
Base class for audio processors.
Definition audio_processor.h:24
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.
void Process(const AudioBuffer &input, AudioBuffer &output) noexcept SFFDN_NONBLOCKING override
Processes a block of multi-channel audio.
void Clear() override
Clears the internal delay buffers.
std::unique_ptr< AudioProcessor > Clone() const override
Creates a copy of the delay bank.
uint32_t OutputChannelCount() const noexcept SFFDN_NONBLOCKING override
Returns the number of output channels this processor produces.
uint32_t InputChannelCount() const noexcept SFFDN_NONBLOCKING override
Returns the number of input channels this processor expects.
std::vector< float > GetDelays() const
Returns the current delays for each delay line in the bank.
Implements a bank of filters.
Definition filterbank.h:19
Options for configuring a time-varying delay bank.
Definition types.h:244