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
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 HEPH_API Echo : public AudioEffect
14 {
15 public:
16 using AudioEffect::Process;
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 ResetInternalState() override;
82 virtual void Process(AudioBuffer& buffer, size_t startIndex, size_t frameCount) override;
83
88 virtual size_t GetReflectionCount() const;
89
96 virtual void SetReflectionCount(size_t reflectionCount);
97
102 virtual double GetReflectionDelay() const;
103
110 virtual void SetReflectionDelay(double reflectionDelay);
111
116 virtual double GetDecayFactor() const;
117
124 virtual void SetDecayFactor(double decayFactor);
125
130 virtual double GetEchoStart() const;
131
138 virtual void SetEchoStart(double echoStart);
139
144 virtual double GetEchoDuration() const;
145
152 virtual void SetEchoDuration(double echoDuration);
153
154 protected:
155 void ProcessST(const AudioBuffer& inputBuffer, AudioBuffer& outputBuffer, size_t startIndex, size_t frameCount) override;
156 };
157}
#define HEPH_API
Definition HephShared.h:124
class for storing the audio samples in internal format.
Definition AudioBuffer.h:16
base class for the audio effects.
Definition AudioEffect.h:15
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
virtual void ResetInternalState() override
AudioBuffer pastSamples
Definition Echo.h:53
double reflectionDelay
Definition Echo.h:29
virtual double GetDecayFactor() const