From: <sv...@op...> - 2024-06-27 17:25:45
|
Author: sagamusix Date: Thu Jun 27 19:25:32 2024 New Revision: 21089 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21089 Log: [Fix] Puma: Tick duration of pitch commands is off-by-one compared to volume commands (toki91.puma, toki9.puma, toki5.puma, https://www.un4seen.com/forum/?topic=15448.msg143168#msg143168) Modified: trunk/OpenMPT/soundlib/InstrumentSynth.cpp Modified: trunk/OpenMPT/soundlib/InstrumentSynth.cpp ============================================================================== --- trunk/OpenMPT/soundlib/InstrumentSynth.cpp Thu Jun 27 18:58:07 2024 (r21088) +++ trunk/OpenMPT/soundlib/InstrumentSynth.cpp Thu Jun 27 19:25:32 2024 (r21089) @@ -569,12 +569,12 @@ case Event::Type::Puma_SetPitch: m_linearPitchFactor = event.i8 * 8; m_periodAdd = 0; - m_ticksRemain = event.Byte2(); + m_ticksRemain = std::max(event.Byte2(), uint8(1)) - 1; return true; case Event::Type::Puma_PitchRamp: m_linearPitchFactor = 0; m_periodAdd = event.i8 * 4; - m_ticksRemain = event.Byte2(); + m_ticksRemain = std::max(event.Byte2(), uint8(1)) - 1; return true; case Event::Type::Mupp_SetWaveform: |