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
DoubleBufferedAudioEffect.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
3#include "AudioEffect.h"
4
7namespace HephAudio
8{
13 {
14 public:
15 using AudioEffect::Process;
16
17 protected:
20
21 public:
23 virtual ~DoubleBufferedAudioEffect() = default;
24
25 virtual void Process(AudioBuffer& buffer, size_t startIndex, size_t frameCount) override;
26
27 protected:
36 virtual AudioBuffer CreateOutputBuffer(const AudioBuffer& inputBuffer, size_t startIndex, size_t frameCount) const;
37
47 virtual void InitializeOutputBuffer(const AudioBuffer& inputBuffer, AudioBuffer& outputBuffer, size_t startIndex, size_t frameCount) const;
48 };
49}
#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
base class for audio effects that use a temporary buffer while processing.
Definition DoubleBufferedAudioEffect.h:13
virtual ~DoubleBufferedAudioEffect()=default
virtual void InitializeOutputBuffer(const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) const
virtual AudioBuffer CreateOutputBuffer(const AudioBuffer &inputBuffer, size_t startIndex, size_t frameCount) const
virtual void Process(AudioBuffer &buffer, size_t startIndex, size_t frameCount) override