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
LinearFadeOut.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
3#include "AudioEffect.h"
4
7namespace HephAudio
8{
14 {
15 public:
17
18 protected:
23 double duration;
24
29 size_t startIndex;
30
36
37 public:
40
47 explicit LinearFadeOut(double duration);
48
57
59 virtual ~LinearFadeOut() = default;
60
61 virtual std::string Name() const override;
62 virtual void Process(AudioBuffer& buffer, size_t startIndex, size_t frameCount) override;
63
68 virtual double GetDuration() const;
69
75 virtual void SetDuration(double duration);
76
81 virtual size_t GetStartIndex() const;
82
88 virtual void SetStartIndex(size_t startIndex);
89
90 protected:
91 virtual void ProcessST(const AudioBuffer& inputBuffer, AudioBuffer& outputBuffer, size_t startIndex, size_t frameCount) override;
92 };
93}
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)
applies linear fade-out.
Definition LinearFadeOut.h:14
virtual void Process(AudioBuffer &buffer, size_t startIndex, size_t frameCount) override
double duration
Definition LinearFadeOut.h:23
virtual void SetStartIndex(size_t startIndex)
virtual void ProcessST(const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override
LinearFadeOut(double duration)
LinearFadeOut(double duration, size_t startIndex)
size_t currentIndex
Definition LinearFadeOut.h:35
virtual size_t GetStartIndex() const
virtual void SetDuration(double duration)
virtual std::string Name() const override
virtual ~LinearFadeOut()=default
size_t startIndex
Definition LinearFadeOut.h:29
virtual double GetDuration() const