From: <sv...@op...> - 2024-06-14 22:03:50
|
Author: sagamusix Date: Sat Jun 15 00:03:43 2024 New Revision: 21030 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21030 Log: Merged revision(s) 21029 from trunk/OpenMPT: [Fix] MOD: Allow sample swapping to work when swapping from a non-looping, stopped sample back to a looping sample. Fixes MOD.energy (https://www.un4seen.com/forum/?topic=15448.msg143034#msg143034). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Modified: branches/OpenMPT-1.31/soundlib/Snd_fx.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Fri Jun 14 23:47:39 2024 (r21029) +++ branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Sat Jun 15 00:03:43 2024 (r21030) @@ -2707,8 +2707,8 @@ if(m_playBehaviour[kMODSampleSwap]) { // ProTracker Compatibility: If a sample was stopped before, lone instrument numbers can retrigger it - // Test case: PTSwapEmpty.mod, PTInstrVolume.mod, SampleSwap.s3m - if(!chn.IsSamplePlaying() && (chn.pModSample == nullptr || !chn.pModSample->HasSampleData())) + // Test cases: PTSwapEmpty.mod, PTInstrVolume.mod, PTStoppedSwap.mod + if(!chn.IsSamplePlaying() && instr <= GetNumSamples() && Samples[instr].uFlags[CHN_LOOP]) keepInstr = true; } |