Merge remote-tracking branch 'upstream/stable-1.1'
This commit is contained in:
@@ -49,6 +49,7 @@ Plugin::Descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor =
|
||||
|
||||
BassBoosterEffect::BassBoosterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ) :
|
||||
Effect( &bassbooster_plugin_descriptor, parent, key ),
|
||||
m_frequencyChangeNeeded( false ),
|
||||
m_bbFX( DspEffectLibrary::FastBassBoost( 70.0f, 1.0f, 2.8f ) ),
|
||||
m_bbControls( this )
|
||||
{
|
||||
@@ -74,7 +75,11 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
|
||||
return( false );
|
||||
}
|
||||
// check out changed controls
|
||||
if( m_bbControls.m_freqModel.isValueChanged() ) { changeFrequency(); }
|
||||
if( m_frequencyChangeNeeded || m_bbControls.m_freqModel.isValueChanged() )
|
||||
{
|
||||
changeFrequency();
|
||||
m_frequencyChangeNeeded = false;
|
||||
}
|
||||
if( m_bbControls.m_gainModel.isValueChanged() ) { changeGain(); }
|
||||
if( m_bbControls.m_ratioModel.isValueChanged() ) { changeRatio(); }
|
||||
|
||||
|
||||
@@ -44,11 +44,14 @@ public:
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
protected:
|
||||
void changeFrequency();
|
||||
void changeGain();
|
||||
void changeRatio();
|
||||
|
||||
bool m_frequencyChangeNeeded;
|
||||
|
||||
private:
|
||||
DspEffectLibrary::MonoToStereoAdaptor<DspEffectLibrary::FastBassBoost> m_bbFX;
|
||||
|
||||
BassBoosterControls m_bbControls;
|
||||
|
||||
@@ -43,7 +43,7 @@ BassBoosterControls::BassBoosterControls( BassBoosterEffect* effect ) :
|
||||
|
||||
void BassBoosterControls::changeFrequency()
|
||||
{
|
||||
m_effect->changeFrequency();
|
||||
m_effect->m_frequencyChangeNeeded = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user