|
From: <sag...@us...> - 2013-05-18 20:37:23
|
Revision: 2109
http://sourceforge.net/p/modplug/code/2109
Author: saga-games
Date: 2013-05-18 20:37:14 +0000 (Sat, 18 May 2013)
Log Message:
-----------
[Fix] More MT2 fixes for libopenmpt
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-05-18 19:44:14 UTC (rev 2108)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-05-18 20:37:14 UTC (rev 2109)
@@ -4622,7 +4622,7 @@
//-------------------------------------------------------------------------------
{
if ((!note) || (note >= NOTE_MIN_SPECIAL)) return 0;
- if (GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT|MOD_TYPE_S3M|MOD_TYPE_STM|MOD_TYPE_MDL|MOD_TYPE_ULT|MOD_TYPE_WAV
+ if (GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT|MOD_TYPE_MT2|MOD_TYPE_S3M|MOD_TYPE_STM|MOD_TYPE_MDL|MOD_TYPE_ULT|MOD_TYPE_WAV
|MOD_TYPE_FAR|MOD_TYPE_DMF|MOD_TYPE_PTM|MOD_TYPE_AMS|MOD_TYPE_AMS2|MOD_TYPE_DBM|MOD_TYPE_AMF|MOD_TYPE_PSM|MOD_TYPE_J2B|MOD_TYPE_IMF))
{
note--;
@@ -4637,7 +4637,7 @@
//8363 * freq[note%12] / nC5Speed * 2^(5-note/12)
}
} else
- if (GetType() & (MOD_TYPE_XM|MOD_TYPE_MT2))
+ if (GetType() == MOD_TYPE_XM)
{
if (note < 13) note = 13;
note -= 13;
@@ -4688,8 +4688,7 @@
if (GetType() & (MOD_TYPE_MED|MOD_TYPE_MOD|MOD_TYPE_DIGI|MOD_TYPE_MTM|MOD_TYPE_669|MOD_TYPE_AMF0))
{
return (3546895L*4) / period;
- } else
- if (GetType() & (MOD_TYPE_XM|MOD_TYPE_MT2))
+ } else if (GetType() == MOD_TYPE_XM)
{
if(m_SongFlags[SONG_LINEARSLIDES])
return XMLinearTable[period % 768] >> (period / 768);
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2013-05-18 19:44:14 UTC (rev 2108)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2013-05-18 20:37:14 UTC (rev 2109)
@@ -1000,7 +1000,7 @@
{
// Normal loop active
uint32 end = insEnv.Ticks[insEnv.nLoopEnd];
- if(GetType() != MOD_TYPE_XM) end++;
+ if(!(GetType() & (MOD_TYPE_XM | MOD_TYPE_MT2))) end++;
// FT2 compatibility: If the sustain point is at the loop end and the sustain loop has been released, don't loop anymore.
// Test case: EnvLoops.xm
@@ -1011,7 +1011,7 @@
position = insEnv.Ticks[insEnv.nLoopStart];
if(envType == ENV_VOLUME && insEnv.nLoopStart == insEnv.nLoopEnd && insEnv.Values[insEnv.nLoopEnd] == 0
- && (!(GetType() & MOD_TYPE_XM) || (insEnv.nLoopEnd + 1u == insEnv.nNodes)))
+ && (!(GetType() & (MOD_TYPE_XM | MOD_TYPE_MT2)) || (insEnv.nLoopEnd + 1u == insEnv.nNodes)))
{
// Stop channel if the envelope loop only covers the last silent envelope point.
// Can't see a point in this, and it breaks doommix3.xm if you allow loading one-point loops, so disabling it for now.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|