diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index 4e4c11dec..7f1a594aa 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -293,10 +293,11 @@ void FurnaceGUI::drawSampleEdit() { String alignHint=fmt::sprintf(_("NES: loop start must be a multiple of 512 (try with %d)"),tryWith); SAMPLE_WARN(warnLoopStart,alignHint); } - if ((sample->loopEnd>0) && ((sample->loopEnd-8)&127)) { + if ((sample->loopEnd-8)&127) { int tryWith=(sample->loopEnd-8)&(~127); if (tryWith>(int)sample->samples) tryWith-=128; tryWith+=8; // +1 bc of how sample length is treated: https://www.nesdev.org/wiki/APU_DMC + if (tryWith<8) tryWith=8; String alignHint=fmt::sprintf(_("NES: loop end must be a multiple of 128 + 8 (try with %d)"),tryWith); SAMPLE_WARN(warnLoopEnd,alignHint); }