LMMS
Loading...
Searching...
No Matches
lmms::Upsampler< MaxStages, MaxCoefs > Class Template Reference

#include <OversamplingHelpers.h>

Public Member Functions

void reset ()
void setup (int stages, float sampleRate, float passband=HIIR_DEFAULT_PASSBAND)
void processSample (float *outSamples, float inSample)
int getStages () const
float getSampleRate () const
float getPassband () const
void setStages (int stages)
void setSampleRate (float sampleRate)
void setPassband (float passband)

Private Attributes

hiir::Upsampler2xFpu< s_firstCoefCountm_upsampleFirst
hiir::Upsampler2xFpu< s_secondCoefCountm_upsampleSecond
std::array< hiir::Upsampler2xFpu< s_restCoefCount >, MaxStages - 2 > m_upsampleRest
int m_stages = 0
float m_sampleRate = 44100
float m_passband = HIIR_DEFAULT_PASSBAND

Static Private Attributes

static constexpr int s_firstCoefCount = MaxCoefs
static constexpr int s_secondCoefCount = std::max(MaxCoefs / 2, 2)
static constexpr int s_restCoefCount = std::max(MaxCoefs / 4, 2)

Member Function Documentation

◆ getPassband()

template<int MaxStages, int MaxCoefs = 8>
float lmms::Upsampler< MaxStages, MaxCoefs >::getPassband ( ) const
inline

◆ getSampleRate()

template<int MaxStages, int MaxCoefs = 8>
float lmms::Upsampler< MaxStages, MaxCoefs >::getSampleRate ( ) const
inline

◆ getStages()

template<int MaxStages, int MaxCoefs = 8>
int lmms::Upsampler< MaxStages, MaxCoefs >::getStages ( ) const
inline

◆ processSample()

template<int MaxStages, int MaxCoefs = 8>
void lmms::Upsampler< MaxStages, MaxCoefs >::processSample ( float * outSamples,
float inSample )
inline

◆ reset()

template<int MaxStages, int MaxCoefs = 8>
void lmms::Upsampler< MaxStages, MaxCoefs >::reset ( )
inline

◆ setPassband()

template<int MaxStages, int MaxCoefs = 8>
void lmms::Upsampler< MaxStages, MaxCoefs >::setPassband ( float passband)
inline

◆ setSampleRate()

template<int MaxStages, int MaxCoefs = 8>
void lmms::Upsampler< MaxStages, MaxCoefs >::setSampleRate ( float sampleRate)
inline

◆ setStages()

template<int MaxStages, int MaxCoefs = 8>
void lmms::Upsampler< MaxStages, MaxCoefs >::setStages ( int stages)
inline

◆ setup()

template<int MaxStages, int MaxCoefs = 8>
void lmms::Upsampler< MaxStages, MaxCoefs >::setup ( int stages,
float sampleRate,
float passband = HIIR_DEFAULT_PASSBAND )
inline

Member Data Documentation

◆ m_passband

template<int MaxStages, int MaxCoefs = 8>
float lmms::Upsampler< MaxStages, MaxCoefs >::m_passband = HIIR_DEFAULT_PASSBAND
private

◆ m_sampleRate

template<int MaxStages, int MaxCoefs = 8>
float lmms::Upsampler< MaxStages, MaxCoefs >::m_sampleRate = 44100
private

◆ m_stages

template<int MaxStages, int MaxCoefs = 8>
int lmms::Upsampler< MaxStages, MaxCoefs >::m_stages = 0
private

◆ m_upsampleFirst

template<int MaxStages, int MaxCoefs = 8>
hiir::Upsampler2xFpu<s_firstCoefCount> lmms::Upsampler< MaxStages, MaxCoefs >::m_upsampleFirst
private

◆ m_upsampleRest

template<int MaxStages, int MaxCoefs = 8>
std::array<hiir::Upsampler2xFpu<s_restCoefCount>, MaxStages - 2> lmms::Upsampler< MaxStages, MaxCoefs >::m_upsampleRest
private

◆ m_upsampleSecond

template<int MaxStages, int MaxCoefs = 8>
hiir::Upsampler2xFpu<s_secondCoefCount> lmms::Upsampler< MaxStages, MaxCoefs >::m_upsampleSecond
private

◆ s_firstCoefCount

template<int MaxStages, int MaxCoefs = 8>
int lmms::Upsampler< MaxStages, MaxCoefs >::s_firstCoefCount = MaxCoefs
staticconstexprprivate

◆ s_restCoefCount

template<int MaxStages, int MaxCoefs = 8>
int lmms::Upsampler< MaxStages, MaxCoefs >::s_restCoefCount = std::max(MaxCoefs / 4, 2)
staticconstexprprivate

◆ s_secondCoefCount

template<int MaxStages, int MaxCoefs = 8>
int lmms::Upsampler< MaxStages, MaxCoefs >::s_secondCoefCount = std::max(MaxCoefs / 2, 2)
staticconstexprprivate

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