From: <sag...@us...> - 2015-04-18 21:50:37
|
Revision: 4946 http://sourceforge.net/p/modplug/code/4946 Author: saga-games Date: 2015-04-18 21:50:31 +0000 (Sat, 18 Apr 2015) Log Message: ----------- [Fix] Sample seeking: Portamento was not accurately in some cases. Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-04-18 20:35:20 UTC (rev 4945) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-04-18 21:50:31 UTC (rev 4946) @@ -764,6 +764,11 @@ if(m.instr) pChn->proTrackerOffset = 0; if(m.IsNote()) { + if(porta && memory.chnSettings[nChn].incChanged) + { + // If there's a portamento, the current channel increment needs to be known in NoteChange() + pChn->nInc = GetChannelIncrement(pChn, pChn->nPeriod, 0); + } int32 setPan = pChn->nPan; pChn->nNewNote = pChn->nLastNote; if(pChn->nNewIns != 0) InstrumentChange(pChn, pChn->nNewIns, porta); @@ -888,7 +893,7 @@ if(porta) { - // Portamento needs immediate syncing + // Portamento needs immediate syncing, as the pitch changes on each tick uint32 portaTick = memory.chnSettings[nChn].ticksToRender + startTick + 1; memory.chnSettings[nChn].ticksToRender += numTicks; memory.RenderChannel(nChn, tickDuration, portaTick); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |