Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Resampler Class Reference

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.

Detailed Description

Audio resampler.

This currently only supports 32-bit interleaved floats for input and output.

Definition at line 25 of file resampler.h.

Member Enumeration Documentation

◆ Quality

enum class Resampler::Quality
strong

Definition at line 28 of file resampler.h.

Constructor & Destructor Documentation

◆ Resampler()

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.

Exceptions
ZrythmExceptionon error.

Member Function Documentation

◆ get_out_frames()

zrythm::utils::audio::AudioBuffer Resampler::get_out_frames ( ) const

Gets the interleaved output frames.

is_done() must be true before calling this.

◆ process()

void Resampler::process ( )

To be called periodically until is_done() returns true.

Exceptions
ZrythmExceptionon error.

The documentation for this class was generated from the following file: