From: <sv...@op...> - 2025-02-07 22:23:21
|
Author: sagamusix Date: Fri Feb 7 23:23:14 2025 New Revision: 22868 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22868 Log: Merged revision(s) 22864 from trunk/OpenMPT: [Fix] Don't execute sample cues when a channel is actually an Adlib channel. Sample cues share memory with the OPL patch data. ........ Modified: branches/OpenMPT-1.28/ (props changed) branches/OpenMPT-1.28/soundlib/Snd_fx.cpp Modified: branches/OpenMPT-1.28/soundlib/Snd_fx.cpp ============================================================================== --- branches/OpenMPT-1.28/soundlib/Snd_fx.cpp Fri Feb 7 23:22:30 2025 (r22867) +++ branches/OpenMPT-1.28/soundlib/Snd_fx.cpp Fri Feb 7 23:23:14 2025 (r22868) @@ -1050,7 +1050,7 @@ startTick = playState.m_nMusicSpeed - 1; } else if(m.volcmd == VOLCMD_OFFSET) { - if(chn.pModSample != nullptr && m.vol <= CountOf(chn.pModSample->cues)) + if(chn.pModSample != nullptr && !chn.pModSample->uFlags[CHN_ADLIB] && m.vol <= CountOf(chn.pModSample->cues)) { SmpLength offset; if(m.vol == 0) @@ -3116,7 +3116,7 @@ break; case VOLCMD_OFFSET: - if (triggerNote && chn.pModSample && vol <= CountOf(chn.pModSample->cues)) + if(triggerNote && chn.pModSample && !chn.pModSample->uFlags[CHN_ADLIB] && vol <= CountOf(chn.pModSample->cues)) { SmpLength offset; if(vol == 0) @@ -5554,7 +5554,7 @@ if(m_playBehaviour[kITRetrigger]) chn.position.Set(0); offset--; - if(chn.pModSample != nullptr && offset >= 0 && offset <= static_cast<int>(CountOf(chn.pModSample->cues)) && chn.pModSample != nullptr) + if(chn.pModSample != nullptr && !chn.pModSample->uFlags[CHN_ADLIB] && offset >= 0 && offset <= static_cast<int>(CountOf(chn.pModSample->cues))) { if(offset == 0) offset = chn.oldOffset; else offset = chn.oldOffset = chn.pModSample->cues[offset - 1]; |