From: <sag...@us...> - 2012-03-08 00:13:17
|
Revision: 1210 http://modplug.svn.sourceforge.net/modplug/?rev=1210&view=rev Author: saga-games Date: 2012-03-08 00:13:11 +0000 (Thu, 08 Mar 2012) Log Message: ----------- [Fix] VST: MIDI Portamentos on muted channels should now *really* be ignored in all cases (revision 1181 only partly fixed the issue). [Mod] OpenMPT: Version is now 1.20.00.76 Revision Links: -------------- http://modplug.svn.sourceforge.net/modplug/?rev=1181&view=rev Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-03-07 23:51:23 UTC (rev 1209) +++ trunk/OpenMPT/mptrack/version.h 2012-03-08 00:13:11 UTC (rev 1210) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 00 -#define VER_MINORMINOR 75 +#define VER_MINORMINOR 76 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-03-07 23:51:23 UTC (rev 1209) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-03-08 00:13:11 UTC (rev 1210) @@ -563,11 +563,12 @@ ////////////////////////////////////////////////////////////////////////////////////////////////// // Effects +// Change sample or instrument number. void CSoundFile::InstrumentChange(ModChannel *pChn, UINT instr, bool bPorta, bool bUpdVol, bool bResetEnv) //-------------------------------------------------------------------------------------------------------- { if (instr >= MAX_INSTRUMENTS) return; - ModInstrument *pIns = Instruments[instr]; + ModInstrument *pIns = (instr < MAX_INSTRUMENTS) ? Instruments[instr] : nullptr; ModSample *pSmp = &Samples[instr]; UINT note = pChn->nNewNote; @@ -615,8 +616,8 @@ } const bool bNewTuning = (GetType() == MOD_TYPE_MPT && pIns && pIns->pTuning); - //Playback behavior change for MPT: With portamento don't change sample if it is in - //the same instrument as previous sample. + // Playback behavior change for MPT: With portamento don't change sample if it is in + // the same instrument as previous sample. if(bPorta && bNewTuning && pIns == pChn->pModInstrument) return; @@ -738,7 +739,7 @@ } // Tone-Portamento doesn't reset the pingpong direction flag - if ((bPorta) && (pSmp == pChn->pModSample)) + if (bPorta && pSmp == pChn->pModSample) { // If channel length is 0, we cut a previous sample using SCx. In that case, we have to update sample length, loop points, etc... if(GetType() & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT) && pChn->nLength != 0) return; @@ -748,8 +749,8 @@ { pChn->dwFlags &= ~(CHN_KEYOFF|CHN_NOTEFADE); - //IT compatibility tentative fix: Don't change bidi loop direction when - //no sample nor instrument is changed. + // IT compatibility tentative fix: Don't change bidi loop direction when + // no sample nor instrument is changed. if(IsCompatibleMode(TRK_ALLTRACKERS) && pSmp == pChn->pModSample && !instrumentChanged) pChn->dwFlags = (pChn->dwFlags & (CHN_CHANNELFLAGS | CHN_PINGPONGFLAG)) | (pSmp->uFlags & CHN_SAMPLEFLAGS); else @@ -1002,8 +1003,10 @@ } if (pChn->nPos >= pChn->nLength) pChn->nPos = pChn->nLoopStart; } - else + else + { bPorta = false; + } if ((!bPorta) || (!(GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT))) || ((pChn->dwFlags & CHN_NOTEFADE) && (!pChn->nFadeOutVol)) @@ -2483,7 +2486,7 @@ void CSoundFile::MidiPortamento(CHANNELINDEX nChn, int param) //----------------------------------------------------------- { - if((Chn[nChn].dwFlags & CHN_MUTE) != 0) + if((Chn[nChn].dwFlags & (CHN_MUTE | CHN_SYNCMUTE)) != 0) { // Don't process portamento on muted channels. Note that this might have a side-effect // on other channels which trigger notes on the same MIDI channel of the same plugin, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |