mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 22:27:13 +02:00
Fix compiler warnings
This commit is contained in:
parent
18ed3dd6ed
commit
205b9d4aec
2 changed files with 4 additions and 4 deletions
|
@ -56,12 +56,12 @@ static const double FIXQ31 = 2147483648.0; // convert float to Q31
|
|||
static const double DB_TO_LOG2 = 0.16609640474436813; // convert dB to log2
|
||||
|
||||
// convert dB to amplitude
|
||||
static double dBToGain(double dB) {
|
||||
static inline double dBToGain(double dB) {
|
||||
return pow(10.0, dB / 20.0);
|
||||
}
|
||||
|
||||
// convert milliseconds to first-order time constant
|
||||
static int32_t msToTc(double ms, double sampleRate) {
|
||||
static inline int32_t msToTc(double ms, double sampleRate) {
|
||||
double tc = exp(-1000.0 / (ms * sampleRate));
|
||||
return (int32_t)(FIXQ31 * tc); // Q31
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ void GateImpl::setHold(float hold) {
|
|||
_holdInc = (int32_t)((_holdMin - 0x7fffffff) / (PROGHOLD * _sampleRate));
|
||||
_holdInc = MIN(_holdInc, -1); // prevent 0 on long releases
|
||||
|
||||
_holdMax = 0x7fffffff - (uint32_t)(_holdInc * hold/1000.0 * _sampleRate);
|
||||
_holdMax = 0x7fffffff - (uint32_t)(_holdInc * (double)hold/1000.0 * _sampleRate);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -196,7 +196,7 @@ void GateImpl::setHold(float hold) {
|
|||
void GateImpl::setHysteresis(float hysteresis) {
|
||||
|
||||
// gate hysteresis in log2 domain
|
||||
_hysteresis = (int32_t)(hysteresis * DB_TO_LOG2 * (1 << LOG2_FRACBITS));
|
||||
_hysteresis = (int32_t)((double)hysteresis * DB_TO_LOG2 * (1 << LOG2_FRACBITS));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue