[PD-cvs] externals/grill/vst/src EditorWin.cpp,1.4,1.5 VstHost.cpp,1.13,1.14 VstHost.h,1.9,1.10 main.cpp,1.18,1.19

Thomas Grill xovo at users.sourceforge.net
Sat Sep 11 06:09:19 CEST 2004


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

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

Index: main.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/vst/src/main.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** main.cpp	25 Aug 2004 02:42:06 -0000	1.18
--- main.cpp	11 Sep 2004 04:09:17 -0000	1.19
***************
*** 20,24 ****
  
  
! #define VST_VERSION "0.1.0pre15"
  
  
--- 20,24 ----
  
  
! #define VST_VERSION "0.1.0pre16"
  
  
***************
*** 53,58 ****
      V ms_wincaption(bool c) { if(plug) plug->SetCaption(c); }
      V mg_wincaption(bool &c) const { c = plug && plug->GetCaption(); }
!     V ms_wintitle(const t_symbol *t) { if(plug) plug->SetTitle(GetString(t)); }
!     V mg_wintitle(const t_symbol *&t) const { t = plug?MakeSymbol(plug->GetTitle()):sym__; }
  
      V mg_chnsin(I &c) const { c = plug?plug->GetNumInputs():0; }
--- 53,58 ----
      V ms_wincaption(bool c) { if(plug) plug->SetCaption(c); }
      V mg_wincaption(bool &c) const { c = plug && plug->GetCaption(); }
!     V ms_wintitle(const AtomList &t);
!     V mg_wintitle(AtomList &t) const { if(plug) { t(1); SetString(t[0],plug->GetTitle()); } }
  
      V mg_chnsin(I &c) const { c = plug?plug->GetNumInputs():0; }
***************
*** 149,153 ****
      FLEXT_CALLVAR_I(mg_winy,ms_winy)
      FLEXT_CALLVAR_B(mg_wincaption,ms_wincaption)
!     FLEXT_CALLVAR_S(mg_wintitle,ms_wintitle)
  
      FLEXT_CALLGET_I(mg_chnsin)
--- 149,153 ----
      FLEXT_CALLVAR_I(mg_winy,ms_winy)
      FLEXT_CALLVAR_B(mg_wincaption,ms_wincaption)
!     FLEXT_CALLVAR_V(mg_wintitle,ms_wintitle)
  
      FLEXT_CALLGET_I(mg_chnsin)
***************
*** 633,636 ****
--- 633,644 ----
  }
  
+ V vst::ms_wintitle(const AtomList &t) 
+ { 
+     if(plug) {
+         char txt[256];
+         t.Print(txt,sizeof txt);
+         plug->SetTitle(txt); 
+     }
+ }
  
   /**

Index: VstHost.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/vst/src/VstHost.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** VstHost.cpp	25 Aug 2004 02:42:06 -0000	1.13
--- VstHost.cpp	11 Sep 2004 04:09:17 -0000	1.14
***************
*** 67,72 ****
  
      *_sProductName = 0;
! 	Dispatch( effGetProductString, 0, 0, &_sProductName, 0.0f);
!     if(_sProductName) {
  		// no product name given by plugin -> extract it from the filename
  
--- 67,72 ----
  
      *_sProductName = 0;
! 	ret = Dispatch( effGetProductString, 0, 0, _sProductName, 0.0f);
!     if(!*_sProductName) {
  		// no product name given by plugin -> extract it from the filename
  
***************
*** 92,96 ****
  	
      if(*_sProductName) {
!         char tmp[256];
          sprintf(tmp,"vst~ - %s",_sProductName);
          title = tmp;
--- 92,96 ----
  	
      if(*_sProductName) {
!         char tmp[512];
          sprintf(tmp,"vst~ - %s",_sProductName);
          title = tmp;
***************
*** 100,104 ****
  
  	*_sVendorName = 0;
! 	Dispatch( effGetVendorString, 0, 0, &_sVendorName, 0.0f);
  
  	_sDllName = dllname;
--- 100,104 ----
  
  	*_sVendorName = 0;
! 	Dispatch( effGetVendorString, 0, 0,_sVendorName, 0.0f);
  
  	_sDllName = dllname;
***************
*** 273,276 ****
--- 273,279 ----
      FLEXT_ASSERT(h != NULL);
  	Dispatch(effEditOpen,0,0,hwnd = h);
+ //	Dispatch(effEditTop);
+ 
+     TitleEditor(this,title.c_str());
  }
  
***************
*** 423,427 ****
  long VSTPlugin::Master(AEffect *effect, long opcode, long index, long value, void *ptr, float opt)
  {
! #if 0
      audioMasterEnum op = (audioMasterEnum)opcode;
      audioMasterEnumx opx = (audioMasterEnumx)opcode;
--- 426,430 ----
  long VSTPlugin::Master(AEffect *effect, long opcode, long index, long value, void *ptr, float opt)
  {
! #if 1
      audioMasterEnum op = (audioMasterEnum)opcode;
      audioMasterEnumx opx = (audioMasterEnumx)opcode;
***************
*** 435,439 ****
      case audioMasterAutomate: // 0
  #ifdef FLEXT_DEBUG
!         post("Automate index=%li value=%li",index,value);
  #endif
  		// index, value given
--- 438,442 ----
      case audioMasterAutomate: // 0
  #ifdef FLEXT_DEBUG
!         post("Automate index=%li value=%li opt=%f",index,value,opt);
  #endif
  		// index, value given
***************
*** 442,450 ****
      case audioMasterVersion: // 1
          // support VST 2.3
!         return 2300;
      case audioMasterCurrentId: // 2
          return 0;
  	case audioMasterIdle: // 3
! //		effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f);
  		return 0;
  	case audioMasterPinConnected: // 4
--- 445,454 ----
      case audioMasterVersion: // 1
          // support VST 2.3
! //        return 2300;
!         return 2;
      case audioMasterCurrentId: // 2
          return 0;
  	case audioMasterIdle: // 3
! 		effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f);
  		return 0;
  	case audioMasterPinConnected: // 4
***************
*** 493,496 ****
--- 497,504 ----
  	case audioMasterGetNumAutomatableParameters: // 11
  		return 0; // not supported
+     case audioMasterSizeWindow: // 15
+         return 0;
+ //    case audioMasterGetSampleRate: // 16
+ //    case audioMasterGetBlockSize: // 17
      case audioMasterGetCurrentProcessLevel: // 23
          // return thread state
***************
*** 508,511 ****
--- 516,546 ----
      	post("\taudioMasterCanDo PTR = %s",ptr);
  #endif
+         if(!strcmp((char *)ptr,"sendVstEvents"))
+             return 1;
+         else if(!strcmp((char *)ptr,"sendVstMidiEvent"))
+             return 1;
+         else if(!strcmp((char *)ptr,"sendVstTimeInfo"))
+             return 1; // NOT YET
+         else if(!strcmp((char *)ptr,"receiveVstEvents")) 
+             return 1;
+         else if(!strcmp((char *)ptr,"receiveVstMidiEvent"))
+             return 1;
+         else if(!strcmp((char *)ptr,"receiveVstTimeInfo"))
+             return 1; // NOT YET
+         else if(!strcmp((char *)ptr,"reportConnectionChanges"))
+             return 0; // \TODO PD has hard times supporting that...
+         else if(!strcmp((char *)ptr,"acceptIOChanges"))
+             return 0; // \TODO what does this means exactly?
+         else if(!strcmp((char *)ptr,"supplyIdle"))
+             return 1;
+         else if(!strcmp((char *)ptr,"sizeWindow"))
+             return 1;
+         else if(!strcmp((char *)ptr,"supportShell"))
+             return 0; // NOT YET!
+         else if(!strcmp((char *)ptr,"offline"))
+             return 0; // not supported
+         else if(!strcmp((char *)ptr,"asyncProcessing"))
+             return 0; // not supported
+ 
  		return 0; // not supported
  	case audioMasterGetLanguage: // 38
***************
*** 514,517 ****
--- 549,557 ----
          // return full path of plugin
  		return 0; // not supported
+     case audioMasterUpdateDisplay: // 42
+ #ifdef FLEXT_DEBUG
+         post("UPDATE DISPLAY");
+ #endif
+         return 0;
      default:
  #ifdef FLEXT_DEBUG

Index: VstHost.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/vst/src/VstHost.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** VstHost.h	25 Aug 2004 02:42:06 -0000	1.9
--- VstHost.h	11 Sep 2004 04:09:17 -0000	1.10
***************
*** 114,118 ****
      bool IsVisible() const;
  
! //    void Paint(ERect &r) const { Dispatch(effEditDraw,0,0,&r); }
  
  	void processReplacing( float **inputs, float **outputs, long sampleframes );
--- 114,118 ----
      bool IsVisible() const;
  
!     void Paint(ERect &r) const { Dispatch(effEditDraw,0,0,&r); }
  
  	void processReplacing( float **inputs, float **outputs, long sampleframes );
***************
*** 151,156 ****
      inline bool HasFlags(long msk) const { return _pEffect && (_pEffect->flags&msk); } 
  
! 	char _sProductName[64];
! 	char _sVendorName[64];
      std::string _sDllName;	// Contains dll name
  
--- 151,156 ----
      inline bool HasFlags(long msk) const { return _pEffect && (_pEffect->flags&msk); } 
  
! 	char _sProductName[300];
! 	char _sVendorName[300];
      std::string _sDllName;	// Contains dll name
  

Index: EditorWin.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/vst/src/EditorWin.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** EditorWin.cpp	25 Aug 2004 02:42:06 -0000	1.4
--- EditorWin.cpp	11 Sep 2004 04:09:17 -0000	1.5
***************
*** 56,65 ****
              PostQuitMessage(0); 
              break; 
!         case WM_TIMER:
! //        	plug->Dispatch(effEditIdle, 0, 0, NULL, 0.0f);
!   //          break; 
          case WM_ENTERIDLE:
              plug->EditorIdle();		
              break; 
          case WM_MOVE: {
              // ignore after WM_CLOSE so that x,y positions are preserved
--- 56,65 ----
              PostQuitMessage(0); 
              break; 
!         
!         case WM_TIMER: // fall through
          case WM_ENTERIDLE:
              plug->EditorIdle();		
              break; 
+ 
          case WM_MOVE: {
              // ignore after WM_CLOSE so that x,y positions are preserved
***************
*** 75,87 ****
              break; 
          }
! /*
          case WM_PAINT: {
              // Paint the window's client area. 
              RECT rect;
!             GetUpdateRect(hwnd,rect,FALSE);
!             plug->Paint(rect);
              break;  
          }
! */
  #if 0 //def FLEXT_DEBUG
          case WM_SIZE: {
--- 75,94 ----
              break; 
          }
! 
! #if 0 // NOT needed for Windows
          case WM_PAINT: {
              // Paint the window's client area. 
              RECT rect;
!             GetUpdateRect(hwnd,&rect,FALSE);
!             ERect erect;
!             erect.left = rect.left;
!             erect.top = rect.top;
!             erect.right = rect.right;
!             erect.bottom = rect.bottom;
!             plug->Paint(erect);
              break;  
          }
! #endif
! 
  #if 0 //def FLEXT_DEBUG
          case WM_SIZE: {
***************
*** 95,98 ****
--- 102,109 ----
  
          default: 
+         #ifdef FLEXT_DEBUG
+             flext::post("WND MSG %i, WP=%i, lp=%i",msg,wp,lp);
+         #endif
+ 
              res = DefWindowProc(hwnd,msg,wp,lp); 
      }





More information about the Pd-cvs mailing list