Skip to content

Commit

Permalink
Fix the use of file loop markers
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcima committed May 1, 2020
1 parent ffb476a commit adaaf4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sfizz/Synth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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;

Expand Down

0 comments on commit adaaf4b

Please sign in to comment.