From: <rel...@us...> - 2008-03-25 20:15:44
|
Revision: 207 http://modplug.svn.sourceforge.net/modplug/?rev=207&view=rev Author: relabsoluness Date: 2008-03-25 13:15:39 -0700 (Tue, 25 Mar 2008) Log Message: ----------- . Fix to continuous scroll fixbug (bug introduced in rev. 202) . Fix to possible memory corruption problem on handling VST with more than 30 outputs. (Thanks to Markus for pointing this out) - VST with more than 32 outputs might still be handled poorly. ? Minor tweaks in project files. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/mptrack/mptrack.vcproj trunk/OpenMPT/unlha/unlha.vcproj trunk/OpenMPT/unrar/UNRAR.vcproj trunk/OpenMPT/unzip/unzip.vcproj trunk/OpenMPT/xsoundlib/xsoundlib.vcproj Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2008-03-19 20:38:12 UTC (rev 206) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2008-03-25 20:15:39 UTC (rev 207) @@ -273,7 +273,7 @@ if ((int)row < (int)0) row += pSndFile->PatternSize[m_nPattern]; row %= pSndFile->PatternSize[m_nPattern]; } - } else + } else //row >= 0 if (row >= pSndFile->PatternSize[m_nPattern]) { if (m_dwStatus & (PATSTATUS_KEYDRAGSEL|PATSTATUS_MOUSEDRAGSEL)) @@ -289,9 +289,10 @@ const PATTERNINDEX nextPat = pSndFile->Order[nextOrder]; if ((nextPat < pSndFile->Patterns.Size()) && (pSndFile->PatternSize[nextPat])) { + const ROWINDEX newRow = row - pSndFile->PatternSize[m_nPattern]; SendCtrlMessage(CTRLMSG_SETCURRENTORDER, nextOrder); if (SetCurrentPattern(nextPat)) - return SetCurrentRow(row - pSndFile->PatternSize[m_nPattern]); + return SetCurrentRow(newRow); } } row = pSndFile->PatternSize[m_nPattern]-1; Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2008-03-19 20:38:12 UTC (rev 206) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2008-03-25 20:15:39 UTC (rev 207) @@ -1579,6 +1579,16 @@ m_nInputs = m_pEffect->numInputs; m_nOutputs = m_pEffect->numOutputs; + + //32 is the maximum output count due to the size of m_FloatBuffer. + //TODO: How to handle properly plugs with numOutputs > 32? + if(m_nOutputs > 32) + { + m_nOutputs = 32; + CString str; + str.Format("Plugin has unsupported number(=%d) of outputs; plugin may malfunction.", m_pEffect->numOutputs); + MessageBox(NULL, str, "Warning", MB_ICONWARNING); + } //input pointer array size must be >=2 for now - the input buffer assignment might write to non allocated mem. otherwise m_pInputs = (m_nInputs >= 2) ? new (float *[m_nInputs]) : new (float*[2]); @@ -1590,7 +1600,7 @@ for (UINT iOut=0; iOut<m_nOutputs; iOut++) { - m_pTempBuffer[iOut]=(float *)((((DWORD)&m_FloatBuffer[MIXBUFFERSIZE*(2+iOut)])+7)&~7); //rewbs.dryRatio + m_pTempBuffer[iOut]=(float *)((((DWORD_PTR)&m_FloatBuffer[MIXBUFFERSIZE*(2+iOut)])+7)&~7); //rewbs.dryRatio } #ifdef VST_LOG Modified: trunk/OpenMPT/mptrack/Vstplug.h =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h 2008-03-19 20:38:12 UTC (rev 206) +++ trunk/OpenMPT/mptrack/Vstplug.h 2008-03-25 20:15:39 UTC (rev 207) @@ -75,7 +75,7 @@ float **m_pOutputs; int m_nEditorX, m_nEditorY; int m_MixBuffer[MIXBUFFERSIZE*2+2]; // Stereo interleaved - float m_FloatBuffer[MIXBUFFERSIZE*32+31]; // 2ch separated + up to 32 VSTi outputs... + float m_FloatBuffer[MIXBUFFERSIZE*(2+32)+31]; // 2ch separated + up to 32 VSTi outputs... VstMidiEvent m_ev_queue[VSTEVENT_QUEUE_LEN]; CModDoc* m_pModDoc; //rewbs.plugDocAware CSoundFile* m_pSndFile; //rewbs.plugDocAware Modified: trunk/OpenMPT/mptrack/mptrack.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack.vcproj 2008-03-19 20:38:12 UTC (rev 206) +++ trunk/OpenMPT/mptrack/mptrack.vcproj 2008-03-25 20:15:39 UTC (rev 207) @@ -27,8 +27,11 @@ AdditionalIncludeDirectories="..\unlha,..\unzip,..\unrar,..\soundlib,..\include,..\xsoundlib" PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,ENABLE_EQ,MODPLUG_TRACKER,NO_PACKING,HAVE_DOT_NET,ENABLE_AMD,ENABLE_SSE,ENABLE_AMDNOW,ENABLE_MMX" StringPooling="TRUE" + BasicRuntimeChecks="3" RuntimeLibrary="1" + BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="TRUE" + ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="3" PrecompiledHeaderThrough="stdafx.h" PrecompiledHeaderFile=".\Debug/mptrack.pch" @@ -37,7 +40,7 @@ ProgramDataBaseFileName=".\Debug/" BrowseInformation="1" WarningLevel="4" - SuppressStartupBanner="TRUE" + SuppressStartupBanner="FALSE" DebugInformationFormat="4" CompileAs="0"/> <Tool @@ -92,11 +95,12 @@ IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" UseOfMFC="1" - ATLMinimizesCRunTimeLibraryUsage="FALSE"> + ATLMinimizesCRunTimeLibraryUsage="FALSE" + WholeProgramOptimization="TRUE"> <Tool Name="VCCLCompilerTool" - AdditionalOptions="/EHsc" - Optimization="3" + AdditionalOptions="/EHsc /O2" + Optimization="2" GlobalOptimizations="TRUE" InlineFunctionExpansion="2" OptimizeForWindowsApplication="TRUE" @@ -104,7 +108,7 @@ PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,ENABLE_MMX,ENABLE_EQ,MODPLUG_TRACKER,NO_PACKING,HAVE_DOT_NET,ENABLE_AMD,ENABLE_SSE,ENABLE_AMDNOW" StringPooling="TRUE" RuntimeLibrary="0" - BufferSecurityCheck="FALSE" + BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="FALSE" UsePrecompiledHeader="3" PrecompiledHeaderThrough="stdafx.h" @@ -113,7 +117,7 @@ ObjectFile=".\Generic/" ProgramDataBaseFileName=".\Generic/" WarningLevel="3" - SuppressStartupBanner="TRUE" + SuppressStartupBanner="FALSE" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> @@ -137,8 +141,7 @@ TargetEnvironment="1" TypeLibraryName=".\Bin/mptrack.tlb"/> <Tool - Name="VCPostBuildEventTool" - CommandLine="perl $(TargetDir)/getVersionFromCode.pl > $(TargetDir)/version"/> + Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool @@ -706,21 +709,6 @@ RelativePath="..\soundlib\Tables.cpp"> </File> <File - RelativePath="..\soundlib\tuning.cpp"> - </File> - <File - RelativePath="..\soundlib\tuningbase.cpp"> - </File> - <File - RelativePath="..\soundlib\tuningCollection.cpp"> - </File> - <File - RelativePath=".\TuningDialog.cpp"> - </File> - <File - RelativePath=".\tuningRatioMapWnd.cpp"> - </File> - <File RelativePath=".\view_com.cpp"> </File> <File @@ -848,6 +836,25 @@ RelativePath=".\view_graph.h"> </File> </Filter> + <Filter + Name="Tuning" + Filter=""> + <File + RelativePath="..\soundlib\tuning.cpp"> + </File> + <File + RelativePath="..\soundlib\tuningbase.cpp"> + </File> + <File + RelativePath="..\soundlib\tuningCollection.cpp"> + </File> + <File + RelativePath=".\TuningDialog.cpp"> + </File> + <File + RelativePath=".\tuningRatioMapWnd.cpp"> + </File> + </Filter> </Filter> <Filter Name="Resource Files" @@ -983,6 +990,9 @@ RelativePath=".\MainFrm.h"> </File> <File + RelativePath="..\soundlib\midi.h"> + </File> + <File RelativePath=".\MIDIMappingDialog.h"> </File> <File @@ -995,6 +1005,9 @@ RelativePath=".\mod2wave.h"> </File> <File + RelativePath="..\soundlib\mod_specifications.h"> + </File> + <File RelativePath="..\soundlib\modcommand.h"> </File> <File @@ -1022,6 +1035,9 @@ RelativePath=".\OpenGLEditor.h"> </File> <File + RelativePath=".\order.h"> + </File> + <File RelativePath=".\OrderToPatternTable.h"> </File> <File @@ -1034,6 +1050,9 @@ RelativePath=".\PatternGotoDialog.h"> </File> <File + RelativePath="..\soundlib\patternset.h"> + </File> + <File RelativePath=".\PerformanceCounter.h"> </File> <File @@ -1067,21 +1086,6 @@ RelativePath=".\StdAfx.h"> </File> <File - RelativePath="..\soundlib\tuning.h"> - </File> - <File - RelativePath="..\soundlib\tuningbase.h"> - </File> - <File - RelativePath="..\soundlib\tuningcollection.h"> - </File> - <File - RelativePath=".\TuningDialog.h"> - </File> - <File - RelativePath=".\tuningRatioMapWnd.h"> - </File> - <File RelativePath=".\typedefs.h"> </File> <File @@ -1109,8 +1113,30 @@ RelativePath=".\vstplug.h"> </File> <File + RelativePath="..\soundlib\wavConverter.h"> + </File> + <File RelativePath="..\soundlib\WindowedFIR.h"> </File> + <Filter + Name="tuning" + Filter=""> + <File + RelativePath="..\soundlib\tuning.h"> + </File> + <File + RelativePath="..\soundlib\tuningbase.h"> + </File> + <File + RelativePath="..\soundlib\tuningcollection.h"> + </File> + <File + RelativePath=".\TuningDialog.h"> + </File> + <File + RelativePath=".\tuningRatioMapWnd.h"> + </File> + </Filter> </Filter> <File RelativePath=".\mptrack.reg"> Modified: trunk/OpenMPT/unlha/unlha.vcproj =================================================================== --- trunk/OpenMPT/unlha/unlha.vcproj 2008-03-19 20:38:12 UTC (rev 206) +++ trunk/OpenMPT/unlha/unlha.vcproj 2008-03-25 20:15:39 UTC (rev 207) @@ -25,6 +25,7 @@ StringPooling="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="1" + BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="TRUE" PrecompiledHeaderFile=".\Debug/unlha.pch" AssemblerListingLocation=".\Debug/" @@ -70,18 +71,20 @@ CharacterSet="2"> <Tool Name="VCCLCompilerTool" + AdditionalOptions="/O1" Optimization="1" InlineFunctionExpansion="1" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="TRUE" RuntimeLibrary="0" + BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="TRUE" PrecompiledHeaderFile=".\Release/unlha.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" WarningLevel="3" - SuppressStartupBanner="TRUE"/> + SuppressStartupBanner="FALSE"/> <Tool Name="VCCustomBuildTool"/> <Tool Modified: trunk/OpenMPT/unrar/UNRAR.vcproj =================================================================== --- trunk/OpenMPT/unrar/UNRAR.vcproj 2008-03-19 20:38:12 UTC (rev 206) +++ trunk/OpenMPT/unrar/UNRAR.vcproj 2008-03-25 20:15:39 UTC (rev 207) @@ -23,6 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" StringPooling="TRUE" RuntimeLibrary="1" + BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="TRUE" PrecompiledHeaderFile=".\Debug/UNRAR.pch" AssemblerListingLocation=".\Debug/" @@ -66,18 +67,20 @@ ATLMinimizesCRunTimeLibraryUsage="FALSE"> <Tool Name="VCCLCompilerTool" + AdditionalOptions="/O1" Optimization="1" InlineFunctionExpansion="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" StringPooling="TRUE" RuntimeLibrary="0" + BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="TRUE" PrecompiledHeaderFile=".\Release/UNRAR.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" WarningLevel="3" - SuppressStartupBanner="TRUE"/> + SuppressStartupBanner="FALSE"/> <Tool Name="VCCustomBuildTool"/> <Tool Modified: trunk/OpenMPT/unzip/unzip.vcproj =================================================================== --- trunk/OpenMPT/unzip/unzip.vcproj 2008-03-19 20:38:12 UTC (rev 206) +++ trunk/OpenMPT/unzip/unzip.vcproj 2008-03-25 20:15:39 UTC (rev 207) @@ -23,6 +23,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" StringPooling="TRUE" RuntimeLibrary="1" + BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="TRUE" PrecompiledHeaderFile=".\Debug/unzip.pch" AssemblerListingLocation=".\Debug/" @@ -66,18 +67,20 @@ ATLMinimizesCRunTimeLibraryUsage="FALSE"> <Tool Name="VCCLCompilerTool" + AdditionalOptions="/O1" Optimization="1" InlineFunctionExpansion="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" StringPooling="TRUE" RuntimeLibrary="0" + BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="TRUE" PrecompiledHeaderFile=".\Release/unzip.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" WarningLevel="3" - SuppressStartupBanner="TRUE"/> + SuppressStartupBanner="FALSE"/> <Tool Name="VCCustomBuildTool"/> <Tool Modified: trunk/OpenMPT/xsoundlib/xsoundlib.vcproj =================================================================== --- trunk/OpenMPT/xsoundlib/xsoundlib.vcproj 2008-03-19 20:38:12 UTC (rev 206) +++ trunk/OpenMPT/xsoundlib/xsoundlib.vcproj 2008-03-25 20:15:39 UTC (rev 207) @@ -23,6 +23,7 @@ MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" + BufferSecurityCheck="TRUE" UsePrecompiledHeader="3" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" @@ -59,10 +60,13 @@ CharacterSet="2"> <Tool Name="VCCLCompilerTool" + AdditionalOptions="/O2" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" RuntimeLibrary="4" + BufferSecurityCheck="TRUE" UsePrecompiledHeader="3" WarningLevel="3" + SuppressStartupBanner="FALSE" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3"/> <Tool This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |