Merge pull request #1318 from diizy/stable-1.1
Use exp10 instead of pow and create alias for win/mac for compat
This commit is contained in:
@@ -47,6 +47,12 @@ using namespace std;
|
||||
#ifndef _isinff
|
||||
#define _isinff(x) isinf(x)
|
||||
#endif
|
||||
#ifndef exp10
|
||||
#define exp10(x) pow( 10, x )
|
||||
#endif
|
||||
#ifndef exp10f
|
||||
#define exp10f(x) powf( 10, x )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
|
||||
@@ -76,12 +76,12 @@ dynProcEffect::~dynProcEffect()
|
||||
|
||||
inline void dynProcEffect::calcAttack()
|
||||
{
|
||||
m_attCoeff = pow( 10, ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() );
|
||||
m_attCoeff = exp10( ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
inline void dynProcEffect::calcRelease()
|
||||
{
|
||||
m_relCoeff = pow( 10, ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() );
|
||||
m_relCoeff = exp10( ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user