Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions include/BasicFilters.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,16 @@ class BasicFilters
}
}

inline void setSampleRate(const sample_rate_t sampleRate)
{
m_sampleRate = sampleRate;
m_sampleRatio = 1.f / m_sampleRate;
if (m_subFilter != nullptr)
{
m_subFilter->setSampleRate(m_sampleRate);
}
}

inline sample_t update( sample_t _in0, ch_cnt_t _chnl )
{
sample_t out;
Expand Down
11 changes: 1 addition & 10 deletions plugins/LOMM/LOMM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ void LOMMEffect::changeSampleRate()
m_lp2.setSampleRate(m_sampleRate);
m_hp1.setSampleRate(m_sampleRate);
m_hp2.setSampleRate(m_sampleRate);
m_ap.setSampleRate(m_sampleRate);

m_coeffPrecalc = -2.2f / (m_sampleRate * 0.001f);
m_needsUpdate = true;
Expand All @@ -98,16 +99,6 @@ void LOMMEffect::changeSampleRate()
}
}

void LOMMEffect::clearFilterHistories()
{
m_lp1.clearHistory();
m_lp2.clearHistory();
m_hp1.clearHistory();
m_hp2.clearHistory();
}




bool LOMMEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frames)
{
Expand Down
2 changes: 0 additions & 2 deletions plugins/LOMM/LOMM.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class LOMMEffect : public Effect
return &m_lommControls;
}

void clearFilterHistories();

inline float msToCoeff(float ms)
{
return (ms == 0) ? 0 : exp(m_coeffPrecalc / ms);
Expand Down