HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
Echo.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
3#include "AudioEffect.h"
4
7namespace HephAudio
8{
13 class Echo : public AudioEffect
14 {
15 public:
17
18 protected:
24
30
36
41 double echoStart;
42
48
54
60
61 public:
64
75 Echo(size_t reflectionCount, double reflectionDelay, double decayFactor, double echoStart, double echoDuration);
76
78 virtual ~Echo() = default;
79
80 virtual std::string Name() const override;
81 virtual void Process(AudioBuffer& buffer, size_t startIndex, size_t frameCount) override;
82
87 virtual size_t GetReflectionCount() const;
88
95 virtual void SetReflectionCount(size_t reflectionCount);
96
101 virtual double GetReflectionDelay() const;
102
110
115 virtual double GetDecayFactor() const;
116
123 virtual void SetDecayFactor(double decayFactor);
124
129 virtual double GetEchoStart() const;
130
137 virtual void SetEchoStart(double echoStart);
138
143 virtual double GetEchoDuration() const;
144
151 virtual void SetEchoDuration(double echoDuration);
152
153 protected:
154 void ProcessST(const AudioBuffer& inputBuffer, AudioBuffer& outputBuffer, size_t startIndex, size_t frameCount) override;
155 };
156}
class for storing the audio samples in internal format.
Definition AudioBuffer.h:16
base class for the audio effects.
Definition AudioEffect.h:15
virtual void Process(AudioBuffer &buffer)
adds echo to the audio data.
Definition Echo.h:14
virtual double GetEchoDuration() const
Echo(size_t reflectionCount, double reflectionDelay, double decayFactor, double echoStart, double echoDuration)
size_t reflectionCount
Definition Echo.h:23
double decayFactor
Definition Echo.h:35
virtual void SetDecayFactor(double decayFactor)
void ProcessST(const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override
double echoStart
Definition Echo.h:41
virtual std::string Name() const override
virtual double GetEchoStart() const
virtual void SetReflectionDelay(double reflectionDelay)
virtual double GetReflectionDelay() const
virtual void SetReflectionCount(size_t reflectionCount)
virtual size_t GetReflectionCount() const
double echoDuration
Definition Echo.h:47
virtual void SetEchoDuration(double echoDuration)
virtual void SetEchoStart(double echoStart)
virtual ~Echo()=default
virtual void Process(AudioBuffer &buffer, size_t startIndex, size_t frameCount) override
size_t currentIndex
Definition Echo.h:59
AudioBuffer pastSamples
Definition Echo.h:53
double reflectionDelay
Definition Echo.h:29
virtual double GetDecayFactor() const