Xfade related to file sample rate, with oversampling considered
This commit is contained in:
parent
893d0361c2
commit
ab35581786
1 changed files with 2 additions and 1 deletions
|
|
@ -574,7 +574,8 @@ void sfz::Voice::fillWithData(AudioSpan<float> buffer) noexcept
|
||||||
if (isLooping) {
|
if (isLooping) {
|
||||||
loopStart = static_cast<int>(region->loopStart(currentPromise->oversamplingFactor));
|
loopStart = static_cast<int>(region->loopStart(currentPromise->oversamplingFactor));
|
||||||
loopSize = loopEnd + 1 - loopStart;
|
loopSize = loopEnd + 1 - loopStart;
|
||||||
loopXfadeSize = static_cast<int>(lroundPositive(region->loopCrossfade * sampleRate));
|
loopXfadeSize = static_cast<int>(
|
||||||
|
lroundPositive(region->loopCrossfade * static_cast<int>(currentPromise->oversamplingFactor) * currentPromise->sampleRate));
|
||||||
loopXfOutStart = loopEnd + 1 - loopXfadeSize;
|
loopXfOutStart = loopEnd + 1 - loopXfadeSize;
|
||||||
loopXfInStart = loopStart - loopXfadeSize;
|
loopXfInStart = loopStart - loopXfadeSize;
|
||||||
for (auto& buf : xfadeTemp) {
|
for (auto& buf : xfadeTemp) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue