Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EQ plugin now responds to wet / dry control #3520

Merged
merged 1 commit into from
May 2, 2017
Merged
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
11 changes: 11 additions & 0 deletions plugins/Eq/EqEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ EqEffect::~EqEffect()

bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
{
//wet/dry controls
const float dry = dryLevel();
const float wet = wetLevel();
sample_t dryS[2];
// setup sample exact controls
float hpRes = m_eqControls.m_hpResModel.value();
float lowShelfRes = m_eqControls.m_lowShelfResModel.value();
Expand Down Expand Up @@ -205,6 +209,9 @@ bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )

for( fpp_t f = 0; f < frames; f++)
{
//wet dry buffer
dryS[0] = buf[f][0];
dryS[1] = buf[f][1];
if( hpActive )
{
m_hp12.setParameters( sampleRate, *hpFreqPtr, *hpResPtr, 1 );
Expand Down Expand Up @@ -296,6 +303,10 @@ bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
}
}

//apply wet / dry levels
buf[f][1] = ( dry * dryS[1] ) + ( wet * buf[f][1] );
buf[f][0] = ( dry * dryS[0] ) + ( wet * buf[f][0] );

//increment pointers if needed
hpResPtr += hpResInc;
lowShelfResPtr += lowShelfResInc;
Expand Down