From: <rel...@us...> - 2009-01-12 20:03:35
|
Revision: 245 http://modplug.svn.sourceforge.net/modplug/?rev=245&view=rev Author: relabsoluness Date: 2009-01-12 20:03:26 +0000 (Mon, 12 Jan 2009) Log Message: ----------- ? Added NO_VST option to make build possible without VST SDK (and VST support); see Stdafx.h. Modified Paths: -------------- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/AbstractVstEditor.h trunk/OpenMPT/mptrack/DefaultVstEditor.cpp trunk/OpenMPT/mptrack/DefaultVstEditor.h trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Stdafx.h trunk/OpenMPT/mptrack/VSTEditor.cpp trunk/OpenMPT/mptrack/VSTEditor.h trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2009-01-12 20:03:26 UTC (rev 245) @@ -10,6 +10,7 @@ #include "dlg_misc.h" #include "AbstractVstEditor.h" +#ifndef NO_VST static void CreateVerifiedProgramName(const char* rawname, const size_t rnSize, char* name, const size_t nSize, @@ -701,4 +702,7 @@ int CAbstractVstEditor::GetLearnMacro() { return m_nLearnMacro; -} \ No newline at end of file +} + +#endif // NO_VST + Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.h =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.h 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.h 2009-01-12 20:03:26 UTC (rev 245) @@ -1,6 +1,8 @@ //rewbs.defaultPlugGUI #pragma once +#ifndef NO_VST + class CAbstractVstEditor: public CDialog { @@ -70,4 +72,8 @@ afx_msg void OnInitMenu(CMenu* pMenu); void PrepareToLearnMacro(UINT nID); }; -//end rewbs.defaultPlugGUI \ No newline at end of file +//end rewbs.defaultPlugGUI + +#endif // NO_VST + + Modified: trunk/OpenMPT/mptrack/DefaultVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2009-01-12 20:03:26 UTC (rev 245) @@ -4,6 +4,8 @@ #include "defaultvsteditor.h" #include ".\defaultvsteditor.h" +#ifndef NO_VST + CDefaultVstEditor::CDefaultVstEditor(CVstPlugin *pPlugin) : CAbstractVstEditor(pPlugin) //------------------------------------------------------------------------------------- { @@ -186,3 +188,5 @@ } +#endif // NO_VST + Modified: trunk/OpenMPT/mptrack/DefaultVstEditor.h =================================================================== --- trunk/OpenMPT/mptrack/DefaultVstEditor.h 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/DefaultVstEditor.h 2009-01-12 20:03:26 UTC (rev 245) @@ -8,6 +8,8 @@ PARAM_RESOLUTION=1000, }; +#ifndef NO_VST + class CDefaultVstEditor : public CAbstractVstEditor { @@ -45,3 +47,6 @@ void UpdateParamDisplays(); }; + +#endif // NO_VST + Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2009-01-12 20:03:26 UTC (rev 245) @@ -625,10 +625,16 @@ //Adding version number to the frame title CString title = GetTitle(); + title += CString(" ") + MptVersion::str; #ifdef DEBUG title += CString(" DEBUG"); #endif - title += CString(" ") + MptVersion::str; + #ifdef NO_VST + title += " NO_VST"; + #endif + #ifdef NO_ASIO + title += " NO_ASIO"; + #endif SetTitle(title); OnUpdateFrameTitle(false); @@ -2322,6 +2328,7 @@ void CMainFrame::OnPluginManager() //-------------------------------- { +#ifndef NO_VST int nPlugslot=-1; CModDoc* pModDoc = GetActiveDoc(); @@ -2345,6 +2352,7 @@ CChildFrame *pActiveChild = (CChildFrame *)MDIGetActive(); pActiveChild->ForceRefresh(); } +#endif // NO_VST } // -! NEW_FEATURE#0002 @@ -2951,6 +2959,7 @@ void AddPluginNamesToCombobox(CComboBox& CBox, SNDMIXPLUGIN* plugarray, const bool librarynames) //--------------------------------------------------------------------- { +#ifndef NO_VST for (UINT iPlug=0; iPlug<MAX_MIXPLUGINS; iPlug++) { PSNDMIXPLUGIN p = &plugarray[iPlug]; @@ -2963,6 +2972,7 @@ CBox.AddString(str); } +#endif // NO_VST } void AddPluginParameternamesToCombobox(CComboBox& CBox, SNDMIXPLUGIN& plug) Modified: trunk/OpenMPT/mptrack/Stdafx.h =================================================================== --- trunk/OpenMPT/mptrack/Stdafx.h 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/Stdafx.h 2009-01-12 20:03:26 UTC (rev 245) @@ -72,6 +72,13 @@ #define WAVE_FORMAT_EXTENSIBLE 0xFFFE #endif // !defined(WAVE_FORMAT_EXTENSIBLE) +// Define to build without ASIO support; makes build possible without ASIO SDK. +//#define NO_ASIO + +// (HACK) Define to build without VST support; makes build possible without VST SDK. +//#define NO_VST + + void Log(LPCSTR format,...); #include "typedefs.h" Modified: trunk/OpenMPT/mptrack/VSTEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/VSTEditor.cpp 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/VSTEditor.cpp 2009-01-12 20:03:26 UTC (rev 245) @@ -8,6 +8,7 @@ // +#ifndef NO_VST COwnerVstEditor::COwnerVstEditor(CVstPlugin *pPlugin) : CAbstractVstEditor(pPlugin) //----------------------------------------- @@ -129,3 +130,5 @@ m_pVstPlugin->Dispatch(effEditClose, 0, 0, NULL, 0); } } +#endif // NO_VST + Modified: trunk/OpenMPT/mptrack/VSTEditor.h =================================================================== --- trunk/OpenMPT/mptrack/VSTEditor.h 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/VSTEditor.h 2009-01-12 20:03:26 UTC (rev 245) @@ -4,6 +4,8 @@ #include "VstPlug.h" #include "AbstractVstEditor.h" +#ifndef NO_VST + //============================== class COwnerVstEditor: public CAbstractVstEditor //============================== @@ -28,4 +30,7 @@ afx_msg void OnClose(); BOOL OpenEditor(CWnd *parent); VOID DoClose(); -}; \ No newline at end of file +}; + +#endif // NO_VST + Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2009-01-12 20:03:26 UTC (rev 245) @@ -914,6 +914,7 @@ void CViewGlobals::OnSelectPlugin() //--------------------------------- { +#ifndef NO_VST CModDoc *pModDoc = GetDocument(); if ((pModDoc) && (m_nCurrentPlugin < MAX_MIXPLUGINS)) @@ -934,6 +935,7 @@ //OnWetDryChanged(); // -! NEW_FEATURE#0014 } +#endif // NO_VST } Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2009-01-12 20:03:26 UTC (rev 245) @@ -14,6 +14,7 @@ #include "defaultvsteditor.h" //rewbs.defaultPlugGUI #include "midi.h" +#ifndef NO_VST //#define VST_LOG //#define ENABLE_BUZZ @@ -4112,6 +4113,8 @@ else return 0; } +#endif // NO_VST + CString SNDMIXPLUGIN::GetParamName(const UINT index) const //-------------------------------------------------------- { Modified: trunk/OpenMPT/mptrack/Vstplug.h =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/mptrack/Vstplug.h 2009-01-12 20:03:26 UTC (rev 245) @@ -1,7 +1,9 @@ #ifndef _VST_PLUGIN_MANAGER_H_ #define _VST_PLUGIN_MANAGER_H_ -#include <aeffectx.h> // VST +#ifndef NO_VST + #include <aeffectx.h> // VST +#endif #define kBuzzMagic 'Buzz' #define kDmoMagic 'DXMO' @@ -21,10 +23,11 @@ }; +#ifndef NO_VST + typedef AEffect * (VSTCALLBACK * PVSTPLUGENTRY)(audioMasterCallback); +#endif -typedef AEffect * (VSTCALLBACK * PVSTPLUGENTRY)(audioMasterCallback); - typedef struct _VSTPLUGINLIB { struct _VSTPLUGINLIB *pPrev, *pNext; @@ -53,7 +56,7 @@ friend class CAbstractVstEditor; //rewbs.defaultPlugGUI friend class COwnerVstEditor; //rewbs.defaultPlugGUI friend class CVstPluginManager; - +#ifndef NO_VST protected: enum {VSTEVENT_QUEUE_LEN=256}; @@ -191,6 +194,29 @@ private: short getMIDI14bitValueFromShort(short value); void MidiPitchBend(UINT nMidiCh, short pitchBendPos); +#else // case: NO_VST +public: + long GetNumParameters() {return 0;} + VOID GetParamName(UINT, LPSTR, UINT) {} + void ToggleEditor() {} + BOOL HasEditor() {return FALSE;} + UINT GetNumCommands() {return 0;} + VOID GetPluginType(LPSTR) {} + long GetNumPrograms() {return 0;} + long GetProgramNameIndexed(long, long, char*) {return 0;} + VOID SetParameter(UINT, FLOAT) {} + VOID GetParamLabel(UINT, LPSTR) {} + VOID GetParamDisplay(UINT, LPSTR) {} + FLOAT GetParameter(UINT) {return 0;} + bool LoadProgram(CString) {return false;} + bool SaveProgram(CString) {return false;} + VOID SetCurrentProgram(UINT) {} + BOOL ExecuteCommand(UINT) {return FALSE;} + void SetSlot(UINT) {} + void UpdateMixStructPtr(void*) {} + bool Bypass() {return false;} + +#endif // NO_VST }; @@ -198,6 +224,7 @@ class CVstPluginManager //===================== { +#ifndef NO_VST protected: PVSTPLUGINLIB m_pVstHead; @@ -222,6 +249,12 @@ static long VSTCALLBACK MasterCallBack(AEffect *effect, long opcode, long index, long value, void *ptr, float opt); static BOOL __cdecl CreateMixPluginProc(PSNDMIXPLUGIN, CSoundFile*); VstTimeInfo timeInfo; //rewbs.VSTcompliance +#else // NO_VST +public: + PVSTPLUGINLIB AddPlugin(LPCSTR, BOOL =TRUE, const bool = false, CString* const = 0) {return 0;} + PVSTPLUGINLIB GetFirstPlugin() const { return 0; } + VOID OnIdle() {} +#endif // NO_VST }; Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-01-10 11:10:49 UTC (rev 244) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-01-12 20:03:26 UTC (rev 245) @@ -13,7 +13,6 @@ #include "../mptrack/moddoc.h" #include "../mptrack/version.h" #include "sndfile.h" -#include "aeffectx.h" #include "wavConverter.h" #include "tuningcollection.h" #include <vector> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |