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
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:
16 using AudioEffect::Process;
17
18 protected:
23 double startTime;
24
29 double duration;
30
36
37 public:
40
47 explicit LinearFadeOut(double duration);
48
56 LinearFadeOut(double duration, double startTime);
57
59 virtual ~LinearFadeOut() = default;
60
61 virtual std::string Name() const override;
62 virtual void ResetInternalState() override;
63 virtual void Process(AudioBuffer& buffer, size_t startIndex, size_t frameCount) override;
64
69 virtual double GetStartTime() const;
70
76 virtual void SetStartTime(double startTime);
77
82 virtual double GetDuration() const;
83
89 virtual void SetDuration(double duration);
90
91 protected:
92 virtual void ProcessST(const AudioBuffer& inputBuffer, AudioBuffer& outputBuffer, size_t startIndex, size_t frameCount) override;
93 };
94}
#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
applies linear fade-out.
Definition LinearFadeOut.h:14
virtual void Process(AudioBuffer &buffer, size_t startIndex, size_t frameCount) override
virtual void ResetInternalState() override
double duration
Definition LinearFadeOut.h:29
LinearFadeOut(double duration, double startTime)
virtual void ProcessST(const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override
LinearFadeOut(double duration)
size_t currentIndex
Definition LinearFadeOut.h:35
virtual void SetStartTime(double startTime)
virtual void SetDuration(double duration)
virtual std::string Name() const override
virtual double GetStartTime() const
virtual ~LinearFadeOut()=default
double startTime
Definition LinearFadeOut.h:23
virtual double GetDuration() const