From: <sv...@op...> - 2024-04-15 13:44:16
|
Author: sagamusix Date: Mon Apr 15 15:44:02 2024 New Revision: 20606 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20606 Log: [Fix] PumaTracker waveform cycling was broken. Modified: trunk/OpenMPT/soundlib/InstrumentSynth.cpp Modified: trunk/OpenMPT/soundlib/InstrumentSynth.cpp ============================================================================== --- trunk/OpenMPT/soundlib/InstrumentSynth.cpp Mon Apr 15 15:43:23 2024 (r20605) +++ trunk/OpenMPT/soundlib/InstrumentSynth.cpp Mon Apr 15 15:44:02 2024 (r20606) @@ -43,7 +43,8 @@ bool m_gtkVibratoEnabled = false; uint8 m_gtkVibratoWidth = 0, m_gtkVibratoSpeed = 0, m_gtkVibratoPos = 0; - uint8 m_pumaStartWaveform = 0, m_pumaEndWaveform = 0, m_pumaWaveformStep = 0, m_pumaWaveform = 0; + uint8 m_pumaStartWaveform = 0, m_pumaEndWaveform = 0, m_pumaWaveform = 0; + int8 m_pumaWaveformStep = 0; uint8 m_medVibratoEnvelope = uint8_max, m_medVibratoSpeed = 0, m_medVibratoDepth = 0; uint16 m_medVibratoPos = 0; @@ -227,7 +228,7 @@ } // MED stuff - if(m_medArpOffset < events.size()) + if(m_medArpOffset < events.size() && events[m_medArpOffset].u16) { m_linearPitchFactor = 16 * events[m_medArpOffset + m_medArpPos].u8; m_medArpPos = static_cast<uint8>((m_medArpPos + 1) % events[m_medArpOffset].u16); @@ -407,7 +408,7 @@ m_pumaWaveformStep = 0; } else { - m_pumaWaveformStep = event.Byte1(); + m_pumaWaveformStep = static_cast<int8>(event.Byte1()); m_pumaEndWaveform = event.Byte2() + m_pumaStartWaveform; } ChannelSetSample(chn, sndFile, m_pumaWaveform); |