shithub: ft²

Download patch

ref: 9df662fbc6a42da7d26975e85c655ce08730408d
parent: 79d6b8c061dd6ded5e360102d1fcc31bffa1635d
author: Olav Sørensen <olav.sorensen@live.no>
date: Sun Nov 3 14:30:31 EST 2024

Update ft2_sample_ed_features.c

--- a/src/ft2_sample_ed_features.c
+++ b/src/ft2_sample_ed_features.c
@@ -90,7 +90,7 @@
 	sample_t *s = &instr[editor.curInstr]->smp[editor.curSmp];
 	bool sample16Bit = !!(s->flags & SAMPLE_16BIT);
 
-	const double dRatio = exp2((int32_t)smpEd_RelReSmp / 12.0);
+	const double dRatio = pow(2.0, (int32_t)smpEd_RelReSmp * (1.0 / 12.0));
 
 	double dNewLen = s->length * dRatio;
 	if (dNewLen > (double)MAX_SAMPLE_LEN)
@@ -207,7 +207,7 @@
 
 	sample_t *s = &instr[editor.curInstr]->smp[editor.curSmp];
 
-	double dLenMul = exp2(smpEd_RelReSmp * (1.0 / 12.0));
+	double dLenMul = pow(2.0, smpEd_RelReSmp * (1.0 / 12.0));
 
 	double dNewLen = s->length * dLenMul;
 	if (dNewLen > (double)MAX_SAMPLE_LEN)
--