|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Audio resampler. More...
#include <src/utils/resampler.h>
Public Types | |
| enum class | Quality { Quick , Low , Medium , High , VeryHigh } |
Public Member Functions | |
| Resampler (const zrythm::utils::audio::AudioBuffer &in_frames, const double input_rate, const double output_rate, const Quality quality, size_t block_size=1024) | |
| Creates a new instance of a Resampler with the given settings. | |
| void | process () |
| To be called periodically until is_done() returns true. | |
| bool | is_done () const |
| Indicates whether resampling is finished. | |
| zrythm::utils::audio::AudioBuffer | get_out_frames () const |
| Gets the interleaved output frames. | |
Audio resampler.
This currently only supports 32-bit interleaved floats for input and output.
Definition at line 25 of file resampler.h.
|
strong |
Definition at line 28 of file resampler.h.
| Resampler::Resampler | ( | const zrythm::utils::audio::AudioBuffer & | in_frames, |
| const double | input_rate, | ||
| const double | output_rate, | ||
| const Quality | quality, | ||
| size_t | block_size = 1024 ) |
Creates a new instance of a Resampler with the given settings.
Resampler.num_out_frames will be set to the number of output frames required for resampling with the given settings.
| ZrythmException | on error. |
| zrythm::utils::audio::AudioBuffer Resampler::get_out_frames | ( | ) | const |
Gets the interleaved output frames.
is_done() must be true before calling this.
| void Resampler::process | ( | ) |
To be called periodically until is_done() returns true.
| ZrythmException | on error. |