diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index 0eb79ae38..66871fcc5 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -363,8 +363,6 @@ bool sfz::Synth::loadSfzFile(const fs::path& file) } region->sampleEnd = std::min(region->sampleEnd, fileInformation->end); - if (region->loopRange.getEnd() == Default::loopRange.getEnd()) - region->loopRange.setEnd(region->sampleEnd); if (fileInformation->loopBegin != Default::loopRange.getStart() && fileInformation->loopEnd != Default::loopRange.getEnd()) { if (region->loopRange.getStart() == Default::loopRange.getStart()) @@ -377,6 +375,9 @@ bool sfz::Synth::loadSfzFile(const fs::path& file) region->loopMode = SfzLoopMode::loop_continuous; } + if (region->loopRange.getEnd() == Default::loopRange.getEnd()) + region->loopRange.setEnd(region->sampleEnd); + if (fileInformation->numChannels == 2) region->hasStereoSample = true;