From: <sag...@us...> - 2010-07-29 13:43:15
|
Revision: 665 http://modplug.svn.sourceforge.net/modplug/?rev=665&view=rev Author: saga-games Date: 2010-07-29 13:43:09 +0000 (Thu, 29 Jul 2010) Log Message: ----------- [Fix] The panic button could lead to crashes with some plugins like Superwave P8 (tx Rakib) [Ref] Small changes here and there. [Mod] OpenMPT: Version is now 1.18.02.07 Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Sndmix.cpp Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-28 23:19:58 UTC (rev 664) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-29 13:43:09 UTC (rev 665) @@ -503,7 +503,7 @@ DefineKeyCommand(kcPrevDocument, 1693, kcVisible, kcNoDummy, _T("Previous Document")); DefineKeyCommand(kcNextDocument, 1694, kcVisible, kcNoDummy, _T("Next Document")); //time saving HACK: - for(size_t j = kcVSTGUIStartNotes; j <= kcVSTGUINoteStopA_3; j++) + for(size_t j = kcVSTGUIStartNotes; j <= kcVSTGUIEndNoteStops; j++) { DefineKeyCommand((CommandID)j, 1695 + j - kcVSTGUIStartNotes, kcHidden, kcNoDummy, _T("Auto Note in some context")); } Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-07-28 23:19:58 UTC (rev 664) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-07-29 13:43:09 UTC (rev 665) @@ -2709,8 +2709,10 @@ // Panic button. At the moment, it just resets all VSTi and sample notes. if(m_pModPlaying && m_pModPlaying->GetSoundFile()) { + BEGIN_CRITICAL(); + m_pModPlaying->GetSoundFile()->ResetChannels(); m_pModPlaying->GetSoundFile()->StopAllVsti(); - m_pModPlaying->GetSoundFile()->ResetChannels(); + END_CRITICAL(); } } Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2010-07-28 23:19:58 UTC (rev 664) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-07-29 13:43:09 UTC (rev 665) @@ -335,7 +335,7 @@ if(m_SndFile.m_nRestartPos > 0 && !CSoundFile::GetModSpecifications(nNewType).hasRestartPos) { m_SndFile.m_nRestartPos = 0; - AddToLog("WARNING: Restart position is not support by the new format.\n"); + AddToLog("WARNING: Restart position is not supported by the new format.\n"); } Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2010-07-28 23:19:58 UTC (rev 664) +++ trunk/OpenMPT/mptrack/version.h 2010-07-29 13:43:09 UTC (rev 665) @@ -15,7 +15,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 18 #define VER_MINOR 02 -#define VER_MINORMINOR 06 +#define VER_MINORMINOR 07 //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/Sndmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-07-28 23:19:58 UTC (rev 664) +++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-07-29 13:43:09 UTC (rev 665) @@ -883,14 +883,15 @@ // Master Volume + Pre-Amplification / Attenuation setup DWORD nMasterVol; { - int nchn32 = 0; + /*int nchn32 = 0; MODCHANNEL *pChn = Chn; for (UINT nChn=0; nChn<m_nChannels; nChn++,pChn++) { //if(!(pChn->dwFlags & CHN_MUTE)) //removed by rewbs: fix http://www.modplug.com/forum/viewtopic.php?t=3358 nchn32++; } - nchn32 = CLAMP(nchn32, 1, 31); + nchn32 = CLAMP(nchn32, 1, 31);*/ + int nchn32 = CLAMP(m_nChannels, 1, 31); DWORD mastervol; @@ -970,8 +971,7 @@ else { pChn->nPan += pChn->nPanSwing; - if(pChn->nPan > 256) pChn->nPan = 256; - if(pChn->nPan < 0) pChn->nPan = 0; + pChn->nPan = CLAMP(pChn->nPan, 0, 256); pChn->nPanSwing = 0; pChn->nRealPan = pChn->nPan; } @@ -1009,7 +1009,7 @@ if (pChn->dwFlags & CHN_TREMOLO) { UINT trempos = pChn->nTremoloPos; - // IT compatibility: Why would want to not execute tremolo at volume 0? + // IT compatibility: Why would you not want to execute tremolo at volume 0? if (vol > 0 || IsCompatibleMode(TRK_IMPULSETRACKER)) { // IT compatibility: We don't need a different attenuation here because of the different tables we're going to use @@ -1103,18 +1103,18 @@ // and release envelope beginning. if (pIns->VolEnv.nReleaseNode != ENV_RELEASE_NODE_UNSET && pChn->nVolEnvPosition>=pIns->VolEnv.Ticks[pIns->VolEnv.nReleaseNode] - && pChn->nVolEnvValueAtReleaseJump != NOT_YET_RELEASED) { + && pChn->nVolEnvValueAtReleaseJump != NOT_YET_RELEASED) + { int envValueAtReleaseJump = pChn->nVolEnvValueAtReleaseJump; int envValueAtReleaseNode = pIns->VolEnv.Values[pIns->VolEnv.nReleaseNode] << 2; //If we have just hit the release node, force the current env value //to be that of the release node. This works around the case where // we have another node at the same position as the release node. - if (pChn->nVolEnvPosition==pIns->VolEnv.Ticks[pIns->VolEnv.nReleaseNode]) { - envvol=envValueAtReleaseNode; - } + if (pChn->nVolEnvPosition == pIns->VolEnv.Ticks[pIns->VolEnv.nReleaseNode]) + envvol = envValueAtReleaseNode; - int relativeVolumeChange = (envvol-envValueAtReleaseNode)*2; + int relativeVolumeChange = (envvol - envValueAtReleaseNode) * 2; envvol = envValueAtReleaseJump + relativeVolumeChange; } vol = (vol * CLAMP(envvol, 0, 512)) >> 8; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |