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
LinearFadeIn.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 LinearFadeIn(double duration);
48
57
59 virtual ~LinearFadeIn() = 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-in.
Definition LinearFadeIn.h:14
size_t startIndex
Definition LinearFadeIn.h:29
virtual size_t GetStartIndex() const
virtual void ProcessST(const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override
virtual void SetStartIndex(size_t startIndex)
double duration
Definition LinearFadeIn.h:23
LinearFadeIn(double duration, size_t startIndex)
virtual void Process(AudioBuffer &buffer, size_t startIndex, size_t frameCount) override
virtual void SetDuration(double duration)
virtual ~LinearFadeIn()=default
virtual double GetDuration() const
virtual std::string Name() const override
LinearFadeIn(double duration)
size_t currentIndex
Definition LinearFadeIn.h:35