aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/mt32/mmath.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/softsynth/mt32/mmath.h')
-rw-r--r--audio/softsynth/mt32/mmath.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/softsynth/mt32/mmath.h b/audio/softsynth/mt32/mmath.h
index 226d73e27e..25c79d57a9 100644
--- a/audio/softsynth/mt32/mmath.h
+++ b/audio/softsynth/mt32/mmath.h
@@ -52,6 +52,10 @@ static inline float EXP2F(float x) {
#endif
}
+static inline float EXP2I(unsigned int i) {
+ return float(1 << (i >> 12)) * Tables::getInstance().exp2[i & 0x0FFF];
+}
+
static inline float EXP10F(float x) {
return exp(FLOAT_LN_10 * x);
}