Author: sagamusix
Date: Sun May 26 22:38:43 2024
New Revision: 20857
URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20857
Log:
Merged revision(s) 20854 from trunk/OpenMPT:
[Fix] MDL: Slide depth broke when introducing Hertz instead of periods in non-linear mode.
........
Modified:
branches/OpenMPT-1.30/ (props changed)
branches/OpenMPT-1.30/soundlib/Load_dtm.cpp
branches/OpenMPT-1.30/soundlib/Load_mdl.cpp
branches/OpenMPT-1.30/soundlib/Snd_fx.cpp
Modified: branches/OpenMPT-1.30/soundlib/Load_dtm.cpp
==============================================================================
--- branches/OpenMPT-1.30/soundlib/Load_dtm.cpp Sun May 26 22:38:23 2024 (r20856)
+++ branches/OpenMPT-1.30/soundlib/Load_dtm.cpp Sun May 26 22:38:43 2024 (r20857)
@@ -231,6 +231,7 @@
InitializeGlobals(MOD_TYPE_DTM);
InitializeChannels();
m_SongFlags.set(SONG_ITCOMPATGXX | SONG_ITOLDEFFECTS);
+ m_playBehaviour.reset(kPeriodsAreHertz);
m_playBehaviour.reset(kITVibratoTremoloPanbrello);
// Various files have a default speed or tempo of 0
if(fileHeader.tempo)
Modified: branches/OpenMPT-1.30/soundlib/Load_mdl.cpp
==============================================================================
--- branches/OpenMPT-1.30/soundlib/Load_mdl.cpp Sun May 26 22:38:23 2024 (r20856)
+++ branches/OpenMPT-1.30/soundlib/Load_mdl.cpp Sun May 26 22:38:43 2024 (r20857)
@@ -491,6 +491,7 @@
m_SongFlags = SONG_ITCOMPATGXX;
m_playBehaviour.set(kPerChannelGlobalVolSlide);
m_playBehaviour.set(kApplyOffsetWithoutNote);
+ m_playBehaviour.reset(kPeriodsAreHertz);
m_playBehaviour.reset(kITVibratoTremoloPanbrello);
m_playBehaviour.reset(kITSCxStopsSample); // Gate effect in underbeat.mdl
Modified: branches/OpenMPT-1.30/soundlib/Snd_fx.cpp
==============================================================================
--- branches/OpenMPT-1.30/soundlib/Snd_fx.cpp Sun May 26 22:38:23 2024 (r20856)
+++ branches/OpenMPT-1.30/soundlib/Snd_fx.cpp Sun May 26 22:38:43 2024 (r20857)
@@ -5993,6 +5993,7 @@
if(GetType() & (MOD_TYPE_MDL | MOD_TYPE_DTM))
{
// MDL uses non-linear slides, but their effectiveness does not depend on the middle-C frequency.
+ MPT_ASSERT(!PeriodsAreFrequencies());
return (FreqS3MTable[note % 12u] << 4) >> (note / 12);
}
if(!nC5Speed)
@@ -6111,6 +6112,7 @@
return (period + c5speed - 8363) << FREQ_FRACBITS;
} else if(GetType() & (MOD_TYPE_MDL | MOD_TYPE_DTM))
{
+ MPT_ASSERT(!PeriodsAreFrequencies());
LimitMax(period, Util::MaxValueOfType(period) >> 8);
if (!c5speed) c5speed = 8363;
return Util::muldiv_unsigned(c5speed, (1712L << 7) << FREQ_FRACBITS, (period << 8) + nPeriodFrac);
|