From: <sv...@op...> - 2025-02-07 22:22:37
|
Author: sagamusix Date: Fri Feb 7 23:22:30 2025 New Revision: 22867 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22867 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.29/ (props changed) branches/OpenMPT-1.29/soundlib/Snd_fx.cpp Modified: branches/OpenMPT-1.29/soundlib/Snd_fx.cpp ============================================================================== --- branches/OpenMPT-1.29/soundlib/Snd_fx.cpp Fri Feb 7 23:21:23 2025 (r22866) +++ branches/OpenMPT-1.29/soundlib/Snd_fx.cpp Fri Feb 7 23:22:30 2025 (r22867) @@ -1076,7 +1076,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) @@ -3192,7 +3192,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) @@ -5701,7 +5701,7 @@ if(m_playBehaviour[kITRetrigger]) chn.position.Set(0); offset--; - if(chn.pModSample != nullptr && offset >= 0 && offset <= static_cast<int>(CountOf(chn.pModSample->cues))) + 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; |