If multiple loop regions in the file take the 1st

This commit is contained in:
Paul Ferrand 2019-12-29 22:59:19 +01:00
parent 63cc8ef26e
commit 7aff30f58a

View file

@ -122,7 +122,7 @@ absl::optional<sfz::FilePool::FileInformation> sfz::FilePool::getFileInformation
SF_INSTRUMENT instrumentInfo;
sndFile.command(SFC_GET_INSTRUMENT, &instrumentInfo, sizeof(instrumentInfo));
if (instrumentInfo.loop_count == 1) {
if (instrumentInfo.loop_count > 0) {
returnedValue.loopBegin = instrumentInfo.loops[0].start;
returnedValue.loopEnd = instrumentInfo.loops[0].end;
}