applies linear fade-out.
More...
#include <LinearFadeOut.h>
◆ LinearFadeOut() [1/3]
HephAudio::LinearFadeOut::LinearFadeOut |
( |
| ) |
|
creates a new instance and initializes it with default values.
◆ LinearFadeOut() [2/3]
HephAudio::LinearFadeOut::LinearFadeOut |
( |
double | duration | ) |
|
|
explicit |
creates a new instance and initializes it with the provided values.
- Parameters
-
duration | duration of the fade-out in seconds. |
◆ LinearFadeOut() [3/3]
HephAudio::LinearFadeOut::LinearFadeOut |
( |
double | duration, |
|
|
double | startTime ) |
creates a new instance and initializes it with the provided values.
- Parameters
-
duration | duration of the fade-out in seconds. |
startTime | time, in seconds, of the first audio frame the effect will be applied to. |
◆ ~LinearFadeOut()
virtual HephAudio::LinearFadeOut::~LinearFadeOut |
( |
| ) |
|
|
virtualdefault |
releases the resources and destroys the instance.
◆ Name()
virtual std::string HephAudio::LinearFadeOut::Name |
( |
| ) |
const |
|
overridevirtual |
◆ ResetInternalState()
virtual void HephAudio::LinearFadeOut::ResetInternalState |
( |
| ) |
|
|
overridevirtual |
◆ Process() [1/3]
virtual void HephAudio::LinearFadeOut::Process |
( |
AudioBuffer & | buffer, |
|
|
size_t | startIndex, |
|
|
size_t | frameCount ) |
|
overridevirtual |
Applies the effect.
- Parameters
-
buffer | contains the audio data which will be processed. |
startIndex | index of the first audio frame to process. |
frameCount | number of frames to process. |
Reimplemented from HephAudio::AudioEffect.
◆ GetStartTime()
virtual double HephAudio::LinearFadeOut::GetStartTime |
( |
| ) |
const |
|
virtual |
gets the start time in seconds.
◆ SetStartTime()
virtual void HephAudio::LinearFadeOut::SetStartTime |
( |
double | startTime | ) |
|
|
virtual |
sets the start index.
- Parameters
-
startTime | time, in seconds, of the first audio frame the effect will be applied to. |
◆ GetDuration()
virtual double HephAudio::LinearFadeOut::GetDuration |
( |
| ) |
const |
|
virtual |
gets the duration in seconds.
◆ SetDuration()
virtual void HephAudio::LinearFadeOut::SetDuration |
( |
double | duration | ) |
|
|
virtual |
sets the duration.
- Parameters
-
duration | duration of the fade-out in seconds. |
◆ ProcessST()
virtual void HephAudio::LinearFadeOut::ProcessST |
( |
const AudioBuffer & | inputBuffer, |
|
|
AudioBuffer & | outputBuffer, |
|
|
size_t | startIndex, |
|
|
size_t | frameCount ) |
|
overrideprotectedvirtual |
applies the effect using single thread.
- Parameters
-
inputBuffer | contains the audio data which will be processed. |
outputBuffer | contains the processed audio data. |
startIndex | index of the first sample to process. |
frameCount | number of frames to process. |
Implements HephAudio::AudioEffect.
◆ Process() [2/3]
virtual void HephAudio::AudioEffect::Process |
( |
AudioBuffer & | buffer | ) |
|
|
virtual |
Applies the effect.
- Parameters
-
buffer | contains the audio data which will be processed. |
Reimplemented from HephAudio::AudioEffect.
◆ Process() [3/3]
virtual void HephAudio::AudioEffect::Process |
( |
AudioBuffer & | buffer, |
|
|
size_t | startIndex ) |
|
virtual |
Applies the effect.
- Parameters
-
buffer | contains the audio data which will be processed. |
startIndex | index of the first audio frame to process. |
Reimplemented from HephAudio::AudioEffect.
◆ startTime
double HephAudio::LinearFadeOut::startTime |
|
protected |
time, in seconds, of the first audio frame the effect will be applied to.
◆ duration
double HephAudio::LinearFadeOut::duration |
|
protected |
duration of the fade-out in seconds.
◆ currentIndex
size_t HephAudio::LinearFadeOut::currentIndex |
|
protected |
for real-time processing.