scale loop when resampling

This commit is contained in:
tildearrow 2022-03-21 23:54:01 -05:00
parent 13eb0f96f1
commit 16fe199cb2

View file

@ -278,8 +278,9 @@ bool DivSample::trim(unsigned int begin, unsigned int end) {
}
#define RESAMPLE_END \
samples=finalCount; \
if (loopStart>=0) loopStart=(double)loopStart*(r/(double)rate); \
rate=r; \
samples=finalCount; \
if (depth==16) { \
delete[] oldData16; \
} else if (depth==8) { \
@ -309,8 +310,6 @@ bool DivSample::resampleNone(double r) {
}
}
rate=r;
RESAMPLE_END;
return true;
}
@ -350,8 +349,6 @@ bool DivSample::resampleLinear(double r) {
}
}
rate=r;
RESAMPLE_END;
return true;
}
@ -406,8 +403,6 @@ bool DivSample::resampleCubic(double r) {
}
}
rate=r;
RESAMPLE_END;
return true;
}
@ -497,8 +492,6 @@ bool DivSample::resampleBlep(double r) {
}
}
rate=r;
RESAMPLE_END;
return true;
}
@ -566,8 +559,6 @@ bool DivSample::resampleSinc(double r) {
}
}
rate=r;
RESAMPLE_END;
return true;
}