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
OlaEffect.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
4#include "Windows/Window.h"
6
9namespace HephAudio
10{
16 {
17 public:
18 using DoubleBufferedAudioEffect::Process;
19
20 protected:
25 size_t hopSize;
26
32
38
44
45 protected:
48
55 explicit OlaEffect(size_t hopSize);
56
64 OlaEffect(size_t hopSize, const Window& wnd);
65
66 public:
68 virtual ~OlaEffect() = default;
69
70 virtual size_t CalculateRequiredFrameCount(size_t outputFrameCount, const AudioFormatInfo& formatInfo) const;
71 virtual void ResetInternalState() override;
72 virtual void Process(AudioBuffer& buffer, size_t startIndex, size_t frameCount) override;
73
78 virtual size_t GetHopSize() const;
79
86 virtual void SetHopSize(size_t hopSize);
87
92 virtual size_t GetWindowSize() const;
93
100 virtual void SetWindow(const Window& wnd);
101
102 protected:
107 virtual size_t CalculateMaxNumberOfOverlaps() const;
108
113 virtual size_t CalculatePastSamplesSize() const;
114 };
115}
#define HEPH_API
Definition HephShared.h:124
class for storing the audio samples in internal format.
Definition AudioBuffer.h:16
base class for audio effects that use a temporary buffer while processing.
Definition DoubleBufferedAudioEffect.h:13
base class for effects that use overlap-add method.
Definition OlaEffect.h:16
virtual size_t GetHopSize() const
virtual void ResetInternalState() override
virtual size_t GetWindowSize() const
virtual size_t CalculateRequiredFrameCount(size_t outputFrameCount, const AudioFormatInfo &formatInfo) const
OlaEffect(size_t hopSize)
virtual void SetWindow(const Window &wnd)
Heph::DoubleBuffer wnd
Definition OlaEffect.h:31
virtual void Process(AudioBuffer &buffer, size_t startIndex, size_t frameCount) override
virtual size_t CalculatePastSamplesSize() const
virtual void SetHopSize(size_t hopSize)
virtual size_t CalculateMaxNumberOfOverlaps() const
size_t hopSize
Definition OlaEffect.h:25
OlaEffect(size_t hopSize, const Window &wnd)
size_t currentIndex
Definition OlaEffect.h:37
AudioBuffer pastSamples
Definition OlaEffect.h:43
virtual ~OlaEffect()=default
base class for windows.
Definition Window.h:14
buffer for storing doubles.
Definition DoubleBuffer.h:14
stores the properties of the audio signals
Definition AudioFormatInfo.h:20