mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
scale loop when resampling
This commit is contained in:
parent
13eb0f96f1
commit
16fe199cb2
1 changed files with 2 additions and 11 deletions
|
@ -278,8 +278,9 @@ bool DivSample::trim(unsigned int begin, unsigned int end) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RESAMPLE_END \
|
#define RESAMPLE_END \
|
||||||
samples=finalCount; \
|
|
||||||
if (loopStart>=0) loopStart=(double)loopStart*(r/(double)rate); \
|
if (loopStart>=0) loopStart=(double)loopStart*(r/(double)rate); \
|
||||||
|
rate=r; \
|
||||||
|
samples=finalCount; \
|
||||||
if (depth==16) { \
|
if (depth==16) { \
|
||||||
delete[] oldData16; \
|
delete[] oldData16; \
|
||||||
} else if (depth==8) { \
|
} else if (depth==8) { \
|
||||||
|
@ -309,8 +310,6 @@ bool DivSample::resampleNone(double r) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rate=r;
|
|
||||||
|
|
||||||
RESAMPLE_END;
|
RESAMPLE_END;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -350,8 +349,6 @@ bool DivSample::resampleLinear(double r) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rate=r;
|
|
||||||
|
|
||||||
RESAMPLE_END;
|
RESAMPLE_END;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -406,8 +403,6 @@ bool DivSample::resampleCubic(double r) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rate=r;
|
|
||||||
|
|
||||||
RESAMPLE_END;
|
RESAMPLE_END;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -497,8 +492,6 @@ bool DivSample::resampleBlep(double r) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rate=r;
|
|
||||||
|
|
||||||
RESAMPLE_END;
|
RESAMPLE_END;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -566,8 +559,6 @@ bool DivSample::resampleSinc(double r) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rate=r;
|
|
||||||
|
|
||||||
RESAMPLE_END;
|
RESAMPLE_END;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue