From: <sag...@us...> - 2015-06-09 22:05:18
|
Revision: 5287 http://sourceforge.net/p/modplug/code/5287 Author: saga-games Date: 2015-06-09 22:05:12 +0000 (Tue, 09 Jun 2015) Log Message: ----------- [Fix] r5285 fix was in the completely wrong place. [Mod] Custom Tuning: Behaviour change: If there's a portamento and the sample doesn't actually change, re-apply the sample settings such as default volume and panning like with normal samples. Revision Links: -------------- http://sourceforge.net/p/modplug/code/5285 Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-06-09 20:36:42 UTC (rev 5286) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-06-09 22:05:12 UTC (rev 5287) @@ -1065,18 +1065,18 @@ pSmp = nullptr; } - const bool newTuning = (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. - if(bPorta && newTuning && pIns == pChn->pModInstrument) - return; - bool returnAfterVolumeAdjust = false; // instrumentChanged is used for IT carry-on env option bool instrumentChanged = (pIns != pChn->pModInstrument); const bool sampleChanged = (pChn->pModSample != nullptr) && (pSmp != pChn->pModSample); + const bool newTuning = (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. + if(bPorta && newTuning && pIns == pChn->pModInstrument && sampleChanged) + return; + if(sampleChanged && bPorta) { // IT compatibility: No sample change (also within multi-sample instruments) during portamento when using Compatible Gxx. @@ -1164,7 +1164,7 @@ } // Reset envelopes - if(bResetEnv && !bPorta) + if(bResetEnv) { // Blurb by Storlek (from the SchismTracker code): // Conditions experimentally determined to cause envelope reset in Impulse Tracker: @@ -1471,7 +1471,7 @@ // Test case: PanReset.it if(IsCompatibleMode(TRK_IMPULSETRACKER)) ApplyInstrumentPanning(pChn, pIns, pSmp); - if(bResetEnv) + if(bResetEnv && !bPorta) { pChn->nVolSwing = pChn->nPanSwing = 0; pChn->nResSwing = pChn->nCutSwing = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |