changes the sample rate.
More...
#include <Resampler.h>
|
| virtual void | ProcessST (const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override |
| |
| virtual AudioBuffer | CreateOutputBuffer (const AudioBuffer &inputBuffer, size_t startIndex, size_t frameCount) const override |
| |
| virtual void | InitializeOutputBuffer (const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) const override |
| |
| | DoubleBufferedAudioEffect () |
| |
| | AudioEffect () |
| |
| virtual void | ProcessMT (const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) |
| |
◆ Resampler() [1/2]
| HephAudio::Resampler::Resampler |
( |
| ) |
|
creates a new instance and initializes it with default values.
◆ Resampler() [2/2]
| HephAudio::Resampler::Resampler |
( |
size_t | outputSampleRate | ) |
|
|
explicit |
creates a new instance and initializes it with the provided values.
- Parameters
-
| outputSampleRate | the sample rate the input will be converted to. |
◆ ~Resampler()
| virtual HephAudio::Resampler::~Resampler |
( |
| ) |
|
|
virtualdefault |
releases the resources and destroys the instance.
◆ Name()
| virtual std::string HephAudio::Resampler::Name |
( |
| ) |
const |
|
overridevirtual |
◆ CalculateRequiredFrameCount()
| virtual size_t HephAudio::Resampler::CalculateRequiredFrameCount |
( |
size_t | outputFrameCount, |
|
|
const AudioFormatInfo & | formatInfo ) const |
|
overridevirtual |
calculates the number of frames required to obtain the number of frames desired for the output buffer.
- Parameters
-
| outputFrameCount | the number of frames desired for the output buffer. |
| formatInfo | the format info of the input buffer. |
Reimplemented from HephAudio::AudioEffect.
◆ CalculateOutputFrameCount()
| virtual size_t HephAudio::Resampler::CalculateOutputFrameCount |
( |
size_t | inputFrameCount, |
|
|
const AudioFormatInfo & | formatInfo ) const |
|
overridevirtual |
calculates the number of frames the buffer will contain after applying the effect.
- Parameters
-
| inputFrameCount | the number of frames of the input buffer. |
| formatInfo | the format info of the input buffer. |
Reimplemented from HephAudio::AudioEffect.
◆ CalculateAdvanceSize()
| virtual size_t HephAudio::Resampler::CalculateAdvanceSize |
( |
size_t | renderFrameCount, |
|
|
const AudioFormatInfo & | formatInfo ) const |
|
overridevirtual |
calculates the number of frames to process and advance for the current render event.
- Parameters
-
| renderFrameCount | number of audio frames that will be rendered. |
| formatInfo | the format info of the input buffer. |
Reimplemented from HephAudio::AudioEffect.
◆ GetOutputSampleRate()
| virtual size_t HephAudio::Resampler::GetOutputSampleRate |
( |
| ) |
const |
|
virtual |
gets the output sample rate.
◆ SetOutputSampleRate()
| virtual void HephAudio::Resampler::SetOutputSampleRate |
( |
size_t | outputSampleRate | ) |
|
|
virtual |
sets the output sample rate.
- Parameters
-
| outputSampleRate | the sample rate the input will be converted to. |
◆ ProcessST()
| virtual void HephAudio::Resampler::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.
◆ CreateOutputBuffer()
| virtual AudioBuffer HephAudio::Resampler::CreateOutputBuffer |
( |
const AudioBuffer & | inputBuffer, |
|
|
size_t | startIndex, |
|
|
size_t | frameCount ) const |
|
overrideprotectedvirtual |
creates the output buffer but does not initialize it.
- Parameters
-
| inputBuffer | contains the audio data which will be processed. |
| startIndex | index of the first sample to process. |
| frameCount | number of frames to process. |
Reimplemented from HephAudio::DoubleBufferedAudioEffect.
◆ InitializeOutputBuffer()
| virtual void HephAudio::Resampler::InitializeOutputBuffer |
( |
const AudioBuffer & | inputBuffer, |
|
|
AudioBuffer & | outputBuffer, |
|
|
size_t | startIndex, |
|
|
size_t | frameCount ) const |
|
overrideprotectedvirtual |
initializes the output buffer.
- 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. |
Reimplemented from HephAudio::DoubleBufferedAudioEffect.
◆ outputSampleRate
| size_t HephAudio::Resampler::outputSampleRate |
|
protected |
the sample rate the input will be converted to.