From: <man...@us...> - 2013-04-02 19:04:53
|
Revision: 1708 http://sourceforge.net/p/modplug/code/1708 Author: manxorist Date: 2013-04-02 19:04:41 +0000 (Tue, 02 Apr 2013) Log Message: ----------- [Ref] Make NO_REVERB actually remove all reverb related code. Modified Paths: -------------- trunk/OpenMPT/common/stdafx.h trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/soundlib/Snd_rvb.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/snd_rvb.h Modified: trunk/OpenMPT/common/stdafx.h =================================================================== --- trunk/OpenMPT/common/stdafx.h 2013-04-02 18:45:11 UTC (rev 1707) +++ trunk/OpenMPT/common/stdafx.h 2013-04-02 19:04:41 UTC (rev 1708) @@ -70,6 +70,9 @@ #endif // ENABLE_ASM +// Disable the built-in reverb effect +//#define NO_REVERB + // Disable built-in miscellaneous DSP effects (surround, mega bass, noise reduction) //#define NO_DSP Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-04-02 18:45:11 UTC (rev 1707) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-04-02 19:04:41 UTC (rev 1708) @@ -534,6 +534,8 @@ m_SbXBassDepth.ShowWindow(SW_HIDE); m_SbXBassRange.ShowWindow(SW_HIDE); #endif + +#ifndef NO_REVERB // Reverb m_SbReverbDepth.SetRange(1, 16); m_SbReverbDepth.SetPos(CSoundFile::m_nReverbDepth); @@ -558,6 +560,12 @@ { if (dwQuality & QUALITY_REVERB) CheckDlgButton(IDC_CHECK6, MF_CHECKED); } +#else + GetDlgItem(IDC_CHECK6)->ShowWindow(SW_HIDE); + m_SbReverbDepth.ShowWindow(SW_HIDE); + m_CbnReverbPreset.ShowWindow(SW_HIDE); +#endif + #ifndef NO_DSP // Surround { @@ -600,13 +608,15 @@ //----------------------------------------------------------------- { if (nSBCode == SB_ENDSCROLL) return; - UINT n = m_SbReverbDepth.GetPos(); if ((psb) && (psb->m_hWnd == m_SbReverbDepth.m_hWnd)) { +#ifndef NO_REVERB + UINT n = m_SbReverbDepth.GetPos(); if (n != CSoundFile::m_nReverbDepth) { if ((n) && (n <= 16)) CSoundFile::m_nReverbDepth = n; } +#endif } else { OnSettingsChanged(); @@ -709,12 +719,14 @@ CSoundFile::m_DSP.m_Settings.m_nXBassRange = nXBassRange; } #endif +#ifndef NO_REVERB // Reverb { // Reverb depth is dynamically changed UINT nReverbType = m_CbnReverbPreset.GetItemData(m_CbnReverbPreset.GetCurSel()); if (nReverbType < NUM_REVERBTYPES) CSoundFile::gnReverbType = nReverbType; } +#endif #ifndef NO_DSP // Surround { Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-04-02 18:45:11 UTC (rev 1707) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-04-02 19:04:41 UTC (rev 1708) @@ -422,8 +422,10 @@ CSoundFile::m_DSP.m_Settings.m_nXBassDepth = CMainFrame::GetPrivateProfileLong("Effects", "XBassDepth", CSoundFile::m_DSP.m_Settings.m_nXBassDepth, iniFile); CSoundFile::m_DSP.m_Settings.m_nXBassRange = CMainFrame::GetPrivateProfileLong("Effects", "XBassRange", CSoundFile::m_DSP.m_Settings.m_nXBassRange, iniFile); #endif +#ifndef NO_REVERB CSoundFile::m_nReverbDepth = CMainFrame::GetPrivateProfileLong("Effects", "ReverbDepth", CSoundFile::m_nReverbDepth, iniFile); CSoundFile::gnReverbType = CMainFrame::GetPrivateProfileLong("Effects", "ReverbType", CSoundFile::gnReverbType, iniFile); +#endif #ifndef NO_DSP CSoundFile::m_DSP.m_Settings.m_nProLogicDepth = CMainFrame::GetPrivateProfileLong("Effects", "ProLogicDepth", CSoundFile::m_DSP.m_Settings.m_nProLogicDepth, iniFile); CSoundFile::m_DSP.m_Settings.m_nProLogicDelay = CMainFrame::GetPrivateProfileLong("Effects", "ProLogicDelay", CSoundFile::m_DSP.m_Settings.m_nProLogicDelay, iniFile); @@ -573,8 +575,10 @@ RegQueryValueEx(key, "XBassDepth", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::m_DSP.m_Settings.m_nXBassDepth, &dwDWORDSize); RegQueryValueEx(key, "XBassRange", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::m_DSP.m_Settings.m_nXBassRange, &dwDWORDSize); #endif +#ifndef NO_REVERB RegQueryValueEx(key, "ReverbDepth", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::m_nReverbDepth, &dwDWORDSize); RegQueryValueEx(key, "ReverbType", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::gnReverbType, &dwDWORDSize); +#endif NO_REVERB #ifndef NO_DSP RegQueryValueEx(key, "ProLogicDepth", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::m_DSP.m_Settings.m_nProLogicDepth, &dwDWORDSize); RegQueryValueEx(key, "ProLogicDelay", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::m_DSP.m_Settings.m_nProLogicDelay, &dwDWORDSize); @@ -796,8 +800,10 @@ CMainFrame::WritePrivateProfileLong("Effects", "XBassDepth", CSoundFile::m_DSP.m_Settings.m_nXBassDepth, iniFile); CMainFrame::WritePrivateProfileLong("Effects", "XBassRange", CSoundFile::m_DSP.m_Settings.m_nXBassRange, iniFile); #endif +#ifndef NO_REVERB CMainFrame::WritePrivateProfileLong("Effects", "ReverbDepth", CSoundFile::m_nReverbDepth, iniFile); CMainFrame::WritePrivateProfileLong("Effects", "ReverbType", CSoundFile::gnReverbType, iniFile); +#endif #ifndef NO_DSP CMainFrame::WritePrivateProfileLong("Effects", "ProLogicDepth", CSoundFile::m_DSP.m_Settings.m_nProLogicDepth, iniFile); CMainFrame::WritePrivateProfileLong("Effects", "ProLogicDelay", CSoundFile::m_DSP.m_Settings.m_nProLogicDelay, iniFile); Modified: trunk/OpenMPT/soundlib/Snd_rvb.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_rvb.cpp 2013-04-02 18:45:11 UTC (rev 1707) +++ trunk/OpenMPT/soundlib/Snd_rvb.cpp 2013-04-02 19:04:41 UTC (rev 1708) @@ -13,6 +13,8 @@ #include "sndfile.h" #include "snd_rvb.h" +#ifndef NO_REVERB + #pragma warning(disable:4725) // Pentium fdiv bug #pragma warning(disable:4731) // ebp modified @@ -1054,3 +1056,5 @@ } return fresult; } + +#endif // NO_REVERB Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2013-04-02 18:45:11 UTC (rev 1707) +++ trunk/OpenMPT/soundlib/Sndfile.h 2013-04-02 19:04:41 UTC (rev 1708) @@ -244,7 +244,9 @@ #ifndef NO_AGC static CAGC m_AGC; #endif +#ifndef NO_REVERB static UINT m_nReverbDepth, gnReverbType; +#endif static UINT m_nStereoSeparation; static UINT m_nMaxMixChannels; static DWORD gdwSysInfo, gdwSoundSetup, gdwMixingFreq, gnBitsPerSample, gnChannels; Modified: trunk/OpenMPT/soundlib/snd_rvb.h =================================================================== --- trunk/OpenMPT/soundlib/snd_rvb.h 2013-04-02 18:45:11 UTC (rev 1707) +++ trunk/OpenMPT/soundlib/snd_rvb.h 2013-04-02 19:04:41 UTC (rev 1708) @@ -10,6 +10,8 @@ #pragma once +#ifndef NO_REVERB + ///////////////////////////////////////////////////////////////////////////// // // SW Reverb structures @@ -197,3 +199,4 @@ #define SNDMIX_REVERB_PRESET_PLATE \ -1000, -200, 1.30f,0.90f, 0,0.002f, 0,0.010f,100.0f, 75.0f +#endif // NO_REVERB This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |