From 0952e55a338b6a33d86f3be5355c66b419200327 Mon Sep 17 00:00:00 2001 From: Lucas Cordiviola Date: Fri, 19 Apr 2024 04:28:23 -0300 Subject: [PATCH] set getchunk setchunk --- vst-template/pdvst.cpp | 17 +++++++++++++++++ vst-template/pdvst.hpp | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/vst-template/pdvst.cpp b/vst-template/pdvst.cpp index cfe2808..b30bfd8 100644 --- a/vst-template/pdvst.cpp +++ b/vst-template/pdvst.cpp @@ -226,6 +226,7 @@ pdvst::pdvst(audioMasterCallback audioMaster) // {JYG see pdvst::setProgram below for explanation timeFromStartup=GetTickCount(); // JYG } + programsAreChunks(true); } pdvst::~pdvst() @@ -600,6 +601,22 @@ bool pdvst::getOutputProperties(VstInt32 index, VstPinProperties* properties) return false; } +VstInt32 pdvst::getChunk (void** data, bool isPreset) +{ + //fxProgram::fxMagic = "FPCh"; + MessageBox(0,"getchunk","debug",MB_OK); + //debugLog("getchunk\n"); + strcpy ((char *)*data, "hello world"); + return 11; +} + +VstInt32 pdvst::setChunk (void* data, VstInt32 byteSize, bool isPreset) +{ + MessageBox(0,"setchunk","debug",MB_OK); + //strcpy ((char *)data, "hello world"); + return 1; +} + VstInt32 pdvst::canDo(char* text) { //if (isASynth) diff --git a/vst-template/pdvst.hpp b/vst-template/pdvst.hpp index 36a5d1b..955e3d0 100644 --- a/vst-template/pdvst.hpp +++ b/vst-template/pdvst.hpp @@ -105,6 +105,9 @@ public: LPTSTR displayString;//= new TCHAR[MAXSTRINGSIZE]; HWND pdGui; + + virtual VstInt32 getChunk (void** data, bool isPreset = false); + virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset = false); protected: static int referenceCount; @@ -170,6 +173,7 @@ protected: // JYG } + //void programsAreChunks (bool) {} }; #endif