[PD-cvs] externals/grill/vst/src EditorWin.cpp,1.2,1.3 VstHost.cpp,1.7,1.8 VstHost.h,1.5,1.6 main.cpp,1.13,1.14

xovo at users.sourceforge.net xovo at users.sourceforge.net
Tue Feb 24 04:37:16 CET 2004


Update of /cvsroot/pure-data/externals/grill/vst/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2703/src

Modified Files:
	EditorWin.cpp VstHost.cpp VstHost.h main.cpp 
Log Message:
 ""

Index: EditorWin.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/vst/src/EditorWin.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EditorWin.cpp	27 Jan 2004 03:41:26 -0000	1.2
--- EditorWin.cpp	24 Feb 2004 03:37:12 -0000	1.3
***************
*** 12,15 ****
--- 12,17 ----
  #include <flext.h>
  
+ #include <map>
+ 
  #if FLEXT_OS == FLEXT_OS_WIN
  // only Windows code is situated in this file
***************
*** 17,26 ****
  #include <windows.h>
  
- #include <map>
- 
  typedef std::map<flext::thrid_t,VSTPlugin *> WndMap;
  static WndMap wndmap;
  static flext::ThrMutex mapmutex;
  
  #define WCLNAME "vst~-class"
  
--- 19,27 ----
  #include <windows.h>
  
  typedef std::map<flext::thrid_t,VSTPlugin *> WndMap;
  static WndMap wndmap;
  static flext::ThrMutex mapmutex;
  
+ #define TIMER_INTERVAL 25
  #define WCLNAME "vst~-class"
  
***************
*** 119,132 ****
      //	printf("Dispatched to the top\n");
  
! 	    SetTimer(wnd,0,25,NULL);
  
  	    ERect r;
          plug->GetEditorRect(r);
! //	    SetWindowPos(wnd,HWND_TOP,plug->getX(),plug->getY(),(r.right - r.left) + 6 , r.bottom - r.top + 26 , SWP_SHOWWINDOW);
! 	    SetWindowPos(wnd,HWND_TOP,r.left,r.top,(r.right - r.left) + 6 , r.bottom - r.top + 26 , SWP_SHOWWINDOW);
  
!     //	ShowWindow( SW_SHOW );		
!     //  BringWindowToTop(wnd);
!     //	SetFocus();
  
          // Message pump
--- 120,144 ----
      //	printf("Dispatched to the top\n");
  
! 	    SetTimer(wnd,0,TIMER_INTERVAL,NULL);
! 
! 		WINDOWINFO winfo;
! 		winfo.cbSize = sizeof(winfo);
! 		GetWindowInfo(wnd,&winfo);
! 		TITLEBARINFO tinfo;
! 		tinfo.cbSize = sizeof(tinfo);
! 		GetTitleBarInfo(wnd,&tinfo);
  
  	    ERect r;
          plug->GetEditorRect(r);
! 	    SetWindowPos(wnd,HWND_TOP,
! 			r.left,
! 			r.top,
! 			(r.right-r.left)+winfo.cxWindowBorders*2,
! 			(r.bottom-r.top)+(tinfo.rcTitleBar.bottom-tinfo.rcTitleBar.top)+winfo.cyWindowBorders*2, 
! 			SWP_SHOWWINDOW
! 		);
  
!     
! 	//	SetFocus();
  
          // Message pump

Index: VstHost.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/vst/src/VstHost.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** VstHost.cpp	27 Jan 2004 03:41:26 -0000	1.7
--- VstHost.cpp	24 Feb 2004 03:37:12 -0000	1.8
***************
*** 16,20 ****
  static VstTimeInfo _timeInfo;
  
! typedef AEffect *(*PVSTMAIN)(audioMasterCallback audioMaster);
  
  
--- 16,20 ----
  static VstTimeInfo _timeInfo;
  
! typedef AEffect *(VSTCALLBACK *PVSTMAIN)(audioMasterCallback audioMaster);
  
  
***************
*** 56,65 ****
  	//init plugin 
  	_pEffect->user = this;
!     FLEXT_ASSERT(Dispatch( effOpen ));
! //	Dispatch( effMainsChanged,  0, 1);
  
  	if (!Dispatch( effGetProductString, 0, 0, &_sProductName, 0.0f)) {
  		string str1(dllname);
! 		string str2 = str1.substr(str1.rfind('\\')+1);
  		int snip = str2.find('.');
          if( snip != string::npos )
--- 56,81 ----
  	//init plugin 
  	_pEffect->user = this;
! 
! 	long ret = Dispatch( effOpen );
!     FLEXT_ASSERT(!ret);
! 
! 	ret = Dispatch( effIdentify);
! 	FLEXT_ASSERT(ret == 'NvEf');
  
  	if (!Dispatch( effGetProductString, 0, 0, &_sProductName, 0.0f)) {
+ 		// no product name given by plugin -> extract it from the filename
+ 
  		string str1(dllname);
! 		string::size_type slpos = str1.rfind('\\');
! 		if(slpos == string::npos) {
! 			slpos = str1.rfind('/');
! 			if(slpos == string::npos)
! 				slpos = 0;
! 			else
! 				++slpos;
! 		}
! 		else
! 			++slpos;
! 		string str2 = str1.substr(slpos);
  		int snip = str2.find('.');
          if( snip != string::npos )
***************
*** 74,78 ****
  
  	_sDllName = dllname;
! 	
  	return VSTINSTANCE_NO_ERROR;
  }
--- 90,99 ----
  
  	_sDllName = dllname;
! 
! /*
! 	Dispatch( effMainsChanged,  0, 1);
! 	Dispatch( effSetSampleRate,  0, 0,NULL,44100.);
! 	Dispatch( effSetBlockSize,  0, 64);
! */
  	return VSTINSTANCE_NO_ERROR;
  }
***************
*** 325,332 ****
  {
      switch (opcode) {
!     case audioMasterVersion:
          return 2;
!     case audioMasterCurrentId:
!         return 'AASH';
      default:
  #ifdef FLEXT_DEBUG
--- 346,366 ----
  {
      switch (opcode) {
!     case audioMasterAutomate: // 0
! 		// index, value given
! 		//! \todo set effect parameter
!         return 0;
!     case audioMasterVersion: // 1
          return 2;
!     case audioMasterCurrentId: // 2
!         return 0;
! 	case audioMasterIdle: // 3
! //		effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f);
! 		return 0;
! 	case audioMasterPinConnected: // 4
! 		//! \todo set connection state correctly (if possible..)
! 		// index=pin, value=0..input, else..output
! 		return 0; // 0 means connected
! 	case audioMasterGetTime: // 7
! 		return 0; // not supported
      default:
  #ifdef FLEXT_DEBUG

Index: VstHost.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/vst/src/VstHost.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** VstHost.h	27 Jan 2004 03:41:26 -0000	1.5
--- VstHost.h	24 Feb 2004 03:37:12 -0000	1.6
***************
*** 117,121 ****
  	}
  
! 	static long Master(AEffect *effect, long opcode, long index, long value, void *ptr, float opt);
  
      void SetPos(int x,int y,bool upd = true);
--- 117,121 ----
  	}
  
! 	static long VSTCALLBACK Master(AEffect *effect, long opcode, long index, long value, void *ptr, float opt);
  
      void SetPos(int x,int y,bool upd = true);

Index: main.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/vst/src/main.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** main.cpp	27 Jan 2004 03:41:26 -0000	1.13
--- main.cpp	24 Feb 2004 03:37:12 -0000	1.14
***************
*** 21,25 ****
  
  
! #define VST_VERSION "0.1.0pre10"
  
  
--- 21,25 ----
  
  
! #define VST_VERSION "0.1.0pre11"
  
  





More information about the Pd-cvs mailing list