From: <sv...@op...> - 2024-11-06 21:19:41
|
Author: sagamusix Date: Wed Nov 6 22:19:28 2024 New Revision: 22105 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22105 Log: [Fix] Instrument synths weren't able to initiate sample playback if the instrument sample association was an empty sample slot (https://www.un4seen.com/forum/?topic=15448.msg144071#msg144071). Modified: trunk/OpenMPT/soundlib/InstrumentSynth.cpp Modified: trunk/OpenMPT/soundlib/InstrumentSynth.cpp ============================================================================== --- trunk/OpenMPT/soundlib/InstrumentSynth.cpp Wed Nov 6 22:15:11 2024 (r22104) +++ trunk/OpenMPT/soundlib/InstrumentSynth.cpp Wed Nov 6 22:19:28 2024 (r22105) @@ -166,6 +166,8 @@ const ModSample &sample = sndFile.GetSample(smp); if(chn.pModSample == &sample && channelIsActive) return; + if(chn.increment.IsZero() && chn.nLength == 0 && chn.nVolume == 0) + chn.nVolume = 256; chn.pModSample = &sample; chn.pCurrentSample = sample.samplev(); chn.dwFlags = (chn.dwFlags & CHN_CHANNELFLAGS) | sample.uFlags; |