HephAudio v3.1.0
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
Flanger.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
3#include "ModulationEffect.h"
4
7namespace HephAudio
8{
14 {
15 public:
16 using ModulationEffect::Process;
17
18 protected:
23
28
33
34 public:
37
45 Flanger(double depth, double constantDelay, double variableDelay, const Oscillator& lfo);
46
48 virtual ~Flanger() = default;
49
50 virtual std::string Name() const override;
51 virtual void ResetInternalState() override;
52 virtual void Process(AudioBuffer& buffer, size_t startIndex, size_t frameCount) override;
53
58 virtual double GetConstantDelay() const;
59
65 virtual void SetConstantDelay(double constantDelay);
66
71 virtual double GetVariableDelay() const;
72
78 virtual void SetVariableDelay(double variableDelay);
79
80 protected:
81 virtual void ProcessST(const AudioBuffer& inputBuffer, AudioBuffer& outputBuffer, size_t startIndex, size_t frameCount) override;
82
89 virtual size_t CalculatePastSamplesSize(const AudioBuffer& inputBuffer) const;
90 };
91}
#define HEPH_API
Definition HephShared.h:124
class for storing the audio samples in internal format.
Definition AudioBuffer.h:16
delays the audio data and mixes the result with the input signal. The amount of delay applied changes...
Definition Flanger.h:14
virtual double GetVariableDelay() const
virtual void ProcessST(const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override
virtual void ResetInternalState() override
double variableDelay
Definition Flanger.h:27
virtual ~Flanger()=default
AudioBuffer pastSamples
Definition Flanger.h:32
Flanger(double depth, double constantDelay, double variableDelay, const Oscillator &lfo)
virtual std::string Name() const override
double constantDelay
Definition Flanger.h:22
virtual double GetConstantDelay() const
virtual void Process(AudioBuffer &buffer, size_t startIndex, size_t frameCount) override
virtual void SetConstantDelay(double constantDelay)
virtual void SetVariableDelay(double variableDelay)
virtual size_t CalculatePastSamplesSize(const AudioBuffer &inputBuffer) const
base class for effects that use LFOs.
Definition ModulationEffect.h:15
base class for oscillators.
Definition Oscillator.h:16