From: <sag...@us...> - 2011-12-10 14:59:42
|
Revision: 1144 http://modplug.svn.sourceforge.net/modplug/?rev=1144&view=rev Author: saga-games Date: 2011-12-10 14:59:35 +0000 (Sat, 10 Dec 2011) Log Message: ----------- [Fix] IT compatibility: Portamento is not picked up from stopped notes anymore (Test case: Fade-Porta.it) Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2011-12-03 22:52:03 UTC (rev 1143) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2011-12-10 14:59:35 UTC (rev 1144) @@ -902,11 +902,20 @@ // IT Compatibility: Update multisample instruments frequency even if instrument is not specified (fixes the guitars in spx-shuttledeparture.it) if(!bPorta && pSmp && IsCompatibleMode(TRK_IMPULSETRACKER)) pChn->nC5Speed = pSmp->nC5Speed; - // XM Compatibility: Ignore notes with portamento if there was no note playing. - if(bPorta && (pChn->nInc == 0) && IsCompatibleMode(TRK_FASTTRACKER2)) + if(bPorta && pChn->nInc == 0) { - pChn->nPeriod = 0; - return; + if(IsCompatibleMode(TRK_FASTTRACKER2)) + { + // XM Compatibility: Ignore notes with portamento if there was no note playing. + // Test case: 3xx-no-old-samp.xm + pChn->nPeriod = 0; + return; + } else if(IsCompatibleMode(TRK_IMPULSETRACKER)) + { + // IT Compatibility: Ignore portamento command if no note was playing (f.e. if a previous note has faded out). + // Test case: Fade-Porta.it + bPorta = false; + } } if (GetType() & (MOD_TYPE_XM|MOD_TYPE_MT2|MOD_TYPE_MED)) @@ -3620,14 +3629,15 @@ } } else if(IsCompatibleMode(TRK_FASTTRACKER2)) { - // XM Compatibility: Don't play note + // XM Compatibility: Don't play note if offset is beyond sample length + // Test case: 3xx-no-old-samp.xm pChn->dwFlags |= CHN_FASTVOLRAMP; pChn->nVolume = pChn->nPeriod = 0; } } - } else - if ((param < pChn->nLength) && (m_nType & (MOD_TYPE_MTM|MOD_TYPE_DMF))) + } else if ((param < pChn->nLength) && (GetType() & (MOD_TYPE_MTM|MOD_TYPE_DMF))) { + // XXX what's this? pChn->nPos = param; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |