Modify BassBooster to show how to replace signals/slots in DSP

This commit is contained in:
Vesa
2014-11-16 14:51:50 +02:00
parent 3e19bc8ddb
commit f8c618b0ed
5 changed files with 47 additions and 40 deletions

View File

@@ -240,6 +240,9 @@ public:
return m_hasLinkedModels;
}
// a way to track changed values in the model and avoid using signals/slots - useful for speed-critical code.
// note that this method should only be called once per period since it resets the state of the variable - so if your model
// has to be accessed by more than one object, then this function shouldn't be used.
bool isValueChanged()
{
if( m_valueChanged )
@@ -247,6 +250,7 @@ public:
m_valueChanged = false;
return true;
}
return false;
}
float globalAutomationValueAt( const MidiTime& time );