diff --git a/src/engine/sample.cpp b/src/engine/sample.cpp index 55982e59..66e54d85 100644 --- a/src/engine/sample.cpp +++ b/src/engine/sample.cpp @@ -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; }