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
Equalizer.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
4#include <vector>
5
8namespace HephAudio
9{
15 {
16 public:
22 {
27 double f1;
28
33 double f2;
34
39 double volume;
40
49 FrequencyRange(double f1, double f2, double volume);
50 };
51
52 protected:
57 std::vector<Equalizer::FrequencyRange> frequencyRanges;
58
59 public:
62
64 Equalizer(size_t hopSize, const Window& wnd);
65
72 Equalizer(size_t hopSize, const Window& wnd, const std::initializer_list<Equalizer::FrequencyRange>& frequencyRanges);
73
80 Equalizer(size_t hopSize, const Window& wnd, const std::vector<Equalizer::FrequencyRange>& frequencyRanges);
81
83 virtual ~Equalizer() = default;
84
85 virtual std::string Name() const override;
86
91 virtual const std::vector<Equalizer::FrequencyRange>& GetFrequencyRanges() const;
92
101 virtual void AddFrequencyRange(double f1, double f2, double volume);
102
110
118 virtual void ModifyFrequencyRange(size_t index, const Equalizer::FrequencyRange& range);
119
126 virtual void RemoveFrequencyRange(size_t index);
127
128 protected:
129 virtual void ProcessST(const AudioBuffer& inputBuffer, AudioBuffer& outputBuffer, size_t startIndex, size_t frameCount) override;
130 };
131}
#define HEPH_API
Definition HephShared.h:124
class for storing the audio samples in internal format.
Definition AudioBuffer.h:16
adjusts the volumes of multiple frequency ranges.
Definition Equalizer.h:15
virtual void RemoveFrequencyRange(size_t index)
virtual void AddFrequencyRange(double f1, double f2, double volume)
virtual const std::vector< Equalizer::FrequencyRange > & GetFrequencyRanges() const
virtual void ProcessST(const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override
virtual ~Equalizer()=default
Equalizer(size_t hopSize, const Window &wnd, const std::initializer_list< Equalizer::FrequencyRange > &frequencyRanges)
std::vector< Equalizer::FrequencyRange > frequencyRanges
Definition Equalizer.h:57
virtual std::string Name() const override
virtual void AddFrequencyRange(const Equalizer::FrequencyRange &range)
Equalizer(size_t hopSize, const Window &wnd)
Equalizer(size_t hopSize, const Window &wnd, const std::vector< Equalizer::FrequencyRange > &frequencyRanges)
virtual void ModifyFrequencyRange(size_t index, const Equalizer::FrequencyRange &range)
base class for effects that are computed in the frequency domain.
Definition FrequencyDomainEffect.h:16
base class for windows.
Definition Window.h:14
represents a range of frequencies with volume adjustment.
Definition Equalizer.h:22
double volume
Definition Equalizer.h:39
double f2
Definition Equalizer.h:33
FrequencyRange(double f1, double f2, double volume)
double f1
Definition Equalizer.h:27